Welcome to How to Record a Video Game 2.0 - now with free software and easier steps! You can find my old post here.
Software you'll need: Open Broadcaster Software
Please note this software by default is intended for streaming to places like Twitch.tv, this tutorial and settings are for saving to a file. I upload these files to Youtube and they're full HD quality. If you try to stream using these settings it will fail.
Install OBS, nothing special there. Go to Settings -> Settings
No changes on the General tab
Uncheck "Use CBR"
Max Bitrate: 1000 (some people say to use higher values but it slows my framerate)
Check "Use Custom buffer size"
Buffer size: 0
It should look like this:
Broadcast Settings tab:
Change Mode to "File Output only"
Set your file path and hotkeys
Some people use Resolution Downscale, I like to keep mine full size. Downscaling to 720p is the most common setting with bilinear as the filter.
Lots of settings to fiddle with here so I won't detail them all.
Adjusting the number within "Custom x264 Encoder Settings" seems to be the biggest performance difference. The picture will look nicer with a smaller number, like 15 but my machine runs smoother at 20 and still looks good.
This gives you a file which can be directly uploaded to Youtube. It does create large files so if you have limited bandwidth you may want to encode the file using extra software. I haven't paid for this software so I can't help you. For suggested settings though you can see Youtube's suggestions here.
I welcome other people's suggestions for improvements to this tutorial, thanks!