AV1 vs. H.264 vs. the Rest: A Developer's No-Nonsense Guide to Picking a Video Format in 2024
The Format War Nobody Asked For (But Everyone Has to Fight)
If you've had to make a decision about video encoding in the last 18 months, you've probably felt the whiplash. AV1 is supposedly the future. H.264 still works everywhere. HEVC has Apple's blessing but a patent licensing situation that makes lawyers nervous. VP9 is Google's thing, which means it's great on Chrome and a question mark everywhere else.
Nobody has time to become a codec expert. But the choice you make affects file sizes, encoding costs, battery drain on mobile devices, and whether your video actually plays for users on older hardware. So let's cut through the noise.
We ran hands-on encoding tests across all four major formats using a standardized test suite — a mix of high-motion sports footage, talking-head video, and screen recordings — and pulled compatibility data from real-world browser stats. Here's what the numbers actually show.
Quick Codec Cheat Sheet
Before the deep dive, a fast orientation:
- H.264 (AVC): The workhorse. Been around since 2003. Plays on literally everything. Not the most efficient, but universally supported.
- HEVC (H.265): About 40–50% better compression than H.264 at equivalent quality. Patent licensing is messy, which has slowed adoption. Strong on Apple devices.
- VP9: Google's open-source answer to HEVC. Excellent browser support (especially Chrome and Firefox). Used heavily on YouTube.
- AV1: The new open-source standard developed by the Alliance for Open Media (AOMedia). Best-in-class compression. Slow to encode. Browser support has crossed a critical threshold in 2024.
The Test Results: File Size and Encoding Time
All tests were run at 1080p targeting equivalent visual quality (VMAF score ~93). Encoding was done on a standard AWS c5.2xlarge instance using FFmpeg.
File size (relative to H.264 baseline = 100%):
| Format | Relative File Size |
|---|---|
| H.264 | 100% |
| VP9 | ~68% |
| HEVC | ~62% |
| AV1 | ~55% |
AV1 wins on compression, full stop. A file that's 100MB in H.264 comes in around 55MB in AV1 at the same perceptual quality. For a video-heavy platform, that's a massive reduction in storage costs and bandwidth.
Encoding time (relative to H.264 = 1x):
| Format | Encoding Time |
|---|---|
| H.264 | 1x |
| VP9 | ~4x |
| HEVC | ~3x |
| AV1 | ~15–25x |
And there's the catch. AV1's encoding speed is brutal with software encoders. A 10-minute video that takes 8 minutes to encode in H.264 can take 2+ hours in AV1 at high-quality settings. Hardware encoder support (via NVENC on NVIDIA GPUs, for example) closes that gap significantly — but you need to provision for it.
Browser Compatibility: Where Things Actually Stand in 2024
This is where the conversation has shifted most noticeably in the past year.
H.264: ~98% global browser support. If it plays video, it plays H.264. Non-negotiable baseline.
VP9: ~92% support. Chrome, Firefox, Edge all handle it natively. Safari added support in 2020. Solid for most use cases.
HEVC: ~75% support — but heavily skewed. Excellent on Safari/Apple ecosystem. Spotty on Chrome and Firefox without hardware decode. Don't rely on it as a primary format for general web delivery.
AV1: Has crossed ~80% browser support in 2024, driven by Chrome, Firefox, and Edge adoption. Safari added AV1 support in Safari 17 (macOS Sonoma, iOS 17). This is the milestone the industry was waiting for. AV1 is no longer a "maybe someday" format.
The Decision Tree: What Should You Actually Use?
Forget the one-size-fits-all answer. Here's how to think through it by use case:
Live Streaming
Use H.264. Encoding latency matters. AV1 and HEVC are too slow for real-time encoding without specialized hardware. H.264 with a reasonable bitrate ladder (adaptive bitrate streaming via HLS or DASH) is the right call. If you're running high-volume infrastructure and can invest in hardware encoders, VP9 is a reasonable upgrade.
On-Demand Streaming (VOD)
Use AV1 with H.264 fallback. Encode time doesn't matter as much when you're doing it once and serving forever. Offer AV1 to supported browsers (via <source> tag or adaptive bitrate manifest) and fall back to H.264. Your storage and CDN costs will thank you within a quarter.
Social Media / User-Generated Content
Use H.264 for upload acceptance, re-encode to VP9 or AV1 for delivery. Accept whatever users upload, transcode server-side. This is what every major platform does. Don't make users think about codecs.
Mobile App Video (iOS/Android)
iOS: HEVC is a strong choice given Apple's hardware decode support and the file size benefits. Android: VP9 or AV1 depending on your minimum SDK target. AV1 hardware decode is increasingly common on Android devices released since 2021.
Archival / Long-Term Storage
AV1 or HEVC. You want the best compression you can get, and you're encoding once. AV1 is the more future-proof choice given its open licensing. HEVC is fine if you're in an Apple-heavy ecosystem.
Screen Recordings / Dev Tools / Documentation
VP9 or AV1. Screen content compresses extremely well with modern codecs. A VP9 screen recording will often be 60–70% smaller than the equivalent H.264 file with zero perceptible quality difference.
The Patent Problem: Why It Still Matters
HEVC's compression numbers are genuinely impressive, but the licensing situation remains a real-world obstacle for many teams. Multiple patent pools (MPEG LA, HEVC Advance, Velos Media) each require separate licensing agreements. For a startup or mid-size company, navigating that is a headache that VP9 and AV1 simply don't create. Both are royalty-free and open. For most teams, that tips the scale.
Where This Is All Headed
AV1 is winning the long game. The open licensing, the backing of Google, Apple, Netflix, Amazon, and Microsoft through AOMedia, and the maturing hardware encoder ecosystem all point the same direction. The encoding speed problem is being solved at the silicon level — not in software.
VP9 will remain relevant for the next few years, particularly for teams already invested in it and for use cases where encoding speed matters. H.264 will be the last format anyone turns off — it's too embedded in too much infrastructure to disappear quickly.
HEVC will likely remain an Apple ecosystem format. Great on iPhone, iPad, and Mac. Not a general-purpose web standard.
The Bottom Line
If you're building something new today, design for AV1 delivery with H.264 fallback. Invest in hardware encoding infrastructure if you're doing any significant volume. Stop defaulting to H.264 everywhere just because it's familiar — you're leaving real efficiency gains on the table.
Smaller files mean cheaper storage, faster load times, and better experiences on constrained connections. In a world where mobile data costs and CDN bills are real budget line items, picking the right codec is one of the highest-leverage optimizations you can make without changing a single line of application code.