codecsh264hevcvp9av1video encoding

H.264 vs HEVC vs VP9 vs AV1: The Developer's Codec Guide

17 min read Dimitar Todorov

A practical comparison of the four major video codecs — compression efficiency, encoding speed, device support, licensing costs, and when to use each.

Choosing a video codec is one of the highest-leverage decisions you will make when building a video pipeline. The codec determines three things that directly affect your costs and user experience: file size, visual quality, and encoding speed. Pick wrong and you are either burning money on CDN bandwidth or delivering pixelated video to your users.

This guide is a comprehensive comparison of the four codecs that matter in 2026: H.264, HEVC (H.265), VP9, and AV1. No marketing fluff — just data, trade-offs, and practical guidance for developers.

What is a video codec?

A video codec (compressor-decompressor) is an algorithm that compresses raw video frames into a compact format for storage and transmission, then decompresses them for playback. Without codecs, video would be impractical to deliver over the internet.

How impractical? Raw, uncompressed 1080p video at 30fps requires approximately 1.5 Gbps of bandwidth. Modern codecs compress that to 2-8 Mbps with near-invisible quality loss — a reduction of over 99.5%. The difference between codecs is how efficiently they achieve that compression, how fast they do it, and what devices can play the result.

The best codec is not the newest one. It is the one that matches your audience’s devices, your quality requirements, and your budget.

H.264/AVC — the universal standard

Released: 2003 | Also known as: AVC, MPEG-4 Part 10 | License: MPEG-LA patent pool

H.264 is the most widely deployed video codec in history. Two decades after its release, it remains the baseline that every other codec is measured against. If you encode a video in H.264 today, it will play on virtually every device manufactured in the last 15 years — smartphones, smart TVs, game consoles, in-flight entertainment systems, medical devices, and even some refrigerators.

Why H.264 endures

The codec’s longevity comes from a combination of factors:

  • Universal hardware decoding. Every major SoC (System on Chip) from Apple, Qualcomm, Intel, AMD, Samsung, and MediaTek includes dedicated H.264 decode hardware. This means playback requires minimal CPU and battery.
  • Mature encoder ecosystem. The open-source x264 encoder has been refined for nearly 20 years. It is fast, well-documented, and produces excellent quality. Hardware encoders (NVENC, QSV, VideoToolbox) are equally mature.
  • Fast encoding. On a modern 8-core CPU, x264 can encode 1080p content at roughly 120fps in software — well above real-time. This makes H.264 the cheapest codec to encode by a wide margin.
  • Predictable licensing. While H.264 is not royalty-free, the MPEG-LA patent pool has well-established, predictable licensing terms. Most developers encounter no direct licensing costs because the fees are already baked into the devices and platforms they use.

Where H.264 falls short

  • File size. At equivalent quality, H.264 files are 35-56% larger than newer codecs. At scale, this translates directly into higher CDN and storage costs.
  • 4K and beyond. H.264’s compression efficiency degrades at high resolutions. Encoding 4K content in H.264 requires significantly higher bitrates than HEVC or AV1 for the same quality.
  • No meaningful improvement ahead. H.264 is a finished standard. There will be no future efficiency gains — only newer codecs will improve on it.

Verdict: H.264 is the safe default. When device compatibility is your top priority, or when encoding speed and cost matter more than file size, H.264 is the right choice.

HEVC/H.265 — the compression king

Released: 2013 | Also known as: H.265, MPEG-H Part 2 | License: Three patent pools (MPEG-LA, HEVC Advance, Velos Media)

HEVC was designed as the direct successor to H.264, targeting a 30-40% reduction in bitrate at equivalent visual quality. It achieved that goal, and for 4K and HDR content specifically, it became the dominant codec in professional broadcasting and OTT streaming.

HEVC’s strengths

  • Excellent compression. At VMAF 93 (the threshold most viewers consider “excellent”), HEVC achieves roughly 0.64x the bitrate of H.264 at 1080p. The savings are even greater at 4K.
  • HDR ecosystem. HEVC has the most mature HDR support among all codecs, including HDR10, HDR10+, Dolby Vision, and HLG. If you are delivering premium HDR content, HEVC is the most battle-tested option.
  • Apple ecosystem. HEVC has native hardware decode and encode support across all Apple devices from iPhone 7 onwards, all Apple TVs from 4K onwards, and all Macs with Apple Silicon. Safari supports HEVC natively.
  • Smart TV dominance. Nearly every smart TV sold since 2016 includes HEVC hardware decoding. For living room streaming, HEVC is the practical standard.

The patent licensing problem

HEVC’s biggest weakness is not technical — it is legal. Unlike H.264’s single patent pool, HEVC patents are split across three separate licensing organizations:

  1. MPEG-LA — the traditional pool, covering the core patents
  2. HEVC Advance — a second pool formed by patent holders who felt MPEG-LA’s terms were insufficient
  3. Velos Media — a third pool (now partially merged with Access Advance) with additional patent claims

This fragmentation creates real uncertainty for developers. The total licensing cost is difficult to calculate, and the risk of patent claims from holders outside all three pools is non-trivial. This is the primary reason Firefox and Chromium on desktop do not include HEVC support by default — the browser vendors do not want the licensing exposure.

Browser support reality

Browser HEVC Support
Safari (macOS, iOS) Full support
Chrome (Windows, macOS) Hardware decode only, requires OS codec
Chrome (Linux) No support
Firefox No support
Edge Hardware decode only, via Windows codec

This fragmented browser support means HEVC alone is insufficient for web-based video. You need H.264 as a fallback, and ideally VP9 or AV1 for browsers that do not support HEVC.

Verdict: HEVC is ideal when you control the playback environment — iOS apps, Apple TV apps, smart TV apps, or OTT platforms with known device profiles. For the open web, it must be paired with other codecs.

VP9 — Google’s royalty-free answer

Released: 2013 | Developed by: Google | License: Royalty-free (BSD-style)

Google developed VP9 as a royalty-free alternative to HEVC, driven by the practical need to reduce bandwidth costs across YouTube — which accounts for a significant percentage of global internet traffic.

VP9’s position in the market

  • YouTube’s backbone. YouTube uses VP9 as its primary codec for most content, falling back to H.264 only on devices without VP9 support.
  • Excellent browser support. Chrome, Firefox, Edge, and Opera all support VP9 with hardware acceleration on supported devices. Safari added VP9 support in recent versions.
  • Compression efficiency. VP9 achieves roughly 0.68x the bitrate of H.264 at equivalent quality — slightly behind HEVC’s 0.64x, but in the same ballpark.
  • Royalty-free. No patent pools, no licensing fees, no legal uncertainty. This is a significant advantage for any company concerned about intellectual property risk.

VP9’s limitations

  • Encoding speed. The reference encoder (libvpx-vp9) is notably slow. On an 8-core CPU, expect roughly 15fps for 1080p encoding in software — about 8x slower than H.264.
  • Limited HDR adoption. While VP9 technically supports HDR (VP9 Profile 2), it has not seen significant HDR adoption outside of YouTube.
  • iOS ecosystem. While Safari now supports VP9, hardware decode support on older iPhones is absent. iOS devices before iPhone 15 will software-decode VP9, increasing battery drain.
  • Superseded by AV1. With AV1 offering significantly better compression and the same royalty-free licensing, VP9’s role as the “free alternative” is being taken over by its successor.

Verdict: VP9 is a strong choice for web-first video platforms where royalty-free licensing matters. It offers a good balance of compression, compatibility, and legal simplicity. However, for new projects, AV1 is increasingly the better long-term bet.

AV1 — the future of video

Released: 2018 | Developed by: Alliance for Open Media (AOM) | License: Royalty-free

AV1 represents a generational leap in video compression. Developed by the Alliance for Open Media — whose founding members include Google, Mozilla, Netflix, Amazon, Apple, Microsoft, Meta, Intel, and AMD — AV1 was designed to be the definitive royalty-free codec.

Adoption at scale

AV1 is not a theoretical improvement. It is already deployed at massive scale:

  • Netflix: Over 30% of all Netflix streaming traffic uses AV1
  • YouTube: Over 75% of YouTube views are served in AV1 on supported devices
  • Meta: Over 70% of video on Facebook and Instagram uses AV1 encoding
  • Twitch, Disney+, and others are actively rolling out AV1 support

Compression efficiency

AV1’s headline number is a 30-50% bitrate reduction compared to HEVC at equivalent visual quality. In practice, the savings depend on content type and resolution, but the numbers are consistently impressive:

  • At 1080p and VMAF 93, AV1 achieves roughly 0.44x the bitrate of H.264
  • For 4K content, the gap widens further due to AV1’s superior handling of high-frequency detail
  • AV1’s film grain synthesis feature can reconstruct film grain at the decoder, saving additional bitrate for cinematic content

Hardware decode support

AV1 hardware decoding has reached a tipping point. As of 2026, the following chips include dedicated AV1 decode hardware:

  • Intel: 11th generation (Tiger Lake) and newer
  • Apple: M3, M4, A17 Pro and newer
  • Qualcomm: Snapdragon 8 Gen 1 and newer
  • Samsung: Exynos 2200 and newer
  • AMD: RDNA 3 (RX 7000 series) and newer
  • NVIDIA: RTX 30 series and newer
  • MediaTek: Dimensity 1000 and newer

This covers the majority of devices sold in the last 2-3 years, and the percentage grows with every new device generation. By 2027, AV1 hardware decode will be effectively universal on new devices.

The encoding cost trade-off

AV1’s main disadvantage is encoding speed. The most widely used encoder, SVT-AV1 (developed by Intel and Netflix), achieves roughly 8fps on an 8-core CPU for 1080p content — about 15x slower than H.264.

This matters for two reasons:

  1. Higher compute costs per minute of video encoded. Cloud encoding of AV1 is more expensive than H.264 or HEVC.
  2. Not suitable for real-time encoding. Live streaming in AV1 requires hardware encoders or dedicated silicon, which is still emerging.

However, for video-on-demand workflows — where you encode once and serve millions of times — the encoding cost is amortized across every view. The CDN savings from AV1’s smaller file sizes typically outweigh the higher encoding cost after just a few hundred views.

What about AV2?

The Alliance for Open Media is developing AV2 as AV1’s successor, targeting another 30%+ compression improvement. Hardware decode support for AV2 is expected to appear in devices starting in 2026-2027, with broad adoption likely by 2029-2030. For now, AV1 is the production-ready choice.

Verdict: AV1 is the best codec for VoD platforms operating at any meaningful scale. The encoding cost premium is real, but the bandwidth savings, royalty-free licensing, and industry momentum make it the clear long-term winner.

Compression efficiency compared

The following table shows the relative bitrate needed to achieve VMAF 93 (perceptually excellent quality) for each codec. VMAF 93 is the threshold most streaming platforms target — read more about quality metrics in Why I Built Transcodely.

Codec 1080p Bitrate 4K Bitrate Relative Size Bandwidth Savings vs H.264
H.264 5.0 Mbps 16.0 Mbps 1.00x (baseline)
HEVC 3.2 Mbps 10.0 Mbps 0.64x 36% smaller
VP9 3.4 Mbps 10.5 Mbps 0.68x 32% smaller
AV1 2.2 Mbps 7.0 Mbps 0.44x 56% smaller

These numbers are approximate and vary by content type. Fast-motion content (sports, gaming) tends to show larger differences between codecs, while static content (interviews, presentations) shows smaller gaps.

At scale, these differences are enormous. If you serve 1 million hours of 1080p video per month:

  • H.264: ~2,250 TB of bandwidth
  • AV1: ~990 TB of bandwidth
  • Savings: 1,260 TB/month (at $0.02/GB, that is roughly $25,200/month in CDN costs alone)

Encoding speed comparison

Compression efficiency comes at a computational cost. More advanced codecs require more processing time per frame:

Codec Encoder Approx. Speed (1080p, 8-core CPU) Relative to H.264
H.264 x264 ~120 fps 1.0x (baseline)
HEVC x265 ~30 fps 4x slower
VP9 libvpx-vp9 ~15 fps 8x slower
AV1 SVT-AV1 ~8 fps 15x slower

Hardware encoders (NVENC, Intel QSV, Apple VideoToolbox) significantly accelerate H.264 and HEVC encoding, often achieving 2-5x the software speed. AV1 hardware encoding is available on newer GPUs but does not yet match software encoder quality at equivalent bitrates.

For VoD workflows, encoding speed matters primarily as a cost factor — slower encoding means more compute time, which means higher cloud bills. For live streaming, it determines whether real-time encoding is even possible for a given codec.

Device and browser support matrix

This matrix reflects the state of hardware decode support as of early 2026:

Platform H.264 HEVC VP9 AV1
iOS (iPhone 15+) Yes Yes Yes Yes
iOS (older) Yes Yes Software only No
Android (2022+) Yes Yes Yes Yes
Android (older) Yes Partial Yes Partial
Chrome (desktop) Yes OS-dependent Yes Yes
Safari (macOS) Yes Yes Yes Yes (macOS 14+)
Firefox (desktop) Yes No Yes Yes
Smart TVs (2020+) Yes Yes Partial Partial
Smart TVs (older) Yes Yes Rare No
Game consoles Yes Yes Partial Partial

The key takeaway: no single codec covers 100% of devices. H.264 comes closest to universal support, but at the cost of larger files. To reach all users with optimal quality, you need a multi-codec strategy.

Licensing costs

Codec licensing is one of the least understood aspects of video engineering. Here is the current landscape:

H.264

Licensed through a single MPEG-LA patent pool. Terms are well-established and predictable. Free for internet video that is free to end users (the “internet broadcast exemption”). Paid distribution has a cap of $6.5M/year per licensee.

HEVC

Split across three patent pools, creating significant complexity:

  1. MPEG-LA — $0.20 per unit (capped at $25M/year)
  2. HEVC Advance (Access Advance) — royalty rates vary by use case, generally $0.40-$0.80 per unit
  3. Velos Media — additional royalties, partially merged into Access Advance

Total licensing cost for a hardware manufacturer or platform can reach $1.00+ per device. The fragmentation and unpredictability have driven browser vendors away from native HEVC support and fueled the industry’s push toward royalty-free alternatives.

VP9

Royalty-free. Google released VP9 under a BSD-style license with a patent grant. There have been some patent challenges (notably from Nokia), but Google has defended the royalty-free status successfully.

AV1

Royalty-free with strong industry backing. The Alliance for Open Media’s patent license provides a defensive patent grant — members cannot assert video codec patents against each other. With Apple, Google, Microsoft, Amazon, Netflix, Meta, Intel, and AMD all as members, the coverage is comprehensive.

For developers, the practical implication is clear: H.264 and AV1/VP9 have no direct licensing cost in most scenarios. HEVC is the outlier with real, unpredictable costs.

The multi-codec strategy

In production, serious video platforms do not pick a single codec. They encode each piece of content in multiple codecs and let the player select the best option based on the viewer’s device capabilities and network conditions.

This is what adaptive streaming protocols (HLS and DASH) are designed for. Your manifest file lists renditions across codecs, resolutions, and bitrates. The player dynamically selects and switches between them.

CMAF: the unified approach

Common Media Application Format (CMAF) takes this further by using a single set of fMP4 segments that can be referenced by both HLS and DASH manifests. Instead of encoding separate segment formats for each protocol, you encode once and generate two manifest files pointing to the same segments.

This halves your storage requirements compared to maintaining separate HLS (TS segments) and DASH (fMP4 segments) renditions, while supporting both Apple and non-Apple devices.

With Transcodely, you can set your output format to ADAPTIVE to generate CMAF output with both HLS and DASH manifests automatically:

const job = await client.createJob({
  source_url: "https://storage.example.com/raw/video.mp4",
  outputs: [
    {
      codec: "H264",
      resolution: "1080p",
      quality_tier: "STANDARD",
      format: "ADAPTIVE"
    },
    {
      codec: "HEVC",
      resolution: "1080p",
      quality_tier: "STANDARD",
      format: "ADAPTIVE"
    },
    {
      codec: "AV1",
      resolution: "1080p",
      quality_tier: "STANDARD",
      format: "ADAPTIVE"
    }
  ],
  webhook_url: "https://api.example.com/hooks/transcode"
});

The player on the viewer’s device will receive the manifest, check which codecs it supports, and automatically select the most efficient one — AV1 on modern devices, HEVC on Apple devices without AV1, and H.264 everywhere else.

Decision framework: which codec to use

Start with your audience

If your audience is… Primary codec Secondary codec Reasoning
Global, all devices H.264 AV1 Maximum compatibility + best compression for modern devices
Web browsers (desktop) AV1 H.264 Chrome/Firefox/Edge all support AV1; H.264 fallback for older browsers
Apple ecosystem HEVC H.264 Native hardware support across all Apple devices
Android-first AV1 VP9 Strong hardware support on recent Android SoCs
Smart TVs / OTT HEVC H.264 Best TV hardware support; H.264 for older models
Cost-sensitive (encoding budget) H.264 VP9 Fastest/cheapest to encode; VP9 adds compression savings
Cost-sensitive (CDN budget) AV1 H.264 Smallest files; H.264 fallback for compatibility

The pragmatic recommendation

For most developers building a new video platform in 2026:

  1. Encode H.264 as your universal baseline. Every device plays it. This is your fallback.
  2. Add AV1 for modern devices. The bandwidth savings justify the encoding cost for any content viewed more than a few hundred times.
  3. Consider HEVC if you have a large Apple/smart TV audience and the licensing complexity does not concern you.
  4. Use CMAF output to serve both HLS and DASH from the same encoded segments.

This three-codec strategy (H.264 + AV1 + optionally HEVC) gives you universal reach with optimal quality and file size. Transcodely makes this straightforward — define your codec ladder once in a preset, and every job produces the full set of renditions.

Transcodely codec pricing

For reference, here is what each codec costs to encode with Transcodely at 1080p:

Codec Price per minute (1080p) Relative cost
H.264 EUR 0.01 1.0x
HEVC EUR 0.015 1.5x
VP9 EUR 0.015 1.5x
AV1 EUR 0.04 4.0x

No hidden multipliers, no normalized minutes, no minimum commitments. Failed jobs are not charged. For a detailed cost comparison with other providers, see Video Transcoding Pricing Compared.

Summary

H.264 HEVC VP9 AV1
Released 2003 2013 2013 2018
Compression (vs H.264) Baseline 36% smaller 32% smaller 56% smaller
Encoding speed Fast Moderate Slow Very slow
Device support Universal Modern + Apple Browsers + Android Modern (2022+)
Licensing MPEG-LA 3 patent pools Royalty-free Royalty-free
HDR support Limited Excellent Limited Good
Future outlook Stable/declining Stable Declining (AV1 replacing) Growing rapidly

The codec you choose has a direct, measurable impact on your infrastructure costs, your users’ experience, and your platform’s technical debt. Choose deliberately, encode in multiple formats when the economics justify it, and let the player pick the best option for each viewer.

Topics

codecsh264hevcvp9av1video encoding

Share this article