- 2Basic Concepts
- 3Your choices and my recommendations
- 3.1A - 3 video codecs
- 3.1.1Option 1 – H264:
- 3.1.2Option 2 – H265:
- 3.1.3Option 3 – VP9:
- 3.2B - MKV vs MP4 vs WebM
- 3.3C – Handbrake and AviDemux
- 3.4D - Constant Quality vs Constant Bitrate vs Variable Bitrate
- 3.5E – Considerations for the future
- 4Encoding comparisons to help you choose
- 4.5.1HandBrake x264:
- 4.5.2Handbrake x265:
- 4.5.3FFMPEG VP9:
- 4.5.4Premiere H264:
- 4.5.5HandBrake x264:
- 4.5.6Handbrake x265:
- 4.5.7FFMPEG VP9:
- 4.5.8Handbrake x264:
- 4.5.9Handbrake x265:
- 4.5.10FFMPEG VP9:
- 5Encoding the Video portion with Handbrake
- 5.5.1Picture Tab:
- 5.5.2Filters Tab:
- 5.5.3Video Tab:
- 5.5.4Advanced Tab:
- 5.5.5FFMPEG for VP9:
- 6Encoding the Audio portion with Handbrake
- 6.1A – Separating the myths from the facts
- 6.2B – Definitions, formats and my choices
- 6.3C – Examples of the Handbrake Audio Tab
- 7Streaming basics and a comparison – CPU vs NVENC vs Quick Sync
- 7.3.1Audio, push-to-talk and hotkeys Settings:
- 7.3.2Stream Settings:
- 7.3.3Video Settings:
- 7.3.4Output Settings:
- 8Streaming examples for CPU, NVENC & Quick Sync
- 8.3.1CPU (x264)
- 8.3.2Quick Sync (QSV)
- 9Recording examples for CPU, NVENC & Quick Sync and recording while streaming
- 9.3.1CPU (x264)
- 9.3.2Quick Sync (QSV)
- 10Buffer recording and AVIDemux
- 10.3.1Replay Buffer
Streaming basics and a comparison – CPU vs NVENC vs Quick Sync
Please note, this section is now out-dated. As of 2019, NVENC in Turing RTX 2080TI, 2080, 2070 and 2060 cards is much better than the Kepler NVENC used in this article. Please see here for a 2019 update on codec comparisons.
As stated in part 2, CPU encoding will, at the time of writing this, get the most quality possible into your bandwidth. For years people have claimed that hardware encoders can do all sorts of things, but the simple fact today is that $ for $, a CPU will do a better job. Other methods come in handy if your CPU is crap. Let’s say you’ve had a computer for 4 years and you recently managed to save enough cash to get a shiny new GPU, then you may benefit from part 8 of this tutorial (Quick Sync and NVENC) and applying some of those settings to your streaming. However if your CPU came out within 3 years of your graphics card any year before or including 2017, then it’s most likely that using your CPU will get you the best results. See the end of this section for examples of bitrates with different hardware.
Step 1 is to go to speedtest.net and test your upload speed. Try close any programs that are using the internet first, so that you get the best result you can. In case you didn’t know, you should also do this before you stream….. What you want is a ping below 50, a download above 8Mbps and upload above 0.8Mbps. You may be able to stream with a slower upload, but your quality will really start to suffer. So if it’s low, stick to games like Hearthstone and avoid games like Unreal Tournament.
You need to save about 50Kbps upload for your gaming and another 50kpbs for voice comms. Then you should also allow 10% of you max in fluctuation. So whatever your upload was on speedtest, take 10% off then another 100 off that for the number you use as your bitrate in OBS. For example, if you had 1.0Mbps upload on speedtest, then you would take 10% off for 900kbps and then another 100 off for a final figure of 800kbps. Bear in mind this is a general rule, the game you play and your specific connection may require you to take more off your “maximum” upload.
Resolution, upload and download are a mixed bag of situational appropriateness. What I will say, is that YouTube can take any upload speed you have up to 6Mbps and will send it to all viewers at whatever download speed they can take. Twitch is less reliable, you may be able to upload at 3000kbps yet many users, like me, have a download speed of 8000kbps but still get constant buffering on Twitch streams. It’s because Twitch’s stream speed isn’t as consistent as YouTube’s. I recommend if you are in Australia and looking at an Australian audience mostly, keep it to 2000kbps as of the year 2017. If that changes, I’ll update. But for now, YouTube is more reliable to watch, but Twitch is more popular, so you should take more care with it.
- 600-800 do it in 480p.
- 800-1500 try 720p.
- 1500-2000 go for 1080p.
- If you are struggling just a touch at 30fps, turn it down to 25, which requires less data that will now be used for resolution quality and connection reliability.
Open up OBS and hit the settings button.
Audio, push-to-talk and hotkeys Settings:
You will not need to touch the Advanced settings, but I recommend going to the Audio settings and ticking “push-to-talk” for your Mic, then go to Hotkeys settings and set a push-to-talk button for the Mic. This means that it will only record your Mic to the stream/recording if you have this button down. So if you cough or your girlfriend starts yelling at you during the game, it won’t come through without you realising. In the Audio settings, leave the sample rate at 44.1KHz. If you haven’t read above about why higher isn’t necessary then just take it on faith. Please. Feel free to have stereo channels though, that definitely makes a difference to the game audio. You can set different Audio tracks so that they can be edited separately later on, but it’s usually not necessary. I don’t do it.
This is going to depend entirely on where you stream to. Basically select your service, choose the location nearest to you and pop in your stream key. For YouTube the server won’t matter, for Twitch it will, others may or may not matter too. This is really up to you and your streaming service.
Base Resolution = Set to your native screen resolution, or the resolution of the game you want to capture. Generally these days this will be 1920×1080
Output Resolution = This is if you want your output scaled differently. The stream settings allow you to set this for the stream, and recording settings will allow you to set it differently for local recordings. Because of those features, I recommend leave the Output Resolution the same as your Base Resolution.
Downscale Filter = Lanczos. If your CPU can’t handle this then you shouldn’t be doing it at all. Most likely it will though so don’t stress. If your final stream or recording is different to your game’s actual resolution, it needs to be shrunk. This is the process OBS will do it with. In my experience, if the difference between Lanczos and Bicubic is 5% of your CPU, that 5% is better used here than it is in your encoding process. If you are recording to HDD for upload later, then you’ll probably be doing it all in full resolution anyway and this won’t even get used.
FPS Value = There’s a few ways to set this via the drop-down, but I always use “Integer FPS Value” and set the number to whatever I want. I recommend 25 for most situations, then once you’ve got the hang of stuff and want to push your recordings further, you can experiment.
Disable Aero = Tick this box. It gives you a performance boost that is too good to ignore. This will help keep your gameplay at a good level and the recording will get extra CPU work for a better video quality.
NOTE: In the latest version of OBS it sets the default Audio bitrate to 160kbps. I recommend flipping to the Audio Tab and changing it to 128 since that’s widely accepted as transparent for AAC and those extra 32kbps could be better used on your video quality.
First off, change the Output Mode to Advanced.
Now you should be on the Streaming Tab.
Encoder = Your CPU is the best encoder in your computer unless you have a system setup that is extraordinarily strange and I’ll bet good money that you don’t. Set the Encoder to x264 then proceed to section 8 for help on how to tweak it. For people who absolutely must do it differently, you can choose NVENC or Quick Sync and look in section 8 for some examples with them. Honestly, for the same quality they use a CONSIDERABLY higher bitrate. The same applies in reverse, if you are limited to a bitrate, then the quality will be CONSIDERABLY lower.
Enforce streaming service encoder settings = This can help if you have compatibility issues, but I manage just fine without it ticked.
Rescale Output = This is where you scale your streaming output. It will do so proportionally to the OUTPUT resolution from the Video settings section. That’s why I leave them the same there, so you can be specific once you get to this tab. Look above at the speedtest section for what resolution to use for your bitrate.
The rest will be in Section 8 because it is specific to your Encoder selection. So to help you choose I’ve got some examples of what each one looks like at 3 different bitrates. Please bear in mind that even if you use a different bitrate, the quality difference between encoders will be the same. If you look at the difference between Quick Sync, NVENC and x264 at 4Mbps, 2Mbps and 1Mbps and notice that one looks consistently better than the other, yet you can only upload at 800kbps or 1.5Mbps then you can safely assume that the same quality difference will apply.
The video is a 5.36 second (134 frames) clip of Tracer in Overwatch doing her Highlight Intro called Lion Dance. The lossless version is 53.5MiB at an overall bit rate of 83.7Mbps. The audio is 44.1KHz AAC at 128kbps to reflect the real-world likelihood that some of your upload rate is used for audio and in all encode examples the audio is passed through and unchanged, therefore only the video changes.
The image shows a frame where Tracer is spinning around. It’s high-motion on tracer but the rest of the frame is pretty stationary. NVENC and Quick Sync were unable to produce 1080p video at 1Mbps, for QSV the file was identical to the 2Mbps version and for NVENC it was a tiny bit larger which is stupid. So here they are in order of bitrate then quality:
x264 4Mbps Medium
x264 4Mbps Faster
x264 4Mbps SFast
Quick Sync 4Mbps
x264 2Mbps Medium
x264 2Mbps Faster
x264 2Mbps SFast
Quick Sync 2Mbps
x264 1Mbps Medium
x264 1Mbps Faster
x264 1Mbps SFast