Video codecs are the software or hardware that compress digital video so it can be stored and sent, then decompress it so it can be played. Most of them are lossy. They discard information the viewer is unlikely to miss, so the decoded picture never matches the source exactly. At streaming scale, the codec you pick drives three costs at once: the bitrate you send, the encode cost and which devices can decode the result. That makes codec choice an economics decision limited by your viewers’ devices, not a search for the most efficient format.
Ladder design, quality floors and the full per-stream cost model are covered in our guide to transcoding cost trade-offs. The sections below stay with the codec itself: what it does, how the main four compare, and where each one moves the bill.
How Does a Video Codec Turn Raw Frames into Something You Can Stream?
A codec exists because raw video is far too large to store or transmit uncompressed. One 1920×1080 frame at 4 bytes per pixel is 8,294,400 bytes, so a second of HD at 30 frames per second comes to about 249 MB. A codec cuts that down in two ways. Spatial compression removes redundancy inside a frame, for example with a discrete cosine transform followed by quantisation. Temporal compression removes redundancy between frames through motion estimation and compensation, and it costs more compute.
HEVC replaced H.264’s 16×16 macroblocks with coding tree units of up to 64×64 that can be split into variable-sized blocks. Those HEVC improvements need much more signal processing to encode but have less impact on the computation needed to decode.
A codec standard defines the bitstream and its decoding, not the encoder. Different encoders, and different settings on the same encoder, produce different sizes and quality from the same source. Engineers usually treat the trade-off between compression, speed and fidelity as the main measure of a codec’s technical merit.
Is H.264 the Same Thing as MP4? Codec, Container and Bitstream
No. H.264 is a codec and MP4 is a container. The codec defines how the pixels inside a track are compressed. The container is a file format that holds one or more media streams (video, audio, subtitles) together with metadata so they can be stored and played together. The bitstream is what the encoder outputs: the compressed video data that the container carries and the decoder reads. MP4 is popular because it can hold several of the most widely used codecs. So “H.264 in MP4” and “AV1 in MP4” are the same box with different contents that need different decoders.
Apple’s HLS authoring spec allows H.264 in fragmented MP4 or MPEG transport streams, but requires fragmented MP4 for HEVC. Even so, codec choice drives bitrate, encode cost and decoder reach far more than container choice does.
This distinction explains the “video codec not supported” error. The player could open the container but has no decoder for the codec, profile or bit depth inside it. Safari plays AV1 only on devices with a hardware decoder (M3 MacBooks and later, iPhone 15 Pro, iPhone 16 and later). Chrome on Windows 8+ supports HEVC on devices with hardware support. In one 2026 dataset, 10-bit AV1 decode support was about 91%, the same as 8-bit, while 10-bit encode support fell to about 8%.
How Do H.264, HEVC, VP9 and AV1 Compare as Video Codecs?
The table summarises what the sources support. Read the efficiency column as a range from published comparisons, not a promise for your content.
| Codec (first spec) | Compression efficiency | Hardware decode reach | Licensing |
|---|---|---|---|
| H.264 / AVC (2003) | Baseline for comparison | Close to 100% of smartphones; universal in browsers | Patent pool; Via LA charges no fee for internet video that is free to end users |
| HEVC / H.265 (2013) | 25–50% fewer bits than H.264 at the same quality | Safari natively; Chromium and Firefox largely depend on hardware decode | Several patent pools; combined fees higher than AVC |
| VP9 (2013) | About 20% less efficient than HEVC in Netflix’s 2016 test; tuned encoders narrow or reverse the gap | All major browsers | Open and royalty-free |
| AV1 (2018) | More than 30% fewer bits than VP9; about 30% better than VP9 and HEVC in Meta’s production use | About 91% decoder support across sessions in a 2026 dataset; Safari only with an AV1 hardware decoder | Royalty-free licence from AOMedia, now challenged by pools and litigation |
A study using libx265 and libvpx-vp9 found HEVC better than VP9 at every frame rate and QP level tested, and Netflix’s 2016 test found libvpx about 20% less efficient than x265. An EPFL subjective test from 2014 found HEVC needed 49.4% less bitrate than VP9 for the same quality. Yet by October 2016 Netflix also found that tuning encoding parameters could “reduce or even reverse the gap between VP9 and HEVC”. A 2017 Streaming Media comparison, with settings reviewed by each encoder’s vendor, found VP9 and two HEVC encoders performed very similarly. They show that encoder configuration can matter as much as the codec generation, which is why no single percentage should be carried into a budget.
Vendor figures need the same caution. NVIDIA reports that its NVENC AV1 encoder reaches 42 dB PSNR at 7 Mbps, where NVENC H.264 needs 11 Mbps, about a 40% saving at 1080p60. If you need a refresher on what bitrate is and how it relates to quality, start there before comparing codecs by bitrate saved. The encoder-level detail of the HEVC row is covered in HEVC encoding explained.
Why the Viewer Device Mix Decides, Not the Most Efficient Codec
A more efficient codec only saves money on plays that can actually decode it, and decode capability is spread unevenly across your audience. AV1 hardware decode is present in most modern high-end mobile SoCs, but support in mid- and low-tier SoCs is limited. Phones without it can decode AV1 in software with the open-source dav1d decoder, at the cost of extra CPU use, more battery drain and no L1 DRM. That last point is decisive for premium catalogues, because the trusted environment needed to play licensed films and series can only be built on a hardware decoder.
The sources disagree on how much fallback you still need. An analysis of about 7.6 million sessions of one browser video tool, free.upscaler.video, found that AV1 plus HEVC covered 99.6% of sessions for decode. Its authors concluded that a fallback to H.264 was unnecessary. A CDN engineering guide from the same year takes the opposite view: H.264 is still the only codec you can ship without a fallback, so every newer codec is an addition to it. We find the second view safer for a general audience. The first dataset measures users of one browser-based video tool, a population that probably skews towards capable hardware. Your own player telemetry settles the question better than either source.
The answer is a second ladder, not a swap. AV1 is ready to supplement H.264, not replace it, with H.264 kept as the universal fallback. Gate AV1 renditions on the hardware decode capability the player reports, not on the browser name. Meta is experimenting with a mixed-codec manifest, in which a low-end phone plays AV1 up to 540p and switches to VP9 for higher-resolution lanes.
How Do Licensing and Patent-Pool Costs Add to a Codec’s Total Cost?
Through MPEG LA, HEVC carried a fee of $0.20 per device after the first 100,000, with a $25 million annual cap. The AVC equivalent was $0.10 per device with a $6.5 million cap. HEVC Advance went further and reintroduced fees on encoded content. Its initial licence had a maximum of US$2.60 per device in Region 1 countries and a content royalty of 0.5% of revenue from HEVC video services. HEVC Advance waives royalties on software-only implementations that are not bundled with hardware, but that waiver does not free them from other patent holders, such as members of the MPEG LA pool.
Access Advance says its HEVC pool covers more than 27,000 patents. It also announced a 25% rate rise for new licensees from 1 January 2026, while licensees who signed by 31 December 2025 could lock current rates through 2030. MDN notes that Via LA charges HEVC fees to developers rather than to content producers and distributors.
Licensing fees are one of the main reasons HEVC adoption has stayed low on the web. They are also why Amazon, AMD, Apple, Google, Intel, Microsoft, Mozilla, Netflix, NVIDIA and others joined the Alliance for Open Media, which finalised AV1. Since November 2025, Dell and HP have said they will disable HEVC hardware decoding in firmware on some entry-level and mid-range laptops because of HEVC licence fee increases.
Royalty-free does not mean free of risk. AV1’s AOMedia patent licence is a no-charge, royalty-free, irrevocable grant covering its members’ necessary claims. However, Dolby has sued Snap, arguing that AV1 implementations use Dolby inventions never licensed on royalty-free terms, and that AOMedia does not control every patent AV1 relies on. Access Advance and Sisvel have both assembled AV1 pools despite AOMedia’s objections. Access Advance’s VDP Pool targets streaming services across HEVC, the VVC codec, VP9 and AV1. We would model AV1 licensing as a contingent exposure, not zero. The legal reading belongs with your counsel, not your encoding team.
How Does Codec Choice Change Transcoding Cost and GPU Encode Time?
Transcoding turns each source into multiple representations at different resolutions, bitrates and frame rates. Every extra codec repeats that whole set.
In the AV1 technical overview, the reference AV1 encoder needed 34.6 to 39.6 times VP9’s encoding complexity at high-compression settings, and about three times VP9’s decode complexity. Meta reports that SVT-AV1’s M8 preset matches libvpx-vp9 preset 0 on efficiency while running almost ten times faster. A 2026 BlazingCDN guide places SVT-AV1 presets 8–10 in the same throughput band as x265 medium/slow, with roughly 20–30% better BD-rate on typical entertainment content.
NVIDIA’s NVENC encodes H.264, HEVC 8-bit and 10-bit, and AV1 8-bit and 10-bit. AV1 encoding arrived with the Ada Lovelace generation, which supports up to three encoders per GPU. NVENC presets p1 to p7 trade speed for quality, with higher presets taking more processing time. Lookahead improves rate control but uses extra video memory in proportion to its depth. Split-frame encoding, which encodes each frame in parallel across multiple NVENC engines, works for HEVC and AV1 but not H.264. NVIDIA recommends HEVC over H.264 for 4K60 streaming and notes that AV1 compresses better but needs a platform compatibility check. On GPUs that are not qualified for it, concurrent encode sessions are capped at 8 per system.
The 2026 BlazingCDN guide estimates 12–20 real-time 1080p30 AV1 streams on one current datacentre GPU with dual encode engines. It puts a 64-core CPU server running SVT-AV1 preset 8 at 6–10 streams. The same guide prices managed cloud transcoding at roughly $1.00–$1.45 per output hour and self-hosted GPU or VPU encoding at $0.05–$0.10 amortised, with the crossover typically between 2,000 and 5,000 output hours a month. A warehouse-scale system built on video coding units delivered 8× to 20× the offline two-pass encoding throughput of software, for H.264 and VP9 respectively. The unit-cost comparison itself is worked through in when GPU transcoding beats CPU transcoding on unit cost.
Underneath all of this is a three-way constraint. Meta, Vodafone and YouTube’s 2025 white paper states it plainly: quality, file size and encoding compute trade against each other, and improving one regresses at least one of the others.
Worked Example: What an AV1 Ladder Saves and What It Adds
This example reproduces a published cost model. Its 35% size saving is the source’s own estimate, not a measurement.
- Assumptions: 300 TB of monthly egress; 60% of views move to an AV1 ladder estimated to be 35% smaller.
- Egress saved: 300 × 0.6 × 0.35 = 63 TB a month.
- Storage added: a second ladder of about 7.2 TB (11.1 TB × 0.65).
- Compute added: a software AV1 encode that typically runs several times slower than x264 at comparable presets.
The example’s main lesson is that the saving scales with the share of views that can play AV1, while the storage and encode costs are paid in full on day one.
When a Newer Codec Pays off, and When It Regresses
A newer codec pays off when egress dominates your costs, when a large share of watch time lands on devices that hardware-decode it, and when the content is watched enough to repay the heavier encode. Meta’s approach shows that last condition in practice. Every upload gets a hardware AVC encode, and the more expensive software AVC, VP9 or AV1 encodes run only once projected watch time crosses a threshold. After deploying AV1 for Reels on iPhones, Meta reported a 12% drop in average bitrate and a gain of about 0.6 points in its playback quality score.
The regressions are just as concrete. On phones without AV1 hardware, software decode costs battery and can drop frames at 1080p. In the white paper’s test on a budget Moto e13, the software AV1 decode configuration drained about 3.2% of battery per hour, 0.6% per hour more than the comparison. Live streaming requires real-time transcoding, which the white paper says likely needs dedicated encoding hardware for AV1. Add the second ladder’s storage and any licence exposure, and a codec that wins on bits can lose on total cost.
Before committing, we would check each of these:
- Decode share: the fraction of your watch time (not sessions) on devices that hardware-decode the candidate codec, taken from your own player telemetry.
- DRM tier: whether premium content needs L1 DRM, which rules out software decode.
- Live versus VOD: whether real-time encode at your target resolution is possible on the encoders you have.
- Popularity distribution: how much of the catalogue is watched enough to justify a second ladder.
- Licence position: current pool terms for every codec in the ladder, including pools that claim to cover royalty-free formats.
- Your own content: the encoder, preset and rate control you would actually run in production.
The efficiency figures above vary with content, encoder and configuration, so budget only on a number measured on your own catalogue at production settings. The step-by-step procedure for that move is in when to switch codecs for a transcoding workload. The cases where the move does not cut cost at all are covered in why “we use the newest codec” doesn’t always cut cost.
The Compression Layer Is Engineering Surface, Not Inherited Plumbing
Off-the-shelf codecs are designed for human viewers, not for AI pipelines or control loops. The decode side of such pipelines is the subject of object detection in video and what it costs on the decode path.
TechnoLynx’s Inference Cost-Cut Pack starts with a cost and latency audit of the workload you run, followed by an optimisation sprint. That work sits within our AI engineering for media, broadcast and telecom practice.
FAQ
What Does “transcode video” Mean?
Transcoding converts already-encoded video into multiple representations with different resolutions, bitrates and frame rates. The aim is to serve varied networks and devices. It decodes the input, applies pre-processing such as noise filtering, then re-encodes it according to a defined encoding ladder.
How Do Audio Codecs Work?
Audio codecs compress sound data much as video codecs compress video data. They compress the data into a format that can later be decoded for playback or editing.