
On this page 14 sections
Every video you watch online was compressed with a codec, and the codec quietly decides how good it looks, how big the file is, and whether your device can play it at all. Three codecs dominate today: H.264 (AVC), the universal workhorse; H.265 (HEVC), its more efficient successor; and AV1, the royalty-free newcomer backed by Google, Netflix, Amazon, Apple and others. VP9, Google’s earlier codec, sits in between.
This comparison explains how they differ, what each one is good for, and how to decide which to use.
What a codec does
A codec (coder-decoder) compresses video by removing information that is redundant or unlikely to be noticed. It predicts each block of a frame from nearby blocks and from previous and future frames, then stores only the differences. Newer codecs have more tools for prediction and larger, more flexible block sizes, so they can describe the same picture in fewer bits. The price is more computation, especially when encoding.
Quick comparison
| H.264 / AVC | H.265 / HEVC | VP9 | AV1 | |
|---|---|---|---|---|
| Released | 2003 | 2013 | 2013 | 2018 |
| Developed by | ITU-T / MPEG | ITU-T / MPEG | Alliance for Open Media | |
| Efficiency vs H.264 | Baseline | ~30–50% smaller | ~30–40% smaller | ~40–55% smaller |
| Licensing | Patent pools, royalties for some uses | Multiple patent pools, complex | Royalty-free | Royalty-free |
| Hardware decode | Almost universal | Wide on 2016+ devices | Wide on Android, Chrome devices, TVs | Growing; most 2021+ chips |
| Encoding speed | Fast | Slower | Slower | Slowest (improving) |
| Browser support | All | Safari; Chrome and Edge with hardware | Chrome, Firefox, Edge; Safari partial | Chrome, Firefox, Edge; Safari on devices with hardware decode |
| Max practical use | Up to 4K | Up to 8K, HDR | Up to 8K, HDR | Up to 8K, HDR |
Efficiency figures vary with content, resolution and encoder. They are rough guides, not guarantees.
H.264 (AVC): the universal default
H.264, also called AVC or MPEG-4 Part 10, has been the most widely used video codec in the world for more than a decade. Nearly every phone, browser, TV, set-top box, game console and editing tool can decode it, almost always in hardware.
Strengths
- Universal compatibility, including very old devices.
- Fast, mature encoders, such as x264 and every GPU’s hardware encoder.
- Accepted by every upload platform and social network.
Weaknesses
- Least efficient of the modern options. At 4K it needs high bitrates to look good.
- Patent licensing applies for some commercial uses, although free internet video to end users has generally been royalty-free under the MPEG LA licence terms.
Use it when compatibility is the priority: sharing files, uploading to platforms, and as the fallback rendition in every streaming ladder.
H.265 (HEVC): efficient but complicated
HEVC delivers similar quality to H.264 at roughly 30 to 50 percent lower bitrate, with bigger gains at higher resolutions. It supports 10-bit colour and HDR formats well, which made it the standard codec for 4K Blu-ray, 4K broadcast and most 4K streaming on TVs.
Strengths
- Much more efficient than H.264, especially at 4K and for HDR.
- Hardware decoding on most devices since about 2016: iPhones, Macs, modern Android phones, smart TVs, streaming sticks and GPUs.
- The default recording format on iPhones and many cameras.
Weaknesses
- Licensing is fragmented across several patent pools and independent holders, which slowed adoption on the web.
- Browser support is uneven. Safari supports it. Chrome and Edge support it when the device has a hardware decoder. Firefox support is limited.
- Encoding is slower than H.264.
Use it when you are delivering 4K or HDR to TVs and Apple devices, or archiving footage. In web streaming, offer it as an extra rendition alongside H.264, not a replacement.
VP9: Google’s stepping stone
VP9 is Google’s royalty-free codec, used heavily by YouTube. Its efficiency is roughly comparable to HEVC. It is supported by Chrome, Firefox, Edge, Android and many smart TVs, and Safari added support in later versions.
VP9 is still widely used, but for new projects most teams now look at AV1 instead, since it is also royalty-free and more efficient.
AV1: the royalty-free future
AV1 was developed by the Alliance for Open Media, whose members include Google, Netflix, Amazon, Apple, Microsoft, Meta, Intel, NVIDIA, AMD and others. It was designed to be royalty-free and to beat HEVC on efficiency.
Strengths
- Very efficient, typically matching or exceeding HEVC, and around 40 to 55 percent smaller than H.264 at similar quality.
- Royalty-free licensing from its members.
- Growing hardware decode support: most new Android flagships since about 2021, recent Intel, AMD and NVIDIA GPUs, Apple’s A17 Pro and M3 chips and newer, and many 2021+ smart TVs and streaming devices.
- Supported by YouTube, Netflix, Meta and many others at scale.
Weaknesses
- Encoding is slow in software, though encoders such as SVT-AV1 have improved dramatically, and hardware AV1 encoders are now in recent GPUs.
- Older devices cannot decode it, or decode it only in software, which drains battery on phones and laptops.
Use it when you serve large audiences and bandwidth costs matter, as an additional rendition for devices that support it in hardware. For uploads and archives, it is excellent if your tools and devices support it.
What about H.266 / VVC?
Versatile Video Coding (VVC), finalised in 2020, is the successor to HEVC and is more efficient still. Its adoption has been slow due to limited hardware support and licensing questions. For most projects today it is not yet practical, but it is worth watching for broadcast and 8K.
Which codec should you use?
For sharing files and uploads
Use H.264. Every platform accepts it and every device plays it. YouTube, Vimeo, Instagram and TikTok all re-encode uploads anyway, so higher-bitrate H.264 is the safest choice. If a platform accepts HEVC or AV1 and you want smaller uploads, that works too.
For web streaming (HLS or DASH)
Use a multi-codec ladder:
- H.264 renditions for universal coverage.
- HEVC renditions for Apple devices and smart TVs, especially for 4K and HDR.
- AV1 renditions for modern Android, Chrome and TVs with hardware decode.
The player picks the best codec each device can handle, using the codec information in the manifest. Test devices with our codec support checker. Our adaptive bitrate guide explains how players choose.
If you have a small audience, H.264 alone is fine. The extra encoding and storage for HEVC and AV1 only pays off when bandwidth savings add up.
For 4K and HDR
Use HEVC or AV1 with 10-bit colour. H.264 is technically capable of 4K but inefficient, and HDR support is limited.
For live streaming
Most ingest still uses H.264 because of encoder support and platform requirements. Some platforms now accept HEVC and AV1 ingest, notably with newer OBS versions and GPU encoders, which can improve quality at the same upload bandwidth. Check your platform’s current recommendations.
For archiving
Use HEVC or AV1 at a high quality setting, or keep the camera originals. Storage is cheaper than regret.
Encoding speed in practice
On a typical desktop CPU, encoding 1080p in software:
- x264 (H.264), preset medium: often faster than real time.
- x265 (HEVC), preset medium: several times slower than x264.
- SVT-AV1, a middle preset: comparable to or slower than x265, depending on the preset.
GPU hardware encoders (NVENC, Quick Sync, AMF, VideoToolbox) are much faster for all three, at some cost in efficiency. For a single export, software encoding is usually worth the wait. For large libraries, cloud encoders and hardware encoding make AV1 practical.
Checking what codec a video uses
- MediaInfo shows the format (AVC, HEVC, AV1), profile, bit depth and more.
- VLC: Tools → Codec Information.
- FFprobe:
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,profile,pix_fmt -of default=nw=1 input.mp4
In streaming manifests, codec strings reveal the codec: avc1 for H.264, hvc1 or hev1 for HEVC, vp09 for VP9, and av01 for AV1. Our M3U8 analyzer lists these for every rendition.
Hardware encoders for each codec
If you encode on a GPU, check which codecs it supports:
- NVIDIA NVENC: H.264 and HEVC on most cards since the GTX 900/1000 series; AV1 encoding on RTX 40 series and newer.
- Intel Quick Sync: H.264 and HEVC on most recent CPUs with integrated graphics; AV1 encoding on Arc GPUs and newer integrated graphics.
- AMD AMF: H.264 and HEVC widely; AV1 encoding on Radeon RX 7000 series and newer.
- Apple VideoToolbox: H.264 and HEVC on Macs and iPhones; ProRes on higher-end models.
Hardware AV1 encoding has made AV1 practical for live streaming and quick exports, not just slow offline encodes.
What we would do for three common projects
A small course site with 200 lessons. Encode H.264 only. The storage and encoding time for a second or third codec are not worth it at this size, and every student’s device will play the files. Use the bitrate calculator to size your uploads, and follow our compression guide for settings.
A regional streaming service with a few hundred thousand monthly viewers. Add HEVC renditions for the top of the ladder, because smart TVs and Apple devices make up much of the long-session viewing, and those are exactly the devices with hardware HEVC. Keep H.264 as the baseline. Revisit AV1 once your analytics show a big share of AV1-capable devices.
A large platform with high CDN bills. Encode H.264, HEVC and AV1. At this scale a 30 percent cut in delivered bits pays for the extra encoding many times over. Use per-title encoding so easy content does not waste bits in any codec, and let each device pick the best codec it decodes in hardware.
A note on quality comparisons
Online codec comparisons often disagree, because results depend on the encoder, the preset, the content and the metric. Treat any single chart with care. The reliable way to decide is to encode ten minutes of your own footage with each codec at matching quality targets, then compare file sizes and watch the results on the screens your viewers actually use. Check playback on each target device with the codec support checker first.
Summary
H.264 is the universal default: use it for compatibility. HEVC is roughly a third to a half more efficient and is the standard for 4K and HDR on TVs and Apple devices. AV1 is royalty-free and the most efficient mainstream option, with hardware support now common on new devices. For streaming at scale, offer all three and let each device choose. For everyday files, H.264 remains the safe choice. To shrink files with any of them, see how to compress video without losing quality.
Frequently asked questions
Is AV1 better than HEVC?
In compression efficiency, AV1 is typically equal to or somewhat better than HEVC, and it is royalty-free. HEVC has broader hardware support on older devices, especially Apple devices and TVs from before about 2020.
Why is H.264 still used everywhere?
Because almost every device made in the last 15 years can decode it in hardware, and it is fast to encode. For compatibility, nothing beats it.
Does YouTube use AV1?
Yes. YouTube serves AV1 to many devices that support it, along with VP9 and H.264 for others.
What is H.266 / VVC?
Versatile Video Coding (VVC) is the successor to HEVC, finalised in 2020. It is more efficient still, but device support is very limited so far.


