H.265 (HEVC) typically produces files noticeably smaller than H.264 (AVC) at the same visual quality - often quoted as up to around half the bitrate, though real savings vary with the content and encoder. H.264, however, plays on practically every device and browser and encodes faster. Choose H.264 when compatibility matters most, and H.265 when you want smaller files or need 10-bit and HDR on devices that support it.
This guide compares the two codecs on efficiency, compatibility, encoding speed, HDR support and licensing, then gives practical settings for each.
At a glance
| H.264 / AVC | H.265 / HEVC | |
|---|---|---|
| Standardised | 2003 | 2013 |
| Compression efficiency | Good baseline | Typically smaller files at similar quality |
| Playback support | Near universal | Wide on modern devices, but not universal |
| Software encoding speed | Fast | Considerably slower at comparable presets |
| 10-bit and HDR | 10-bit exists (High 10) but has poor hardware support; rarely used for HDR | Main 10 profile widely supported; standard choice for HDR10, HLG and Dolby Vision |
| Main software encoder | x264 | x265 |
| Hardware encoding | Almost all GPUs from the last decade | Most modern NVIDIA, Intel and AMD GPUs |
Compression efficiency
HEVC improves on H.264 with larger and more flexible block sizes (coding tree units up to 64x64 pixels, compared with H.264's 16x16 macroblocks), more intra-prediction directions, better motion compensation and improved in-loop filtering. The gains are largest at higher resolutions, where big blocks can describe flat areas of 4K footage efficiently. At low resolutions and high bitrates, the difference shrinks.
In practice, a well-tuned x265 encode can often match a well-tuned x264 encode at a substantially lower bitrate, but the exact saving depends on the content, the settings and how you measure quality. Treat headline figures like "50% smaller" as a best case rather than a guarantee. If you want numbers for your own footage, encode a short sample with both and compare them using a metric such as VMAF.
Compatibility
This is where H.264 still wins clearly. It plays on virtually every phone, TV, games console, browser and editing program made in the last 15 years.
HEVC support is broad on modern hardware but less predictable:
- Windows: playback in the built-in apps relies on the HEVC Video Extensions from the Microsoft Store. Some PCs include them from the manufacturer; otherwise there is a small charge.
- Browsers: Safari supports HEVC; Chrome and Edge can play it when the device has hardware HEVC decoding; Firefox added hardware-based HEVC playback on Windows in version 134. Support still depends on the hardware, so H.264 remains the safer choice for web video.
- Phones and TVs: recent iPhones record HEVC by default, and most smart TVs and streaming sticks from the last several years decode it. Older devices may not, or may only handle 8-bit.
- Editing: HEVC is demanding to edit, particularly 10-bit 4:2:2 camera footage, and may be slow on machines without matching hardware decoding.
Encoding speed
HEVC's extra tools mean much more work for the encoder. At comparable presets, x265 is usually several times slower than x264. You can offset this by using a faster x265 preset (which gives up some of the efficiency advantage) or by using a hardware encoder.
GPU encoders - NVIDIA NVENC, Intel Quick Sync and AMD's hardware encoders - encode both codecs in real time or faster. On many modern GPUs, HEVC hardware encoding gives a better quality-to-size ratio than H.264 hardware encoding, which makes it attractive for fast, efficient exports. Our guide to GPU video encoding on NVIDIA, Intel and AMD covers the differences.
HDR and 10-bit
If your source is HDR (HDR10, HLG or Dolby Vision), HEVC is the usual choice. Its Main 10 profile is widely supported for 10-bit playback, and it is the codec used by UHD Blu-ray and most HDR streaming. H.264 does have 10-bit profiles, but hardware decoding support for them is rare, so 10-bit H.264 files often fail to play on TVs and phones. If you need SDR output from HDR footage, see how to convert HDR video to SDR.
Even for SDR content, 10-bit HEVC can reduce visible banding in skies and dark gradients, at little cost in file size.
Licensing
Both codecs are covered by patents. H.264 licensing is relatively simple and widely absorbed by hardware and software vendors. HEVC licensing is more fragmented, with several patent pools and independent licensors, which is one reason some browsers and software were slow to support it and why royalty-free alternatives like AV1 gained momentum. For individuals encoding their own files, this rarely matters directly. If you are comparing HEVC with AV1, read AV1 vs HEVC.
Which should you use?
- Use H.264 for files you will share widely, upload to older platforms, play in any browser, or send to people whose devices you do not know.
- Use H.265 for your own library, 4K content, HDR, 10-bit footage, or when storage and bandwidth matter and your playback devices support it.
- Keep the original if it is H.264 at a reasonable bitrate. Converting to HEVC saves space, but every lossy re-encode costs a little quality.
Recommended settings
For x264, CRF 18 to 23 with the slow or medium preset covers most uses:
ffmpeg -i input.mov -c:v libx264 -crf 20 -preset slow -c:a aac -b:a 160k output.mp4
For x265, the CRF scale is different (the default is 28 rather than 23), and values around 20 to 24 are a common starting range. Adding -tag:v hvc1 helps Apple devices recognise HEVC in MP4:
ffmpeg -i input.mov -c:v libx265 -crf 22 -preset slow -tag:v hvc1 -c:a aac -b:a 160k output.mp4
For more on how compression decisions affect quality, see how to compress video without losing quality.
Doing it with Movie Encoder
Movie Encoder encodes both H.264 (x264) and H.265 (x265), plus NVIDIA NVENC, Intel Quick Sync and AMD hardware encoders when your PC supports them. It detects what your card and drivers can really encode, and its encoder benchmark helps you compare CPU and GPU options on your own machine.
To settle the question for your own footage, the Quality Lab runs real test encodes of a sample and compares VMAF, SSIM and PSNR scores, file size and encoding time side by side, so you can see what H.265 actually saves before committing a whole batch.
Frequently asked questions
Is H.265 better quality than H.264?
At the same bitrate H.265 usually looks better, or it can match H.264's quality with a smaller file. At high bitrates the difference becomes small.
Why won't my H.265 video play on Windows?
Windows' built-in apps need the HEVC Video Extensions from the Microsoft Store to play HEVC. Players such as VLC include their own decoder.
Should I convert my H.264 library to H.265?
It saves space, but each lossy re-encode costs some quality and takes time. It is usually only worth it for large, high-bitrate files you plan to keep.
