MP4 to MP3 Converter logoMP4 to MP3

Video Codecs Explained: H.264, H.265, VP9

A video codec is the algorithm that compresses moving images into a manageable number of bits. Almost every video you have ever watched was encoded with one of three codecs. Here is what they do, how they compare, and why most of them do not matter when you only want the audio.

Quick Answer

A video codec is a software algorithm that compresses video frames into a small file and decompresses them for playback. The name comes from coder-decoder. The most common video codecs today are H.264 (AVC), H.265 (HEVC), and VP9. Each new codec roughly halves the bitrate needed for the same quality.

The codec does the heavy lifting

Raw uncompressed video is enormous. A single 1080p frame at 24 bits per pixel is roughly 6 MB; at 30 frames per second that is 180 MB per second, or roughly 32 GB for a three-minute clip. No storage medium or network could handle that volume. The video codec is the algorithm that shrinks those 32 GB down to 30 MB — a thousand-to-one reduction — while keeping the picture looking almost identical to the original.

The codec achieves this through a combination of techniques. Intra-frame compression uses still-image techniques on individual frames. Inter-frame compression exploits the fact that consecutive frames are mostly the same — only the parts that change need to be stored. Motion compensation tracks how blocks of pixels move from frame to frame, so a moving car does not need to be re-encoded each time, just the motion vector that describes where it went. The codec decides, frame by frame, how much to spend on each technique.

The three you will meet

H.264 (AVC)

Advanced Video Coding, standardised 2003. The universal default. Every phone, browser, and TV decodes it. The inside of nearly every MP4 you have ever seen.

H.265 (HEVC)

High Efficiency Video Coding, standardised 2013. Roughly 50% more efficient than H.264 — same quality at half the bitrate. Used by 4K streaming and modern phones. Slower to encode and decode.

VP9

Google's open-source competitor to HEVC, released 2013. Similar efficiency to H.265 but royalty-free. The default codec for YouTube above 1080p and for WebM files.

AV1 (honourable mention)

Released 2018 by the Alliance for Open Media. Another 30–40% more efficient than HEVC. Netflix and YouTube are rolling it out. The future, but slow to encode today.

H.264 versus H.265: the practical comparison

H.265 (HEVC) was designed as H.264's successor, and at the algorithmic level it clearly is. For the same visual quality, HEVC needs roughly half the bitrate of H.264. A 1080p movie that fills 4 GB as H.264 fits in about 2 GB as HEVC. For 4K content, the savings are even more dramatic, which is why Netflix and Apple TV stream 4K in HEVC rather than H.264.

The catch is cost and complexity. HEVC encoding and decoding are roughly 3–5× more CPU-intensive than H.264. More importantly, HEVC is covered by a tangle of patents held by multiple pools — MPEG LA, HEVC Advance, and others — which has discouraged adoption. Safari and modern phones support it, but Chrome and Firefox historically did not, which is why YouTube picked the royalty-free VP9 instead. H.264 remains the safe default when you need a video to play everywhere.

VP9: the open alternative

VP9 was Google's answer to the HEVC patent mess. Released in 2013, it matches HEVC on efficiency while being completely royalty-free. YouTube uses VP9 for everything above 1080p, and every Android phone and Chrome browser supports it natively. The WebM container format was built specifically to hold VP9 video and Opus audio.

VP9 never displaced H.264 in MP4 files because MP4 was designed around the MPEG family of codecs. A .mp4 file almost never contains VP9 video; if you find VP9, the container is usually .webm. This matters for converters: a tool that handles only the MP4 demuxer will refuse a .webm file even though the codecs inside are no more exotic than what is in an MP4.

Efficiency, in numbers

CodecYear1080p @ 30fpsRoyaltyWhere
H.264 (AVC)2003~4 MbpsPaidMost MP4s
H.265 (HEVC)2013~2 MbpsPaid (complex)4K streaming
VP92013~2 MbpsFreeYouTube, WebM
AV12018~1.3 MbpsFreeNewer streaming

The bitrate column shows roughly how many megabits per second each codec needs to deliver visually transparent 1080p at 30 fps. Lower is better. Notice that each generation roughly halves the previous generation's bitrate — but encoding time roughly doubles, which is why older codecs refuse to die.

Why none of this matters when you only want the audio

Here is the part that saves everyone time. When you convert an MP4 to an MP3, the video codec is discarded before it is ever decoded. FFmpeg opens the container, finds the audio stream, decodes only that stream, and writes the MP3. The video codec — whether H.264, H.265, VP9, or AV1 — is ignored completely. A 4K HEVC file and a 720p H.264 file produce identical MP3s at the same bitrate, because the audio inside them is encoded the same way.

What does affect you is the demux step. Newer codecs like AV1 and HEVC sometimes use container features that older demuxers handle slowly, which is why a 4K file can take longer to open than a 1080p file of the same length — even though only the audio is being extracted. The encode itself, which is the heavy part, runs at the same speed regardless. For more on the audio side of the picture, see the audio codecs guide, and for the container that holds both, the container formats guide.

A short note on the patents

H.264 and H.265 are covered by patents administered by MPEG LA and other pools. For end users this is invisible — the licence fee is paid by the maker of your phone, browser, or operating system. For developers building converters, it is a real cost, which is why open-source projects like FFmpeg ship with optional codec support that distributors must enable deliberately. The royalty-free codecs — VP9, AV1, Opus — exist precisely because the patent situation around H.264 and HEVC was too unpredictable for the open web. For end users, the practical effect is that a file with an unusual codec may play in some apps but not others.

What this means for you

When you use MP4toMP3.online, the video codec of your source file affects only how long the demux step takes, not the quality of your output MP3. The browser-based FFmpeg engine understands H.264, H.265, VP9, AV1, and dozens of older codecs, so the file you drop in will almost always work. For the practical steps, see the how-to guide, and for the wider MP4-versus-MP3 picture, the MP4 vs MP3 article is the right place to start.

Sources & References

  1. 1Video codecs — MDN — Mozilla MDNBrowser support and characteristics for H.264, H.265, VP9 and AV1.
  2. 2H.264/MPEG-4 AVC — Wikipedia — WikipediaThe dominant video codec inside MP4 files.
  3. 3H.265/HEVC — Wikipedia — WikipediaNewer High Efficiency Video Coding standard, the successor to H.264.
  4. 4FFmpeg codecs documentation — FFmpegReference for video decoders and encoders supported by FFmpeg.

Extract audio from any MP4 now

MP4toMP3.online discards the video codec and keeps only the audio — H.264, H.265, VP9, AV1 all welcome. No upload.

Convert MP4 to MP3