Navigating the codec landscape for 2025: AV1, H.264, H.265, VP8 and VP9

Video codecs are the backbone of online video streaming; they help determine how efficiently a video is compressed, stored, and transmitted. As the demand for streaming video content increases, the choice of codec can significantly impact video quality, buffering, and overall user experience on your websites.

Whether you’re a developer optimizing a video platform, a content creator looking to deliver high-quality media, or a business seeking cost-effective bandwidth solutions, understanding the strengths and limitations of each codec is essential. In this article, we’ll explore how these codecs work and how Uploadcare leverages them to ensure smooth, adaptive video streaming.

What are video codecs?

Video codecs are tools that can compress or decompress a video; they can be software or hardware.

Video codecs work in two ways: they encode the video so it can be sent over the Internet, and then when the video gets to its destination, the codec is also used to decode the video data that has been sent so it can be viewed.

The term itself — codec — is derived from the two primary ways codecs work, encoding and decoding.

  1. Encoder: The encoder compresses the raw video data into a compact form. This process involves removing redundant data, reducing the color palette, and applying mathematical transformations.

  2. Decoder: The decoder decompresses the compact video data back into its original form. This process involves reversing the mathematical transformations, restoring the color palette, and adding back the redundant data.

Think of video codecs as a ZIP file for videos — it shrinks a video down (encode), so it takes up less space while still looking good when played.

Imagine trying to send a large video to a friend. If the file is too big, it takes forever to upload or stream. A video codec compresses (encodes) the video to make it smaller without making it look bad. Then, when your friend watches it, the codec unzips (decodes) it so they can see the full-quality video.

Different codecs work in different ways — some are faster, some save more space, and some work better for streaming, social media, or high-quality movies in the later sections of this article, we will discuss some popular codecs and their use cases.

How video codecs works

At its core, a video codec use mathematical algorithms to encode and decode video files. The goal is to retain the highest possible visual quality while reducing the amount of data needed to store and transmit video content. This happens in two ways: compression and decompression.

1. Compression (encoding) — Making the video smaller

When you record or upload a video, the raw footage is often huge in file size. A codec compresses it by removing unnecessary data while keeping the video looking good.

The codec does this by:

  • Removing redundant data: If multiple frames in the video have the same background (like in a news broadcast), the codec doesn’t store the same pixels repeatedly.

  • Motion estimation: If an object is moving, instead of storing every frame, the codec tracks movement and only saves what changes.

  • Lowering detail where it’s less noticeable: Human eyes don’t notice small details in fast-moving scenes, so codecs reduce detail in those areas to save space.

The goal of this compression? To keep the video looking the same while using less data.

Compression is achieved using two methods:

  • Lossy compression: Reduces file sizes by discarding some visual data, optimizing bandwidth usage.

  • Lossless compression: Maintains full quality but results in larger file sizes.

2. Decompression (decoding) — Playing the video back

When you hit play, to play a video the codec reconstructs the video from the compressed data. It fills in the missing details based on patterns, previous frames, and stored motion data.

Video codecs vs. Video containers

Before diving into individual codecs, let’s first understand the difference between codecs and containers.

codec is responsible for compressing and decompressing video files. Codecs use algorithms to reduce the size of video files, making them easier to store and transfer over the internet. Examples of popular video codecs include H.264, H.265 (HEVC), VP9, and AV1.

video container, on the other hand, also known as a file format or wrapper, is a format that holds the video data, the audio data of the video file, and other metadata of the video such as subtitles and metadata of the video file. Containers don’t compress or decompress video data; instead, they provide a structure for storing and organizing the data. Examples of popular video containers include MP4, MKV, AVI, and MOV file formats.

Think of a video file as a box of chocolates. The codec is like the recipe that determines how the chocolates are made — the taste, texture, and quality — just like a codec defines how video and audio data are compressed and stored. The container, on the other hand, is the box that holds everything together, organizing and storing the chocolates just like a format like MP4 or MKV keeps the video, audio, and other data in one package.

Inside the box, you don’t just have chocolates; you also have wrappers, sticks, and labels, representing audio tracks, subtitles, and metadata such as resolution, frame rate, and encoding details. For example, an MP4 box could hold a video made with the H.264 recipe (codec), along with an AAC audio track and subtitles. The same H.264 video could also be placed inside an MKV box, which might store multiple audio tracks, subtitles, and even extra features like chapter markers.

Box of virtual chocolate, with video codec and video dataBox of virtual chocolate, with video codec and video data

Video codecs for streaming in 2025

With the growing demand for high-quality video content, the right codec can make a huge difference in the performance and efficiency of your website and applications. If you choose a codec that is not widely supported, your users may face compatibility issues across devices and browsers. Also, if you choose a codec that is not optimized for streaming, your users may experience buffering and poor video quality. Here are some of the most popular video codecs for streaming in 2025.

H.264 (AVC)

H.264, also known as Advanced Video Coding (AVC), was developed in 2003 by two major standardization groups: ISO/IEC MPEG and ITU-T VCEG. These organizations create global standards to ensure video formats work smoothly across different platforms and devices.

H.264 compresses video efficiently by breaking each frame into smaller macroblocks of 16×16 pixels. Instead of storing every frame separately, it predicts movement between frames and only saves the differences, which reduces redundant data and shrinks file size. To further optimize storage, H.264 uses the Discrete Cosine Transform (DCT) to convert raw pixel data into wave-like frequencies, making it easier to remove unnecessary details.

The codec also applies quantization, a process that discards less important visual information while keeping the video looking sharp. Finally, it uses entropy coding methods like CABAC and CAVLC to efficiently encode the remaining data. After compression, the video is stored in formats like MP4 or MKV for easy playback.

This combination of techniques allows H.264 to deliver high-quality video at much smaller file sizes, making it one of the most widely used video codecs today.

H.265 (HEVC)

H.265, also known as High-Efficiency Video Coding (HEVC), improves upon H.264 by offering significantly better compression, making it ideal for 4K and HDR content.

Instead of macroblocks, H.265 uses coding tree units that can be as large as 64×64 pixels, allowing more efficient compression.

The codec employs a more advanced motion compensation system that stores fewer full frames and relies on motion prediction to optimize bandwidth usage.

It applies adaptive transform coding to minimize data while maintaining high-quality visuals. Entropy coding using CABAC further reduces the bitstream size, making H.265 highly efficient for high-resolution video.

VP8

VP8 is a royalty-free video codec developed by On2 Technologies and later acquired by Google. It was designed as an open alternative to H.264 for efficient web video streaming. VP8 uses block-based compression, dividing frames into macroblocks to facilitate efficient compression. Predictive coding is applied to anticipate motion in frames, reducing redundant data.

The codec then applies DCT to remove unnecessary details and optimize file size. To improve visual clarity, VP8 includes loop filtering to minimize blocky artifacts. It employs arithmetic coding for efficient data compression before storing the processed video in a WebM container, which is widely used for web-based streaming.

VP9

VP9 is the successor to VP8 and was developed by Google to compete with H.265. Instead of macroblocks, VP9 divides frames into superblocks of up to 64×64 pixels, enabling better compression. It features advanced motion prediction techniques that minimize redundant data by anticipating movement within frames.

The codec uses Discrete Wavelet Transform (DWT) instead of traditional DCT, further optimizing compression. Adaptive entropy coding is used to increase efficiency, and the processed video is typically stored in a WebM container, making VP9 a popular choice for YouTube and other streaming services.

AV1

AV1 is an open and royalty-free video codec developed by the Alliance for Open Media (AOMedia). It provides better compression efficiency than H.264, H.265, and VP9, making it ideal for modern video streaming platforms. The codec divides video frames into blocks ranging from 4×4 to 128×128 pixels, analyzing and compressing each section separately for efficiency.

Instead of saving every pixel, AV1 uses intra and inter prediction techniques to anticipate color and pattern changes, storing only the differences. It applies the DCT to convert pixel data into wave-like patterns, removing redundant details while preserving important visual elements.

The codec then employs entropy coding to assign shorter codes to frequent patterns, further optimizing file size. It also uses smart filtering techniques such as CDEF, and Loop Restoration to improve visual clarity by reducing artifacts. Finally, the compressed video is stored in a container like MP4 or WebM for streaming or playback.

Due to its high compression efficiency, AV1 is ideal for video content heavy websites and applications that require high-quality video streaming without compromising on bandwidth usage. As such companies such as Netflix and Amazon Prime Video are uses AV1 codec for their streaming services.

The AV1 codec can also be used to compress images as AVIF images, making it a versatile choice for developers looking to optimize their media content.

The best video codecs for streaming in 2025

So with all of these codecs mentioned, which is the best for streaming in 2025? The answer is that it depends on your specific needs and goals. Here are some factors to consider when choosing a codec, usually you’ll want video codecs that balance quality and compression efficiency to ensure smooth streaming over various internet connections:

CodecCompression efficiencyQualityFile sizeLicensing costHardware supportBest use case
H.264 (AVC)ModerateGoodModerateRequires royaltiesWidespreadGeneral streaming, conferencing, widely supported
VP8ModerateGoodModerateRoyalty-freeLimitedWebRTC, browser-based video chat
VP9HighBetterSmallerRoyalty-freeGoodYouTube, streaming
H.265 (HEVC)Very highExcellentMuch smallerRequires royaltiesNewer devices4K/8K streaming, HDR content
AV1HighestBestSmallestRoyalty-freeLimited (improving)Future-proofing, major streaming services

When choosing a codec, consider factors like:

  • Device compatibility: Ensure the codec is supported by your target devices and platforms.

  • Content type: Choose a codec that’s optimized for your specific content, such as 4K, 8K and HDR.

  • Bandwidth constraints: Select a codec that balances quality and compression efficiency to ensure smooth streaming over various internet connections.

  • Licensing costs: Some codecs require royalties or licensing fees, which can impact your budget. Ultimately, the best codec for you will depend on your specific streaming needs and goals.

How Uploadcare utilizes AV1 and H.264 codecs for adaptive bitrate streaming

Uploadcare’s video CDN supports multiple codecs, leveraging AV1 and H.264 for adaptive bitrate streaming. Adaptive bitrate streaming is a streaming technique ensuring your user receive the best video quality possible based on their internet speed and device capabilities. It works by first encoding the video in multiple bitrates and resolutions, this resolution is then split into tiny chunks of video files then dynamically switching between them based on the user’s network conditions. When combined with HLS it creates a smooth experience for your users to enjoy content streaming without buffering.

HLS is a popular streaming technology that makes adaptive bitrate streaming work smoothly. It does this by first storing all the different quality levels in a master playlist (M3U8 file) and then letting the video player choose the right quality based on your internet and bandwidth and also to smoothly switch between various video qualities while streaming without pausing.

HLS streaming with various video chunksHLS streaming with various video chunks

The way HLS works in a real world scenario would be like this:

  • A user on a fast Wi-Fi connection starts streaming at 1080p.
  • They move to a weaker mobile network, and the player drops to 480p to prevent buffering.
  • Later, when they regain a strong connection, the player scales back up to 1080p.
Adaptive bitrate streaming in UploadcareAdaptive bitrate streaming in Uploadcare

In the screenshot above, notice how the video first loads up as a 720p quality and automatically adjusts to a 1080p while still loading the tiny chunks of video to play to the user.

To ensure seamless adaptive streaming, Uploadcare determines the user device and encode the video in AV1 codec maximizing for high-efficiency to save bandwidth cost. In a case where the user devices doesn’t support the AV1 codec, the video will then be encoded using H.264 for larger compatibility.

To sum up:

  • AV1: Used for high-efficiency streaming where bandwidth savings matter most.

  • H.264: Ensures broad compatibility across devices and browsers.

By integrating these codecs, Uploadcare enables developers to deliver optimized video experiences without worrying about manual encoding complexities.

Conclusion

As video streaming evolves, choosing the right codec plays a crucial role in optimizing quality, performance, and bandwidth usage. AV1, H.264, H.265, and VP9 each offer unique advantages, catering to different streaming needs. Uploadcare’s intelligent handling of these codecs ensures seamless delivery, helping developers focus on content rather than compression settings.

Thinking about upgrading your video processing workflow? Start leveraging Uploadcare’s codec support today!

Build file handling in minutesStart for free

Ready to get started?

Join developers who use Uploadcare to build file handling quickly and reliably.

Sign up for free