H264 vs H265: Which codec is better for YouTube?
45sDirectly addresses a common creator dilemma with a promise of surprising results.
▶ Play ClipThis video compares H.264 and H.265 codecs for rendering YouTube videos, analyzing render times and visual quality at 1080p, 1440p, and 4K resolutions. Tests were conducted using DaVinci Resolve with gaming footage, revealing surprising results especially at 1080p.
H.265 (HEVC) is superior in compression but may not always yield best quality on YouTube due to resolution dependency.
Render times depend on hardware: H.264 uses CPU fully, H.265 uses GPU. On a 3900X, H.265 gave marginal improvement; on a 7700K, H.265 was 60-70% faster.
Windows lacks native HEVC playback; use VLC or install HEVC Video Extensions from Microsoft Store ($1) for DaVinci Resolve.
Used VMAF to compare quality after YouTube re-encode. Tested various bitrates and resolutions.
H.265 always produces higher visual quality at same bitrate. Can reduce bitrate by ~40 Mbps for same quality as H.264.
H.265 superior; gap smaller than 4K. 70 Mbps H.264 ≈ 45 Mbps H.265. Recommend high bitrate for best quality.
H.265 performed worse than H.264, with inconsistent quality. Likely due to insufficient data for YouTube's re-encode.
Avoid H.265 at 1080p; use H.264 instead. Better to upscale to 1440p to leverage VP9 codec.
For 4K and 1440p, use H.265 for better quality and potential faster renders. For 1080p, stick with H.264 or upscale to 1440p.
"Title accurately describes the content; delivers data-driven comparison for each resolution."
Which codec is generally superior in compression efficiency?
H.265 (HEVC)
What tool was used to measure visual quality?
VMAF (Video Multi-Method Assessment Fusion)
05:10
At 1080p, which codec performed better on YouTube?
H.264 performed better than H.265.
07:50
What is the recommended workaround for HEVC playback in Windows?
Use VLC Media Player or install the HEVC Video Extensions from the Microsoft Store.
03:45
How much bitrate reduction can be achieved with H.265 at 4K for same quality as H.264?
Approximately 40 Mbps reduction.
05:54
What is the recommended action for 1080p footage to improve YouTube quality?
Upscale to 1440p and render at that resolution to use VP9 codec.
09:35
Codec Comparison Surprise
Reveals that superior codec doesn't always yield best YouTube quality due to resolution dependency.
Hardware Dependency of Render Times
Shows render time improvement varies greatly with CPU vs GPU rendering capabilities.
01:181080p Anomaly
Unexpectedly, H.265 performed worse than H.264 at 1080p, contradicting general expectations.
07:50Recommendation to Upscale
Practical tip: upscale 1080p to 1440p to leverage better YouTube codec.
09:21[00:00] h.264 or h.265 which codec should you
[00:04] use for rendering your videos for
[00:06] YouTube to answer this question in
[00:08] today's video we are going to look at
[00:10] the difference in render times and we're
[00:12] also going to look at the actual visual
[00:14] quality of the final product on YouTube
[00:17] when rendered either in h.264 or h.265
[00:21] now the outcome of this analysis might
[00:24] actually surprise you quite a bit
[00:25] because even though h.265 or hevc is
[00:30] definitely the superior codec that
[00:32] produces the same visual quality with a
[00:34] smaller file size this doesn't always
[00:37] translate into the best possible quality
[00:39] on YouTube because this highly depends
[00:42] on the resolution that you're rendering
[00:43] in now before diving right into results
[00:45] for today's video I want to mention that
[00:48] all of the tests I have performed using
[00:49] DaVinci Resolve the free version as
[00:52] since version 17 something something
[00:55] DaVinci Resolve supports rendering using
[00:57] h.265 moreover the I'm using for these
[01:01] tests comes from Modern Warfare version
[01:03] 2 so I've used gaming footage at 60fps
[01:05] however the results that I'm showing in
[01:07] this video should hopefully also be
[01:09] applicable for other type of footage
[01:10] such as Talking Heads GoPro or Drone
[01:13] footage and with having said that let's
[01:16] start with our render times now
[01:18] generally speaking you would expect the
[01:20] render times to actually decrease when
[01:22] going from h.264 to h.265 now while this
[01:26] is generally true for most people it
[01:28] also sort of depends on the type of
[01:30] Hardware that you're using to render
[01:32] your videos you see when you render
[01:34] using h.264 you will use 100 of your CPU
[01:39] or rather all of your threads that you
[01:41] have available to render that video that
[01:43] also translates into extremely high
[01:45] temperatures when for instance you have
[01:47] a 3900k on the other hand if you render
[01:50] using h.265 then most of this work is
[01:54] actually done on the GPU and therefore
[01:56] your CPU isn't really doing too much but
[01:59] then again if you have a beastly CPU
[02:01] like the 3900k with 32 threads then
[02:04] going from that to rendering on your GPU
[02:07] isn't actually going to provide you with
[02:09] much of an improvement in render speeds
[02:12] so for my system you can see the render
[02:14] times that I'm getting for a sample one
[02:16] minute clip without any edits or any
[02:18] overlays or any effects on this graph
[02:21] right now now for this video I'm going
[02:23] to be using these three different
[02:24] resolutions that you see here 1080P
[02:27] 1440p and 2160p or 4K the orange bars on
[02:32] this Plot show the render times for a
[02:35] one minute sample clip of each of these
[02:37] resolutions in h.264 whereas the blue
[02:39] bars represent the same clip but
[02:42] rendered at age 265 as you can see in
[02:45] this very idealized case I actually do
[02:47] get Improvement in render speeds when
[02:49] moving from h264 to h.265 however as I
[02:53] mentioned before this is a very
[02:54] idealized case as there are no cuts no
[02:57] overlays no text no effect Supply to the
[03:00] clips whatsoever and therefore I also
[03:03] like to talk about what I'm seeing when
[03:05] actually rendering a proper clip out and
[03:08] here results are a little bit varied as
[03:10] you can see rendering this project here
[03:12] took roughly 30 seconds longer using
[03:15] h.265 compared to h.264 then again I
[03:18] should definitely mention at this point
[03:20] that these results are highly sensitive
[03:22] to the type of harder that they're using
[03:24] and more specifically they're going to
[03:27] be hugely different if you have a CPU
[03:29] that has much less threads compared to
[03:31] the 3900k for example when I repeat the
[03:35] exact same test on my 7700k you can see
[03:38] that I'm gaining roughly 60 to 70 speed
[03:41] improvements by going from h.264 to
[03:44] h.265
[03:45] by the way natively it's not possible to
[03:48] play back hevc videos in Windows a
[03:51] workaround is to Simply use the VLC
[03:53] Media planner which then allows you to
[03:55] actually play back your hevc video clips
[03:58] however if you're using DaVinci Resolve
[04:00] to edit your videos you are likely still
[04:02] not going to be able to play back your
[04:04] videos as you will get this media
[04:05] offline warning so to fix this go to the
[04:08] Microsoft store search for the hevc
[04:11] video extension pay the one dollar that
[04:14] this costs and install the extension
[04:16] after which you'll see that the video
[04:18] will play back just fine in DaVinci
[04:19] Resolve now if so far you've found any
[04:22] value whatsoever from this video then I
[04:25] would highly appreciate it if you guys
[04:26] could smash that like And subscribe to
[04:28] the channel currently only five and a
[04:30] half percent of people that are watching
[04:32] my content are also subscribed so if
[04:35] you're enjoying these super deep dive
[04:36] videos where I'm showing actual data to
[04:38] prove a point then please consider
[04:40] subscribing it would mean the absolute
[04:42] world to me if you could grow this
[04:44] community even further
[04:45] but let's shift gears now and talk about
[04:48] the actual visual quality of the video
[04:50] after you've uploaded it to YouTube so
[04:53] for this I have performed a bunch of
[04:55] different render tests using h.264 and
[04:58] h.265 at various different resolutions
[05:00] and various different bit rates I
[05:03] uploaded all of these videos onto
[05:05] YouTube then re-downloaded them and
[05:07] analyze them using vmaf or video
[05:10] multi-method assessment Fusion which
[05:12] kind of combines different quality
[05:15] metrics into just one number and it's a
[05:18] very nice and convenient way to compare
[05:20] the quality of two different video
[05:22] sources
[05:23] so on this graph once again the Orange
[05:25] Line represents rendering using h.264
[05:27] and the blue line rendering using h.265
[05:30] you can see the different rendering
[05:32] bitrates on the horizontal axis and the
[05:34] corresponding visual quality on the
[05:36] vertical axis with a higher value
[05:38] representing a better visual quality
[05:41] as expected at 4K h.265 always produces
[05:44] the higher visual quality when compared
[05:46] to h.264 rendered at the same bit rate
[05:49] now quite interestingly you can achieve
[05:52] the exact same visual quality on YouTube
[05:54] with h.265 when decreasing your bit rate
[05:58] by 40 megabits per second of course this
[06:01] relationship isn't completely linear and
[06:03] I'd have to kind of extend the graph
[06:04] both to the left and the right to give
[06:07] you this information for all different
[06:08] kinds of bit rates but generally
[06:10] speaking if you're rendering 4K videos
[06:12] for YouTube you should definitely always
[06:15] stick to h.265 both for the better
[06:17] visual quality on YouTube and
[06:19] potentially lower render times depending
[06:22] on your system stepping down the
[06:24] resolution to 1440p we can see pretty
[06:27] much the same behavior by the way if you
[06:28] look at these graphs and think that
[06:30] these could be very handy in order to
[06:32] figure out the best possible bit rate to
[06:34] render your YouTube videos at to get the
[06:37] highest possible visual quality then you
[06:39] would be just right and that's actually
[06:41] something that I've covered in one of my
[06:43] past videos where I talked about the
[06:45] best bit rates depending on your
[06:46] resolution you can check it out Linked
[06:48] In the card right now and I'm actually
[06:50] also working on updating that video with
[06:53] actually better data and that is
[06:55] actually using 4K footage natively in
[06:58] order to do my tests so returning to
[07:00] this plant we can see that once again
[07:02] h.265 is far superior over h.264 at
[07:06] 1440p and will basically always result
[07:09] in higher visual quality on YouTube now
[07:12] the gap between these two curves
[07:13] slightly decreased compared to 4K we can
[07:16] see that the visual quality of a 70
[07:18] megabits render at h.264 is roughly
[07:22] equivalent to a 45 megabit render at
[07:24] h.265
[07:26] so roughly speaking you can decrease
[07:27] your bit rate by 25 megabits and still
[07:30] have the same visual quality as it had
[07:33] with the higher bit rate in h.264
[07:35] however generally speaking I would
[07:37] always recommend to increase your bit
[07:39] rate as far as possible in order to be
[07:41] able to make use of the much better
[07:44] looking video quality on YouTube when
[07:46] rendering at an even higher bit rate
[07:48] finally let's decrease our resolution
[07:50] once again to 1080P and here results
[07:53] look
[07:55] completely different I was actually
[07:57] getting this graph and was very confused
[08:00] till h.265 was far far worse than h.264
[08:06] by a pretty significant margin actually
[08:09] so I was a bit skeptical and therefore
[08:11] decided to re-record a one minute
[08:14] segment in Warzone 2 once again at 1080p
[08:17] rendered it at different bit rates in
[08:19] h264 and h265 uploaded it to YouTube
[08:22] redownloaded everything and analyzed it
[08:24] and that's what happened so once again
[08:27] definitely not what I would have
[08:28] expected so I re-rendered the h.265 once
[08:32] again the exact same clip uploaded again
[08:35] and then it looked like this
[08:37] so essentially what I'm thinking happens
[08:39] is that the much more compressed h.265
[08:41] video Simply doesn't contain enough
[08:44] information to provide a good h.264
[08:47] re-encode on YouTube also this isn't
[08:49] just a random outcome of the vmaf
[08:51] computation as when I visually compare
[08:54] the h.264 render to the h.265 render
[08:57] after downloading the clips from YouTube
[08:59] you can see that the h.264 is actually
[09:02] vastly Superior in terms of visual
[09:04] Clarity compared to the h.265 render now
[09:08] frankly I find it a bit concerning that
[09:10] at 1080p it seems to be a little bit
[09:13] random as to whether you're getting good
[09:15] or bad quality on YouTube when you
[09:17] upload your h.265 videos in 1080P so if
[09:21] having said all of this my conclusion
[09:22] would be that if you have to render your
[09:25] videos in 1080P then I would actually
[09:28] not recommend to use h.265 and use h.264
[09:32] instead however instead of actually
[09:35] uploading 1080 footage you should really
[09:37] consider to upscale your footage to
[09:39] 1440p and render it in that resolution
[09:42] in order to make sure that you can
[09:44] actually make use of the vp9 codec on
[09:47] YouTube now I'll make sure to include
[09:49] the visual quality that you can expect
[09:50] when upscaling a 1080p clip to 1440p or
[09:54] even 4K in this video where I'll talk
[09:57] about the best possible bitrate to use
[09:58] when rendering videos for YouTube in
[10:01] different resolutions so I hope you got
[10:03] value from this video thank you so much
[10:04] for watching have a wonderful day and
[10:06] I'll see you guys in the next video
⚡ Saved you time reading this? Transcribe any YouTube video for free — no signup needed.