Media concepts · Comparison
Codec vs Container
Saying “convert to MP4” usually means “put compatible codecs in an MP4 box.” Saying “convert to H.264” means change the video codec — which may still live inside MP4 or MKV.
Quick take: A codec compresses media; a container packages tracks. MP4 is a container; H.264 is a codec. You need both to play most videos.
Quick mental model
Codec = how frames/samples are packed. Container = the file wrapper with indexes and tracks.
Why players fail
An app may support MP4 containers but not HEVC codecs inside them. Or support H.264 but refuse MKV wrappers.
Key points
- Ask “which codec?” and “which container?” separately.
- Remux changes container; transcode changes codec.
- Web delivery sweet spot: H.264 + AAC in MP4.
Codec vs Container
Codec
- Compresses/decompresses media
- Examples: H.264, HEVC, AAC, Opus
- Determines quality/size tradeoffs
Container
- Wraps tracks + metadata
- Examples: MP4, MKV, MOV, WebM
- Determines which apps accept the file shape
Phone/web upload form
Pick: MP4 container + H.264/AAC
Highest compatibility pairing.
Keep multi-subtitle rips
Pick: MKV container
Flexible tracks; play in VLC or remux later.
Examples
Good pair
H.264 + AAC inside MP4.
Awkward pair
HEVC inside MKV on a stock Windows install.
Try it in a converter
Concepts stick better with a real file — processing stays in your browser.
Related concepts
FAQ
Is WebM a codec?
WebM is a container, commonly holding VP8/VP9/AV1 and Vorbis/Opus.
Browse all conversion concepts or jump to converters.