What is H.264? AVC Video Codec Explained
H.264 (AVC) is the world's most widely used video codec. Learn how H.264 compression works, its profiles, licensing, and how Videospan uses it at scale.
H.264, also known as AVC (Advanced Video Coding) or MPEG-4 Part 10, is the most widely deployed video codec in history and remains the default choice for compatible video delivery. Developed jointly by the ITU-T Video Coding Experts Group and the ISO/IEC Moving Picture Experts Group as the Joint Video Team, it was finalized in 2003 and delivered roughly 50% better compression than MPEG-2 at equivalent quality. Two decades later, virtually every phone, browser, TV, camera, and GPU on earth can decode it in hardware.
That reach is exactly why H.264 sits at the foundation of our platform. Every export Videospan renders—every remote recording, brand-compliant edit, and repurposed clip—starts from a universally playable baseline, and this page documents the codec that lets us keep the promise "it just plays."
How H.264 works
H.264 follows the classic hybrid video coding pipeline: partition, predict, transform, quantize, entropy-code.
Block partitioning. Each frame is divided into macroblocks of 16×16 luma samples (plus the corresponding 8×8 chroma blocks in 4:2:0). For inter prediction, macroblocks can be subdivided into partitions as small as 4×4, so fine motion gets fine blocks while flat areas stay coarse.
Intra prediction. Within a frame, each block is predicted from already-decoded neighboring pixels using directional modes: nine modes for 4×4 luma blocks and four for 16×16 blocks, plus four chroma modes. Only the residual—the difference between prediction and reality—is transmitted.
Inter prediction. Across frames, H.264 supports motion-compensated prediction with quarter-pixel precision, multiple reference frames (up to 16), and weighted prediction. B-frames can reference pictures both earlier and later in display order, which is where much of the efficiency gain over earlier standards came from.
Frames are organized into Groups of Pictures: an independently coded I-frame followed by predicted P- and B-frames.
Transform and quantization. The residual passes through a 4×4 integer transform (a DCT approximation designed to be computed exactly in integer arithmetic, eliminating decoder drift), with an optional 8×8 transform in the High profile. Quantization then scales the coefficients—this is the lossy step that controls the bitrate-versus-quality tradeoff.
Deblocking filter. H.264 was the first mainstream codec to standardize an in-loop deblocking filter, which smooths block edges before the frame is stored as a reference. Because filtered frames are used for prediction, the improvement compounds through the GOP.
Entropy coding. Symbols are compressed with either CAVLC (Context-Adaptive Variable-Length Coding, simpler and cheaper) or CABAC (Context-Adaptive Binary Arithmetic Coding, ~10–15% more efficient but computationally heavier). Baseline-profile content uses CAVLC; Main and High profiles typically use CABAC.
Key features
- Profiles and levels. Profiles (Baseline, Main, High, and the High 10/4:2:2/4:4:4 extensions) define which coding tools are available; levels cap resolution, bitrate, and buffer sizes so device support can be declared precisely. High profile at Level 4.x is the de facto standard for 1080p delivery.
- Error resilience. Slices, flexible macroblock ordering, and redundant pictures made H.264 practical over lossy networks—one reason it won in video conferencing and streaming alike.
- Mature encoders. The open-source x264 encoder, tuned for over fifteen years, still produces excellent quality-per-bit and is the reference point every newer encoder is benchmarked against.
- Universal decode. Dedicated silicon exists everywhere. Software decoding is a fallback, not a requirement.
How Videospan uses H.264
H.264 is the universal baseline of our rendering pipeline. Every video we produce—whether it starts as a browser-based remote recording, an AI-assisted edit, or a short clip repurposed from a longer session—gets rendered to H.264 video with AAC audio in an MP4 container as its primary export, because that combination plays on every device an organization owns, without a support ticket.
- Universal exports. Brand kits, templates, bumpers, and overlays are rendered into H.264 MP4s, so a video handed to sales, comms, or an external agency plays identically on a decade-old laptop and a brand-new phone.
- Multi-variant rendering. H.264 is cheap to encode, which is part of how we render every video in multiple aspect ratios and variants in parallel—landscape for the intranet, vertical for social, square for feeds—without long queues.
- Browser-based review. Hardware H.264 decode is universal, and that matters when reviewers scrub cuts and approve variants inside the browser: playback stays smooth on managed laptops with no plugins and no special software.
H.264 vs HEVC, AV1, and VP9
| H.264 / AVC | HEVC / H.265 | VP9 | AV1 | |
|---|---|---|---|---|
| Year finalized | 2003 | 2013 | 2013 | 2018 |
| Block structure | 16×16 macroblocks | CTUs up to 64×64 | Superblocks up to 64×64 | Superblocks up to 128×128 |
| Compression efficiency | Baseline | ~50% fewer bits at same quality | ~50% fewer bits | ~30% fewer bits than HEVC |
| Decode complexity | Low | Moderate | Moderate | High |
| Hardware support | Universal | Widespread | Broad | Growing since 2020 |
| Browser support | Universal | Partial | Broad (not legacy Safari) | Broad (Safari 16.4+) |
| Licensing | Royalties (AVC pool) | Royalties, multiple pools | Royalty-free | Royalty-free |
Advantages
- Plays on effectively every device and browser shipped since ~2010—no compatibility planning required
- Cheap to encode and decode; real-time encoding runs comfortably on modest hardware
- Extremely mature tooling: x264, hardware encoders in every GPU, first-class support in ffmpeg
- Well-understood licensing with per-unit royalty caps; freely distributed internet video is royalty-free to end use
Limitations
- Least efficient of the modern codecs—expect roughly double the bitrate of HEVC or AV1 for the same quality
- 16×16 macroblocks limit performance on 4K and larger resolutions
- 8-bit 4:2:0 is the practical ceiling for most device decoders; 10-bit and 4:4:4 profiles have thin hardware support
- Royalty-bearing, unlike VP9 and AV1
When to use H.264
Use H.264 as your baseline delivery codec—the rendition you know will play everywhere. In adaptive streaming ladders, H.264 renditions cover legacy devices while HEVC or AV1 renditions serve newer ones at lower bitrates. It is also the right choice for real-time use cases (live contribution, conferencing), for camera acquisition formats, and whenever encode cost or latency matters more than bandwidth.
What to ask a platform vendor: do their exports play on every device your organization owns—including the oldest laptop in the fleet and the locked-down managed phones? A platform that defaults to H.264 with AAC audio in MP4 for its primary exports can answer yes without caveats; one that leads with newer codecs should explain exactly how it covers your compatibility floor.
A standard high-quality H.264 encode with ffmpeg:
ffmpeg -i in.mov -c:v libx264 -preset slow -crf 20 -pix_fmt yuv420p -c:a aac -b:a 160k out.mp4-crf 20 targets visually transparent quality for most content (lower is better; 18–23 is the usual range), -preset slow trades encoding time for efficiency, and -pix_fmt yuv420p ensures 8-bit 4:2:0 output that every decoder accepts.
Glossary
- Macroblock
The fundamental 16×16-sample processing unit in H.264, subdividable into partitions down to 4×4 for prediction.
- CABAC— Context-Adaptive Binary Arithmetic Coding
H.264's more efficient entropy coder, used in Main and High profiles. Delivers roughly 10–15% bitrate savings over CAVLC at higher CPU cost.
- CAVLC— Context-Adaptive Variable-Length Coding
The simpler, lower-complexity entropy coder used in the Baseline profile.
- Profile
A named subset of H.264 coding tools (Baseline, Main, High) that defines decoder requirements for a bitstream.
- Level
Constraints on resolution, bitrate, and buffer size within a profile, used to guarantee a device can decode a stream.
- CRF— Constant Rate Factor
x264's constant-quality encoding mode. The encoder varies bitrate to hold perceptual quality steady instead of hitting a target bitrate.
- Motion vector
A pointer describing where a block in the current frame was found in a reference frame; stored in place of the block's pixels.
- Deblocking filter
An in-loop filter that smooths artificial block edges in the reconstructed frame, improving both quality and subsequent prediction.
Frequently asked questions
Related
Video Codecs Explained: H.264, HEVC, AV1 & VP9
Learn how video codecs work—intra/inter prediction, chroma subsampling, quantization, GOP structure—and compare H.264, HEVC, AV1, and VP9 for your workflow.
What is HEVC? H.265 Video Codec Explained
HEVC (H.265) delivers ~50% better compression than H.264. Learn how HEVC works, its licensing landscape, 4K/HDR strengths, and how Videospan uses it for 4K/HDR.