Video Codecs H.264, H.265 and AV1 Explained
You export a video — and the editor asks: H.264, HEVC or AV1? The same footage in these codecs can weigh three to four times differently while looking identical. Let's unpack how these algorithms compress video, how they differ, and which one to choose so you don't overpay in size or time.
What a codec is and why you need one
Raw, uncompressed video is a monstrous amount of data. One minute of 4K with no compression is tens of gigabytes. Storing and transmitting that is impossible. This is where the codec steps in — an algorithm that cleverly throws away the redundant parts and shrinks video hundreds of times over, trying to make sure your eye never notices the trick.
The word "codec" means "coder-decoder": one half compresses the video on export, the other unpacks it on playback. The key trick of every modern codec is that it stores not each frame in full but mostly the difference between neighbouring frames. If only a car moves in the shot while the background stays still, the codec records just the car and reuses the background from the previous frame. That is where all the magic of compression comes from.
Codec is not the file format
Don't mix them up: MP4, MKV, MOV are containers (boxes), while H.264, H.265, AV1 are codecs (what compresses the picture inside). A single MP4 file can hold video in any of these codecs. More on that in MP4 vs MKV vs MOV.
H.264 (AVC) — the workhorse
H.264 (also known as AVC, Advanced Video Coding) arrived in 2003 and has since become the most widespread video codec on the planet. It is the codec most internet video is shot in and uploaded as. Practically any device decodes it — from an old smartphone to a smart fridge — and does so in hardware, meaning fast and with no strain on the processor.
By modern standards H.264 doesn't compress ideally — files come out larger than with newer codecs. But it holds two unbeatable trump cards: absolute compatibility and fast encoding. If you need video that is guaranteed to open for anyone and exports in minutes, that's H.264. It is exactly what YouTube, TikTok and other platforms recommend as the safe default.
H.265 (HEVC) — half the size
H.265 (also known as HEVC, High Efficiency Video Coding) is the direct heir to H.264, released in 2013. Its brief was simple: compress just as well but at half the size. And it worked — H.265 delivers a file roughly 40–50% smaller at the same quality.
Numbers speak louder than words. A 4K video that needs a stream of about 16 Mbps in H.264 fits into roughly 8 Mbps in H.265. That is why HEVC is what iPhones use to shoot 4K, what streaming services use to save bandwidth, and the go-to for anyone who cares about disk space. HEVC has excellent hardware support: Apple chips, modern graphics cards and TVs decode it effortlessly.
There's a catch, though. H.265 is burdened with licensing royalties — commercial use of the codec requires paying the patent holders. This legal murkiness was one of the reasons the next hero was born.
AV1 — open and free
AV1 is the youngest of the three (2018) and the most ambitious. It was created by the Alliance for Open Media, whose members include Google, Netflix, Amazon, Microsoft and other giants. The core idea: build a codec that is more efficient than HEVC and completely free — no licensing royalties (royalty-free).
In efficiency AV1 beats H.265 by roughly 30–50%. That same 4K video, which required 16 Mbps in H.264 and 8 Mbps in H.265, fits into 4–5 Mbps in AV1. For streaming services shuffling terabytes of traffic that is a colossal saving — which is why YouTube and Netflix actively serve video in AV1.
But everything has a price, and AV1 pays in speed. Software AV1 encoding can be tens of times slower than H.264 for the same quality. On top of that, older devices can't decode it in hardware and have to lean on the processor. The situation is improving fast: fast encoders have appeared (SVT-AV1) along with hardware AV1 blocks in recent Intel Arc and NVIDIA graphics cards — but for now AV1 is a "grow into it" choice.
Efficiency in numbers
Let's gather it all into one table. The reference is one and the same 4K clip — you can see how the required bitrate (and therefore file size) drops with each generation while quality holds.
| Parameter | H.264 / AVC | H.265 / HEVC | AV1 |
|---|---|---|---|
| Year released | 2003 | 2013 | 2018 |
| Bitrate for 4K* | ~16 Mbps | ~8 Mbps | ~4–5 Mbps |
| Efficiency | Baseline | −40–50% | another −30–50% |
| Encoding speed | Fast | Medium | Slow |
| Compatibility | Perfect | Good | Growing |
| Licensing | Paid | Paid | Free |
* Approximate values for comparable quality; real bitrate depends on content and settings.
Speed and compatibility
Here lies the main practical trade-off. A newer codec is always more compact, but it pays for that either in encoding speed or in compatibility with older devices — and often in both.
Rule of thumb
The more efficient the codec, the longer it takes to encode and the fewer devices support it out of the box. H.264 — fast and everywhere, but large. AV1 — compact, but slow and not everywhere. H.265 — the golden middle. Choose by what matters most to you: space, time or compatibility.
Which codec to choose
There's no universal answer — there are three scenarios for three tasks.
You need compatibility → H.264
Video to send to anyone, a fast export, uploading to any platform with no risk. Larger, but it will open absolutely everywhere and encode in minutes.
You need space without losing quality → H.265
4K on a phone, a home archive, saving disk space. A great balance: half the size of H.264 with broad hardware support on modern devices.
Web and future → AV1
Streaming, a website, a modern audience, time to spare for encoding. The best efficiency and zero licensing fees — but make sure viewers are on recent browsers.
Need to re-encode video into another codec?
FormatZ helps you change the format and compress video right in your browser — no software to install. Check the catalog of supported conversions.
Open all formatsWant to understand how bitrate relates to quality and size? Read video bitrate, FPS and resolution made simple. And if the goal is to fit a clip into a chat limit, the guide on how to compress video for Telegram and WhatsApp will help.
Frequently asked questions about video codecs
Read next
VideoMP4 vs MKV vs MOV: Which Video Format to Choose
The containers these codecs live inside, in plain English.
VideoVideo Bitrate, FPS and Resolution Made Simple
Three settings that, with the codec, decide the file size.
VideoBest Video Formats for YouTube, TikTok and Telegram
Which codec and settings each platform expects.