Video Codecs Explained: H.264, HEVC, VP9, and AV1
Compare H.264, HEVC, VP9, and AV1 plus AAC and Opus audio — compression efficiency, licensing, device support, codec strings, and when to use each.
A codec is the algorithm that turns raw frames into a compressed bitstream and back. Choosing one is a balance of three forces that rarely point the same way: compression efficiency, licensing cost, and device reach. This article walks through the four video codecs you will actually ship in 2026, plus the two audio codecs that pair with them.
H.264 / AVC — the universal baseline
Standardized in 2003, H.264 (also called AVC) is the most widely supported video codec in history. Essentially every browser, phone, smart TV, and set-top box decodes it, very often in hardware.
- Efficiency: the reference point everything else is measured against.
- Licensing: royalty-bearing via the MPEG LA / Via LA patent pool, though terms are well understood and broadly paid into.
- Codec string:
avc1.PPCCLL, where the bytes are profile, constraints, and level. For exampleavc1.640028is High profile, level 4.0;avc1.42E01Eis Baseline level 3.0.
If you can ship only one codec, it is H.264. It is the safe floor of every bitrate ladder.
H.265 / HEVC — better, but tangled
HEVC (2013) delivers roughly 40–50% bitrate savings versus H.264 at similar quality (an approximate, widely cited figure that varies by content). It is the workhorse of 4K and HDR.
- Efficiency: clearly better than H.264, especially at high resolutions.
- Licensing: notoriously fragmented across multiple patent pools, which slowed web adoption for years.
- Device support: strong on Apple platforms and modern TVs; no native support in Chrome or Firefox on the desktop web, which is its biggest gap.
- Codec strings:
hvc1.*(parameter sets in the sample description, required by Apple) orhev1.*(parameter sets inline). For HLS to Apple devices, preferhvc1.
Use HEVC where you control the device — Apple ecosystems, native apps, and TV platforms — and where 4K/HDR efficiency justifies a second encode.
VP9 — Google's royalty-free answer
VP9 (2013) is royalty-free and reaches efficiency in the same ballpark as HEVC. It powers most 4K on YouTube.
- Efficiency: comparable to HEVC, codec-dependent and content-dependent.
- Licensing: royalty-free.
- Device support: native in Chrome, Firefox, Edge, and Android; not on Safari/iOS, and hardware decode is less universal than H.264.
- Codec string:
vp09.PP.LL.DD, e.g.vp09.00.10.08(profile 0, level 1.0, 8-bit).
VP9 is a natural fit when your traffic skews toward Chrome/Android and you want to avoid HEVC's royalties.
AV1 — the current efficiency leader
AV1 (2018, from the Alliance for Open Media) is royalty-free and offers roughly 30% better efficiency than VP9/HEVC on typical content — again an approximate, content-sensitive figure.
- Efficiency: best of the group, especially at low bitrates.
- Licensing: royalty-free, backed by Google, Netflix, Amazon, and others.
- Device support: growing fast — modern Chrome/Firefox, Android, recent GPUs, and an increasing share of new TVs and the latest Apple silicon. Older hardware lacks AV1 decode, so software fallback can be CPU-heavy.
- Codec string:
av01.P.LLT.DD, e.g.av01.0.08M.08(profile 0, level 4.0 Main tier, 8-bit).
AV1 encoding is expensive in CPU time, but encoders like SVT-AV1 have made it practical. Use it as a top tier for high-volume VOD where bandwidth savings repay the encode cost.
Audio: AAC and Opus
Video almost never travels alone.
- AAC is the universal audio codec, the counterpart to H.264. It plays
everywhere and is the default for HLS and most VOD. Codec string
mp4a.40.2(AAC-LC) ormp4a.40.5(HE-AAC). - Opus is royalty-free, highly efficient at low bitrates, and excellent for speech and low-latency/WebRTC use. It pairs naturally with VP9/AV1 in WebM but is not supported on Safari/iOS for HLS, so AAC remains the safe default for broad reach.
Choosing in practice
A pragmatic 2026 strategy:
- Always ship H.264 + AAC as the compatibility floor.
- Add HEVC for Apple and TV apps that need efficient 4K/HDR.
- Add VP9 or AV1 for the modern web and high-volume titles where bandwidth savings matter, with AV1 as the top tier when device support and encode budget allow.
Codec strings appear directly in HLS CODECS attributes and DASH
Representation elements, so getting them right is what lets a player decide
whether it can play a rendition before downloading it. You can verify the
codec, profile, and level of any file with the
media info inspector, and inspect how those strings are
declared in a manifest on the player and manifest tools.
For the perceptual fundamentals behind these efficiency gains, see Video Compression Basics; to learn how you actually produce these encodes, continue with Transcoding Explained.
Try it yourself
Reading about streaming is one thing — pull apart a real manifest, play a stream, and measure its QoE with the toolkit.
Browse all tools