Keavix
Formats

What a container actually is (and why it isn't a codec)

5 min readUpdated 12 August 2026

Almost every confusing thing about video formats comes from conflating two different layers. Separate them and the rest falls into place.

The short version
  • A container holds streams; a codec compresses them
  • The same .mp4 file can contain very different codecs
  • "My player won't open it" is usually a codec problem, not a container one

The container

MP4, WebM, MKV and MOV are containers. They define how the video track, audio track, subtitles and metadata are packed into one file and kept in sync. The file extension tells you the container and almost nothing else.

The codec

H.264, H.265, VP9 and AV1 are video codecs; AAC, MP3 and Opus are audio codecs. These do the actual compression, and they are what your device needs hardware or software support for.

Why this matters in practice

Two files both named .mp4 can behave completely differently — one with H.264 that plays everywhere, one with H.265 that stutters on an older laptop. Renaming the extension changes nothing, because the streams inside are unchanged.

Muxing vs converting

Repacking streams into a different container is fast and lossless. Converting between codecs re-encodes every frame, takes real time, and degrades quality. Knowing which one a tool is doing tells you what to expect.

Video & Image DownloaderTry it now — no signup, nothing to install.Open the tool →

Keep reading