Video Codecs Explained: H.264, H.265, VP9, and AV1 — What Actually Matters

Author: OnlinePlayer Team
video codech264h265vp9av1video format

You've probably encountered codec names without thinking much about them. Maybe you downloaded a video that wouldn't play. Maybe someone mentioned "HEVC" and you nodded along pretending to understand. Maybe you're just curious why some 4K videos are 2GB while others are 20GB.

Here's the thing: codecs aren't just technical trivia. They directly affect whether your videos will play, how much storage they consume, and even how much battery your device burns during playback.

Let's actually understand this stuff.

What a Codec Even Is

"Codec" is short for "coder-decoder." It's the algorithm that compresses video for storage and decompresses it for playback.

Think of it this way: raw video from a camera is enormous. One minute of uncompressed 1080p footage is roughly 10GB. Obviously, nobody stores or shares video that way. Codecs are how we shrink that down to something manageable while keeping it looking good.

The magic—and the engineering challenge—is doing this compression without making the video look terrible. Different codecs represent different approaches to this problem, with trade-offs in file size, quality, processing power required, and device compatibility.

The Codec Landscape in 2025

Here's what you need to know about the major players:

H.264 (AVC): The Universal Standard

What it is: The codec that won. Developed in 2003, H.264 became the default for basically everything—Blu-rays, streaming services, YouTube, web video, security cameras, you name it.

Why it still matters: Compatibility. Every device made in the last 15 years can decode H.264 without breaking a sweat. When you need something that just works everywhere, H.264 is the answer.

The trade-off: It's old. Newer codecs achieve the same quality at 30-50% smaller file sizes. If you're working with modern content and modern devices, you're leaving efficiency on the table.

Typical use cases:

  • Video content that needs to work on older devices
  • Streaming to unknown audiences
  • Real-time applications where decoding complexity matters
  • Any situation where compatibility trumps file size

H.265 (HEVC): Better Compression, Messy Adoption

What it is: The official successor to H.264, released in 2013. Roughly 40-50% more efficient—meaning similar quality at half the file size.

Why it's complicated: Patents. H.265 is encumbered by a nightmare of licensing requirements. Different patent pools with different terms made manufacturers nervous, slowed adoption, and created a messy ecosystem.

The practical impact: Some browsers support it, some don't. Some devices decode it in hardware, some struggle. macOS and iOS handle it beautifully; Windows support depends on whether you've paid for the codec extension.

Where you'll encounter it:

  • Apple devices (iPhone recordings, Apple TV+ content)
  • 4K Blu-rays
  • Some streaming services
  • Drone and action camera footage
  • Pirated content (where file size matters and licensing doesn't)

The honest assessment: H.265 is technically excellent but plagued by business problems. It never achieved the universal adoption H.264 enjoyed.

VP9: Google's Response

What it is: Google developed VP9 as a royalty-free alternative to H.265. It achieves similar compression efficiency without the patent mess.

Why it matters: YouTube. All of YouTube's higher-quality streams use VP9. If you've watched a YouTube video in 1440p or 4K, you've used VP9.

Browser support: Excellent on Chrome, Firefox, and Edge. Safari support arrived late (2020) and remains somewhat limited.

The trade-off: Encoding VP9 is computationally expensive—significantly more than H.264 or even H.265. This matters less for consumers (you're just decoding) but explains why some content providers stick with older codecs.

AV1: The Industry-Backed Future

What it is: Developed by the Alliance for Open Media (Amazon, Apple, Google, Intel, Meta, Microsoft, Netflix, and others), AV1 is the newest major codec. It's roughly 30% more efficient than H.265/VP9 and completely royalty-free.

The adoption story: AV1 is still rolling out. Netflix uses it for mobile. YouTube is transitioning key content. Modern hardware (2020+) includes dedicated AV1 decode blocks. But it's not universal yet.

Where you'll see it:

  • Netflix on mobile devices
  • YouTube (increasingly)
  • Twitch (for some streams)
  • Android TV and newer Roku devices
  • Chrome and Firefox (software decoding on older hardware)

The honest assessment: AV1 is almost certainly the future. The industry alignment is unprecedented. But "the future" means waiting for hardware support to spread. For content you're creating today, H.264 or VP9 remain safer choices.


Container Formats: The Other Half of the Equation

Here's where people get confused: codec is not the same as file format.

When you see ".mp4" or ".mkv" or ".webm", you're looking at a container format—a wrapper that holds video, audio, subtitles, and metadata together. The container doesn't determine how the video is compressed; that's the codec's job.

Common containers and their typical contents:

Container Extension Typical Codecs Notes
MP4 .mp4, .m4v H.264, H.265, AV1 Most universally supported
MKV .mkv Anything Flexible but not universally supported
WebM .webm VP8, VP9, AV1 Google's format, optimized for web
MOV .mov H.264, H.265, ProRes Apple's format
AVI .avi Anything (legacy) Obsolete, avoid for new content

Why this matters: Your device might support a container but not the codec inside it. An MKV file could contain H.264 (works everywhere), H.265 (works on some devices), or AV1 (works on new devices). The extension alone doesn't tell you whether the file will play.


Practical Guidance: What Should You Actually Use?

If You're Watching Video

For personal viewing, codec choice is mostly about whether your device supports it. Here's a quick compatibility guide:

  • H.264 — Works on everything. Literally everything.
  • H.265 — Works on Apple devices, most Android phones from 2016+, Windows with codec extension
  • VP9 — Works in Chrome, Firefox, Edge, modern Android devices, some smart TVs
  • AV1 — Works in Chrome, Firefox, newer Android devices, Apple devices from 2023+

If a video won't play, it's usually a codec incompatibility. Either your device doesn't support the codec, or it lacks hardware acceleration and is struggling with software decoding.

If You're Creating or Encoding Video

For maximum compatibility: H.264. Period. Everyone can play it, encoding is fast, and quality is good enough for most purposes.

For smaller files with good compatibility: VP9. Especially for web distribution. YouTube uses it for a reason.

For Apple ecosystem: H.265. If your audience is primarily iPhone/Mac users, you get great quality at small sizes with guaranteed playback.

For future-proofing archives: AV1 if you have the encoding time to spare. But keep H.264 backups until AV1 hardware support is truly universal.


What Browser-Based Players Handle

Modern browsers, through their built-in video capabilities, support:

✅ H.264 — Universal browser support ✅ VP9 — Chrome, Firefox, Edge; Safari since Big Sur ⚠️ H.265 — Safari only (hardware-dependent on other browsers) ⚠️ AV1 — Chrome, Firefox; Safari on M3+ Macs; hardware-dependent elsewhere

This is one reason browser-based video players have become more practical: browsers automatically handle codec support and update it without user intervention. When a browser adds AV1 hardware decoding, browser-based players get it immediately.


The Honest Bottom Line

Codecs are genuinely complicated, but the core concept is simple: newer codecs give you smaller files at similar quality, at the cost of device compatibility and encoding time.

For most people, the practical answer is:

  1. H.264 when you need everything to just work
  2. VP9 or H.265 when you're optimizing for file size on modern devices
  3. AV1 when you're encoding for the future and have hardware support to test against

The codec wars are essentially over. AV1's royalty-free model and industry backing make it the clear long-term winner. We're just waiting for the hardware installed base to catch up.