H.264 vs H.265: File Size, Quality, and Compatibility
H.264 and H.265 are both published standards with documented, and different, decoder support. This guide sets out what vendors actually state, and shows how a codec choice reaches file size only through the bitrate you pick.
Published 2026-08-11 · Updated date pending
The short answer
Both are published international standards. H.264 is ITU-T Recommendation H.264, “Advanced video coding for generic audiovisual services”. H.265 is ITU-T Recommendation H.265, “High efficiency video coding”. Both are in force.
The practical difference is support, and vendors document it. Microsoft’s own documentation gives its H.264 decoder a minimum supported client of Windows 7 and its HEVC decoder a minimum supported client of Windows 10. YouTube recommends H.264 for uploads. H.264 is the safer choice when you do not control the playback environment; H.265 is the choice when you do.
Neither codec changes the file size formula. Size follows from the bitrate you choose, and the Video File Size Calculator works the same way for both.
What the two specifications are
H.264 is published by the ITU-T as Recommendation H.264, under the title “Advanced video coding for generic audiovisual services”. H.265 is published as Recommendation H.265, “High efficiency video coding”, with the current in-force version dated January 2026.
Both are format specifications. They define how a conforming bitstream is written and how a conforming decoder reads it. Neither prescribes a bitrate, a quality level, or an encoder. That is why two encoders targeting the same specification can produce very different results from the same source, and why a codec name on its own is not a quality claim.
Compatibility: what vendors actually document
This is where remembered knowledge goes wrong fastest, so this section quotes only vendor documentation, with links.
Microsoft. The Media Foundation H.264 video decoder is documented as supporting “Baseline, Main, and High profiles, up to level 5.1”, with a minimum supported client of Windows 7, a maximum resolution of 4096x2304 pixels, and a note that “In Windows 7, the maximum supported resolution is 1920 x 1088 pixels for both software and DXVA decoding.” The Media Foundation H.265/HEVC decoder is documented separately, supporting “Main, Main Still Picture, and Main10 profiles” at 4:2:0 chroma, with a minimum supported client of Windows 10.
The gap between those two minimum-supported-client entries — Windows 7 against Windows 10 — is the compatibility difference, stated by the vendor about its own components.
Google, on Android. Android’s supported media formats page documents H.264 AVC Baseline Profile decoding from Android 3.0, with the Main Profile encoder from Android 6.0 and a note that “The decoder is required, the encoder is recommended.” For HEVC it documents an encoder from Android 5.0 and describes the supported level as “Main Profile Level 3 for mobile devices and Main Profile Level 4.1 for Android TV”. Both list MP4 and Matroska as extractor container formats.
Google, on YouTube. YouTube’s recommended upload encoding settings name H.264 as the recommended video codec, in an MP4 container, with AAC-LC, Opus or Eclipsa Audio for the audio track.
What is deliberately absent from this section is any claim about devices, browsers or applications for which this project could not find current vendor documentation. If a compatibility statement is not above, it is because it could not be sourced, not because it is false.
How the codec choice reaches file size
It reaches it through exactly one channel: the bitrate you give the encoder. The file size formula does not have a codec input.
fileSizeBytes = (videoBitrate + audioBitrate) x durationSeconds / 8
Ten minutes of video with the audio track switched off, at two bitrates:
35 Mbps 35 000 000 x 600 / 8 = 2 625 000 000 bytes = 2.63 GB
17.5 Mbps 17 500 000 x 600 / 8 = 1 312 500 000 bytes = 1.31 GB
Halving the bitrate halves the file, exactly. That is arithmetic, and it holds for any codec. Both lines reproduce in the Video File Size Calculator with audio switched off.
What the arithmetic cannot tell you is whether a given codec produces acceptable output at 17.5 Mbps for your footage. That is a judgement about a specific encoder, a specific configuration and specific content.
The efficiency claim this site does not make
You will see a figure quoted widely: that H.265 delivers the same quality as H.264 at around half the bitrate. This site does not publish that figure or any variant of it.
The reason is that the claim is a measurement, and this project has made no measurements. Any honest efficiency number depends on the source footage, the encoder implementation, the preset, the rate control mode, and the quality metric used to declare two results equivalent. A number that ignores all five is not a fact about the codecs.
What can be said without measuring anything: if you choose a lower bitrate for any reason, the file gets proportionally smaller, and you can see exactly how much smaller in the calculator before you commit to an encode.
Choosing between them
The decision reduces to a question about playback, which vendor documentation can answer:
- You do not control playback — an upload to a platform, a file sent to a client, a download for an unknown audience. H.264 has the wider documented decoder support in the vendor documentation cited above, and YouTube recommends it for uploads.
- You do control playback — your own devices, a known operating system baseline, an app whose decoder you have verified. Then the constraint is whichever minimum the vendor documents for your targets.
- You are archiving a master. Neither of these is the relevant comparison; an intermediate or mastering format is, and that is outside the scope of this guide.
What this does not tell you
- No efficiency ratio is given, because it would be an unmeasured claim. See above.
- No quality comparison is given. Nothing here was viewed, scored or compared.
- Vendor support changes. Every statement above carries an access date, and the documentation may have been updated since. The links are in Sources.
- Encoding and decoding are different questions. A device that decodes a codec may not encode it, and Android’s page documents them in separate columns for exactly that reason.
- Licensing is out of scope. This guide covers file size, quality and documented compatibility only.
Frequently asked questions
Which codec produces smaller files?
At the same bitrate, neither: the file size formula uses bitrate and duration only. The real question is what bitrate each codec needs for output you accept, and that is a measurement this project has not made and does not publish.
Will an H.265 file play everywhere an H.264 file plays?
Not according to the vendor documentation cited here. Microsoft documents its H.264 decoder with a minimum supported client of Windows 7 and its HEVC decoder with a minimum supported client of Windows 10. That is one vendor’s statement about its own components, and it is the sort of statement to check per target rather than assume.
Should I upload H.265 to YouTube?
YouTube’s recommended upload encoding settings name H.264 as the recommended video codec in an MP4 container. Recommendations are not prohibitions, but that is what the page says.
Does H.265 need a higher or lower bitrate?
Whatever bitrate you set is the bitrate the file size arithmetic uses. Whether you can lower it and remain satisfied with the result depends on your footage and your encoder. Use the Video File Size Calculator to see what each candidate bitrate costs before you encode.
What are profiles and levels?
Constraints inside the specification that limit what a bitstream may use, so decoders can advertise what they handle. Microsoft’s documentation lists Baseline, Main and High up to level 5.1 for its H.264 decoder, and Main, Main Still Picture and Main10 for its HEVC decoder. Encoding outside what your target supports is a common cause of a file that will not play.
Sources
- H.264: Advanced video coding for generic audiovisual services — ITU-T. https://www.itu.int/rec/T-REC-H.264. Accessed and verified 2026-08-11. Supports the title, publisher and in-force status of H.264.
- H.265: High efficiency video coding — ITU-T. https://www.itu.int/rec/T-REC-H.265. Accessed and verified 2026-08-11. Supports the title, publisher, in-force status and current version date of H.265.
- H.264 Video Decoder — Microsoft Learn. https://learn.microsoft.com/en-us/windows/win32/medfound/h-264-video-decoder. Accessed and verified 2026-08-11. Supports the minimum supported client, profiles and levels, maximum resolution and the Windows 7 resolution note.
- H.265 / HEVC Video Decoder — Microsoft Learn. https://learn.microsoft.com/en-us/windows/win32/medfound/h-265—hevc-video-decoder. Accessed and verified 2026-08-11. Supports the minimum supported client, profiles and chroma format.
- Supported media formats — Android Developers (Google). https://developer.android.com/media/platform/supported-formats. Accessed and verified 2026-08-11. Supports the Android version statements for H.264 and HEVC encoding and decoding, the HEVC profile levels, and the container formats.
- Recommended upload encoding settings — YouTube Help (Google). https://support.google.com/youtube/answer/1722171?hl=en. Accessed and verified 2026-08-11. Supports the recommended video codec, container and audio codecs for uploads.
Related guides and tools
- Video File Size Calculator — the tool this guide explains.
- Video bitrate explained — the input the codec choice ultimately acts through.
- Best bitrate for 1080p, 1440p and 4K video — the published per-resolution guidance.
- Why your actual video file size differs from the estimate — what happens between the estimate and the file on disk.