H.264 vs H.265 vs VP9 vs AV1: Which Video Codec Should You Use?

Four codecs cover almost everything you'll encounter today. They trade off in predictable ways — compression, compatibility, and encoding speed — and once you know the pattern, picking the right one is straightforward.

Updated July 2026 · 9 min read

Every video codec is chasing the same goal: the best-looking picture at the smallest file size. Newer codecs are better at it — but "better compression" always comes at a cost, usually in compatibility or encoding time. Understanding that trade-off is the whole game. Here are the four that matter, what each is genuinely good at, and how to choose.

H.264 (AVC) — the universal default

H.264, also called AVC, has been the workhorse of digital video since the mid-2000s. It's not the most efficient codec anymore, but it has one decisive advantage: it plays on essentially everything. Every phone, TV, browser, editor and social platform made in the last fifteen years has a hardware decoder for it. Encoding is well-covered too — most browsers ship a built-in H.264 encoder, which is usually hardware-accelerated, so converting into it tends to be quick as well as compatible.

That universality is why H.264 is still the right default. It produces larger files than newer codecs for the same quality, but if you want something that will "just play" for anyone you send it to, in any app, H.264 in an MP4 is the safe answer and probably always will be for a while yet.

Best for: maximum compatibility, sharing with people whose devices you don't control, uploading to platforms, anything you want to work without a second thought.

H.265 (HEVC) — smaller files, more baggage

HEVC (H.265) is H.264's successor and roughly halves the file size at the same visual quality. That's a big deal for 4K, HDR and long recordings, where H.264 files get unwieldy. Modern iPhones record in HEVC by default for exactly this reason.

The catch is twofold. First, HEVC has a tangled patent-licensing situation, which made software makers — especially browser vendors — reluctant to support it; HEVC playback on the open web is still unreliable. Second, while most devices from the last several years have hardware HEVC decoders, older ones simply don't, so an HEVC file can fail on hardware where H.264 would have worked.

Best for: shrinking large or high-resolution footage for storage on your own devices, where you know playback will happen somewhere modern (a recent phone, a good media player like VLC, an editor).

VP9 — the web's royalty-free option

VP9 is Google's codec, built to sidestep HEVC's licensing mess. Its compression is broadly in the same league as HEVC — clearly better than H.264 — and it's royalty-free, which is why YouTube leans on it heavily and why browsers support it well. If you've watched 1080p or 4K on YouTube in Chrome or Firefox, you've probably watched VP9.

Its weaknesses are practical ones: encoding VP9 is noticeably slower than H.264, and it lives almost exclusively in the WebM container, which phones, TVs and editors handle far less gracefully than MP4. Apple's hardware support has also historically lagged.

Best for: video destined for the web and browsers, and situations where you specifically want an open, royalty-free codec.

AV1 — the efficiency champion (with a catch)

AV1 is the newest of the four and the most efficient — around 30% smaller than HEVC at the same quality, and royalty-free to boot. Streaming services are adopting it because at their scale, a 30% bandwidth saving is enormous.

For an individual converting a file, though, AV1's downsides are real. Encoding it is extremely slow — often many times slower than H.264 for the same clip — and hardware decoders are still only present in fairly recent devices, so playback compatibility remains patchy. It's the future, but for one-off conversions today the encode time rarely justifies the saving.

Best for: large-scale streaming and archival where encode time is amortised across millions of views. Less compelling for ad-hoc file conversion right now.

Side by side

CodecCompressionCompatibilityEncode speedLicensing
H.264 (AVC)BaselineUniversalFastLicensed (ubiquitous)
H.265 (HEVC)~50% smallerModern devices; weak on webSlowerLicensed (complex)
VP9~50% smallerGood in browsers; weak off-webSlowRoyalty-free
AV1~65% smallerNewest; still rolling outVery slowRoyalty-free

The pattern is consistent: as you move down the list, files get smaller but you pay for it in compatibility and encoding time. There's no free lunch — only the right trade for your situation.

How to choose in one sentence

  • Sending it to someone, or unsure where it'll play? H.264 in MP4.
  • Shrinking your own 4K/HDR or long footage for storage? HEVC.
  • Publishing to the web and want royalty-free? VP9.
  • Running a streaming platform at scale? AV1 — otherwise it's usually not worth the encode time yet.
What this tool supports: OpenConvertVideo encodes to H.264, HEVC (H.265) and VP9 — the three that cover almost every real-world need. For H.264, it can also call on your browser's built-in encoder, which is usually hardware-accelerated, alongside its WebAssembly build of ffmpeg. AV1 isn't included, precisely because its encode times are impractical for in-browser, one-off conversions. Everything runs locally on your device with nothing uploaded.

The takeaway

Newer codecs compress better but cost you compatibility and time. H.264 remains the default for anything that needs to just work; HEVC and VP9 are the practical efficiency upgrades when you control where the video plays; AV1 is the future that isn't quite worth the wait for individual conversions. Match the codec to the destination and you'll never fight a file-size or playback problem you didn't choose.