Codecs Explained: Why That Video Won't Play

Codecs Explained: Why That Video Won't Play

Someone sends you holiday.mp4. It plays fine on their laptop, and your TV rejects it with a shrug. The file extension never lied: it is an MP4. The problem is what is inside it.

Container versus codec

A container is the box: it holds video, audio, subtitles, and metadata, and defines how they are interleaved. A codec is the compression recipe used for the contents. MP4, MKV, WebM, and MOV are containers; H.264, HEVC, VP9, AV1, and ProRes are codecs.

Container Usual video codec Usual audio codec Plays almost everywhere
MP4 H.264 AAC Yes
MP4 HEVC (H.265) AAC No — hardware and OS dependent
WebM VP9 or AV1 Opus Modern browsers, not older TVs
MKV Anything Anything Players with bundled decoders (VLC)
MOV ProRes or H.264 PCM or AAC Macs; often not TVs

A .mp4 holding HEVC is still an MP4, and that is the classic failure: the TV supports the container, not the codec inside.

The usual suspects

H.264 (AVC) is the safe default — hardware decoders exist in most devices made since the mid-2000s. HEVC halves the bitrate for the same quality, but licensing is messy, and on Windows playback may require the HEVC Video Extensions package; Chrome and Firefox often refuse it. VP9 and AV1 are royalty-free and increasingly supported, though software decoding of AV1 is heavy on old hardware. Older Safari versions will not touch VP8 or VP9 at all.

Diagnose before you convert

First, find out what is actually inside. VLC plays almost anything; open the file and check Tools → Codec Information. If the codec is H.264 and only the container is odd, a remux with ffmpeg -i in.mkv -c copy out.mp4 fixes it in seconds with no quality loss. If the codec itself is unsupported, you need re-encoding.

The video converter does the latter: it plays the file in the browser and records the output through MediaRecorder, offering WebM (VP9) or MP4 (H.264), hiding formats the browser reports as unsupported, and keeping the source resolution. Because it records playback, a half-hour clip takes about half an hour. It is also a re-encode, so quality drops slightly — keep the original until the copy is confirmed playing.

Ship H.264 in MP4

For anything you cannot test on the target device, export H.264 video with AAC audio inside an MP4. It is the gray socks of video: unexciting, and it plays everywhere.