When you set up a stream in OBS Studio, the encoder list can include H.264, HEVC (also called H.265) and AV1, depending on your graphics card. All three can work, but they don't need the same bandwidth, and not every platform or viewer setting supports all of them. This comparison is based on YouTube's official encoder guidance and OBS's documentation; Forge PC hasn't run its own streaming tests.
What YouTube accepts
YouTube's live encoder settings page lists H.264, H.265 (HEVC) and AV1 as supported video codecs over RTMP/RTMPS, at up to 60fps, with constant bitrate (CBR) and a recommended keyframe interval of 2 seconds (no more than 4).
Bitrate: the big difference
YouTube's table gives separate recommended bitrates for AV1/H.265 and for H.264. The newer codecs are recommended lower bitrates at every resolution:
Resolution | AV1 / H.265 recommended | H.264 recommended |
|---|
1080p at 60fps | 12 Mbps | 17 Mbps |
1440p at 60fps | 24 Mbps | 34 Mbps |
4K at 60fps | 35 Mbps | 50 Mbps |
YouTube's minimums follow the same pattern; for 1080p60, 4 Mbps for AV1/H.265 against 6 Mbps for H.264. Going by YouTube's figures, AV1 or HEVC can be the better choice if your upload speed is limited, or let you stream at a higher resolution on the same connection.
HDR
YouTube says H.265 (HEVC) is the codec for HDR live streams and that AV1 isn't supported for HDR. If you stream HDR to YouTube, use HEVC.
H.264: the safe default
H.264 is the long-established option and YouTube supports it alongside the newer codecs. If your graphics card doesn't offer an HEVC or AV1 encoder in OBS, it's the one to use. Check your streaming platform's own guidance before switching, as support varies between services.
Hardware encoders in OBS
OBS's knowledge base notes that, from OBS 31, the NVIDIA NVENC implementation adds extra options, some of which, such as using B-frames as reference frames, apply only to HEVC and AV1. If AV1 or HEVC isn't offered in OBS, check your graphics card maker's specifications for hardware encoder support, and make sure you're on a current graphics driver.
For the GPU-versus-CPU encoding question, see NVENC vs x264 in OBS, and for recording rather than streaming, how to record gameplay with OBS Studio.
Our verdict
For YouTube, AV1 or HEVC need noticeably less bitrate than H.264 for the same resolution (12 Mbps vs 17 Mbps recommended at 1080p60), so pick one if your GPU offers it in OBS and your upload is limited. Use HEVC for HDR, because YouTube doesn't support AV1 for HDR. Stick with H.264 if your GPU doesn't offer the newer encoders, and check each platform's guidance if you stream elsewhere.