The H.264/AVC codec: Everything you need to know

Vimeo Staff
Video format and quality options from Vimeo, including 4K, 8K, and HDR

If you’ve watched any streaming video over the past two decades, chances are it was delivered from the H.264/AVC codec. H.264, also known as advanced video coding (AVC), has long been the dominant format for online video thanks to its high-quality results and efficient use of bandwidth.

Other video codecs like H.265, VP9, and AV1 have recently gained popularity, meaning that using AVC isn’t an automatic decision. In this article, we’ll explore why video compression and encoding are important, what AVC is, how the AVC codec works, and how AVC compares to other formats.

What’s video encoding?

In order to understand H.264 encoding, it’s important to have a firm understanding of video encoding first. Encoding is a way of compressing large video files so that they play smoothly without using too much bandwidth. Video files are often very large, so uploading them to the web directly from your camera means they’ll likely stutter or display at a lower resolution than you filmed.

The word “codec” refers to a kind of technology that encodes and decodes videos. It performs both of the encoding/decoding process’s two main stages:

  1. An encoder compresses the video for efficient storage.
  2. A decoder converts the compressed file back to a playable video format.

There are various methods used to complete this process. AVC has been the standard video codec for two decades and is still the most widely used and supported. H.265/HEVC is a newer format that’s great for high-quality HDR video, and AV1 is a powerful open-source alternative.

The main benefits of using video codecs include:

  • Lower file size from video compression
  • File compatibility with a wide range of devices
  • Faster playback for users
  • Support for a range of video file formats

Compress your video with Vimeo

H.264 codec explained: What it is and why it’s important

H.264/AVC is the most commonly used video codec for online streaming. It’s also used in digital TV broadcasting and videoconferencing, among other applications. It’s a “lossy” form of video compression, meaning that non-critical information is stripped during the video encoding process to keep file sizes as small as possible.

The H.264/AVC codec supports common video file formats, such as .MP4 and .MOV. It’s also compatible with various streaming protocols, including dynamic adaptive streaming, which supports smooth playback by adjusting the bitrate depending on available bandwidth.

Some of the biggest perks of using H.264 encoding are:

  • Efficient use of bandwidth
  • Needs less storage space, reducing hosting costs
  • High-quality video with smooth playback
  • Compatibility with all modern devices and platforms
  • Fast encoding and decoding

How does H.264/AVC work?

The AVC codec follows a standard encoding and decoding process for each video:

  1. Prediction: Predicts motion between frames and removes redundant information to save space.
  2. Transformation: Transforms the data, reducing file size along the way.
  3. Video encoding: Encodes the video in a smaller format for storage and transmission.
  4. Video decoding: Decodes the video so that it’s ready for playback.
  5. Inverse transformation: Reverses the original transformation.
  6. Reconstruction: Rebuilds the original frames of the video.

The AVC codec has become an industry standard — support is built into operating systems like Windows and macOS, as well as all modern browsers. Streaming platforms like Vimeo use it behind the scenes, and popular video-editing apps like Adobe Premiere Pro and DaVinci Resolve allow you to export videos in the H.264 codec.

H.264 vs. HEVC, VP9, and AV1: 3 key differences

H.264 may be the most common, but it isn’t the only codec available. Let’s examine the biggest differences between H.264 and other major codecs.

Performance

Here are the main differences in speed, compression ratios, and visual quality across codecs.

Codec

Speed

Compression

Quality

H.264

Fastest encoding and decoding

Good video compression, with significant file-size reductions

Good to very good quality for standard video streaming, often slightly reduced during compression

HEVC

Slower than H.264 due to higher complexity

Around 35% bitrate reduction while delivering the same quality as H.264

Excellent quality, better for handling 4K and 8K resolutions

VP9

Slower than H.264, similar speed to HEVC

Around 35% bitrate reduction while delivering the same quality as H.264

Excellent for high-resolution video

AV1

Slowest of all

Around 50% more compression than H.264

The best quality, especially for 4K and 8K video

Compatibility

Here’s how each codec performs across devices and browsers.

Codec

Devices

Browsers

H.264

Universal support

Universal support

HEVC

Broad support on modern devices

Very broad support, Opera preferred

VP9

Broad support on modern devices

Very broad support, Chrome preferred

AV1

Limited support on older devices

Newer technology means somewhat limited support — Firefox, Chrome, Edge, Opera, and Safari (update 16+)

Royalties

While most small content creators don’t need to worry about royalties on codecs, larger media enterprises may need to pay royalties for using codecs.

Here’s when it’s necessary to pay royalties after making money on videos that use H.264, HEVC, VP9, and AV1 codecs.

Codec

Streaming

Editing

Mobile playback

H.264

Royalties for paid services only

Royalties for very large volumes only

Royalties paid by manufacturers

HEVC

Royalties for paid services only

Royalties for very large volumes only

Royalties paid by manufacturers

VP9

Open-source and royalty-free, but subject to patent claims from third parties

Open-source and royalty-free, but subject to patent claims from third parties

Open-source and royalty-free, but subject to patent claims from third parties

AV1

Open-source and royalty-free, but subject to patent claims from third parties

Open-source and royalty-free, but subject to patent claims from third parties

Open-source and royalty-free, but subject to patent claims from third parties

If you don’t want to sort through and test codecs to find the best balance for your videos, let Vimeo handle it for you. Vimeo’s simple, ready-to-use platform makes it easy to prep your videos for online publication while keeping file sizes low. 

Try Vimeo’s video editor

What you need to know to produce H.264

The H.264 video codec contains a range of different sliders and production options, but the automatic preset options work well in most cases. The easiest way to produce H.264 video is simply to export from your favorite video editing app using the standard H.264 preset.

However, if you do find yourself needing to change something, here are the main areas you can change:

  • Profiles: These are the tools used to technically encode a video file. Choose between baseline (BP), main (MP), and high (HiP). Baseline (fewer tools, lower quality) is best for maximum compatibility with older devices, but the other profiles offer higher quality and are more widely supported on modern devices.
  • Levels: Less relevant now than when AVC first debuted, levels are additional coding tools that can determine things like video bitrate. Choose a lower level to support older devices (especially mobile ones), but modern devices can handle high levels.
  • Quality: When creating H.264 videos, you can increase the quality preset to create higher-quality video, but keep in mind that higher qualities may affect playback speed.

Because the H.264 codec has been the standard for video encoding and compression for so long, it comes pre-installed on most computer systems. If you do need to install it manually, you can download the H.264 codec from a trusted source like the K-Lite Codec Pack. Only use reputable installers — unaffiliated sources can introduce security risks.

Streamline your video compression process with Vimeo

Choosing the right codec is important for video quality and compatibility. H.264 is a widely supported standard that boasts efficient compression rates and strong performance. Newer formats are great for very high-quality video, but keep in mind the tradeoff between quality and speed. The H.264/AVC codec is a good all-round option to pick.

If you want to efficiently stream H.264 content, Vimeo is an excellent option. It supports H.264 and other codecs, and it provides high-quality streaming with efficient video compression. Try Vimeo’s video compression software to easily shrink most video formats.

More from the Vimeo blog

Why the unthinkable might actually be the right move for your business, and when to take the plunge.

How to delete a YouTube channel, and four alternatives to consider instead

Learn about the limitations of video monetization with YouTube and discover a better solution for video subscriptions.

From free fans to paid subscribers: Why creators should monetize content beyond YouTube

We’ve compiled the top video marketing software out there plus tips on how to excel with video marketing tools. Being a small biz doesn’t mean sacrificing your big vision for video.

Best video marketing software for small businesses today

Here's how Manhattan Milk co-owner Frank Acosta is using video to keep his business moo-ving.

Meet the milkman who's making dairy delivery personal

When a hungover young man experiences a medical emergency, a brave crew of organs inside his body kicks into gear.

Staff Pick Premiere: Total eclipse of the fart

Fx Goby’s adaptation of Jack London’s short story “To Build A Fire” swept animation festivals around the globe.

Staff Pick Premiere: Human nature vs. Mother Nature

With a simple POV switch, you can give your viewers a taste of omniscience.

God's-eye view: when to use it and how it impacts your story

We want as many people as possible to be able to watch as many videos as possible, no matter where in the world they may be. That's why we've built these

Vimeo + Amara = accessible videos for all