FormatFlow

No tool matches “”

Try a format (“webp”, “mp3”) or a verb (“merge”, “compress”).

Loading index

↵to open

fundamentals · 5 min read

Video codecs and containers explained

A video file has two layers: a container, such as MP4, MOV, MKV or WebM, that packages the tracks, and codecs, such as H.264, HEVC, VP9 or AV1, that compress the video and audio inside it.

A device can support the container but not the codec, or the codec but not the container. That mismatch, more than the file extension on its own, is why a video plays on one phone and shows an error on another screen.

By FormatFlow EditorialUpdated October 17, 2026

Container vs codec: the envelope and the letter

The container is the box: it says where the video track, audio tracks, subtitles and metadata begin, and how they are synchronized. It also holds the index that lets a player jump to a timestamp. The codec is the compression method used inside a track, and it is what actually turns pixels and sound into a stream of bytes.

The extension follows the container, not the codec. An MP4 file can contain H.264, HEVC, AV1 or several other formats, while a MOV file from a Mac might hold exactly the same H.264 stream and play much less widely. This is why choosing a container and choosing a codec are two separate decisions.

The codecs you will meet

H.264, also called AVC, is the compatibility workhorse. Almost every browser, phone, television and video platform decodes it, and it remains the safest choice for a file that has to play anywhere. HEVC, or H.265, compresses more efficiently, roughly halving the bitrate needed for similar quality, which makes it popular for 4K, HDR and phone recordings. It is more expensive to license, which slowed adoption outside Apple devices and some TVs.

VP9 is a royalty-free codec developed for the web and used heavily by video platforms inside WebM or MP4. AV1 is newer, royalty-free and more efficient again, but it is slower to encode and needs newer hardware to decode smoothly. For audio, AAC is the near-universal companion inside MP4, while Opus is common in WebM; ProRes is an editing codec, not a delivery one.

Bitrate, resolution and quality

Bitrate is how many bits per second the encoder spends describing the video. At the same resolution and codec, more bitrate usually means fewer compression artifacts, but the relationship is not linear: a detailed forest scene needs more data than a static talking-head shot to look equally clean.

Resolution sets the pixel grid, not the quality. A 4K clip encoded at a very low bitrate can look worse than a well-encoded 1080p clip, and upscaling a small video never adds detail. Variable bitrate encoders spend more data on complex scenes and less on simple ones, which is why two files with the same average bitrate can look different.

Why a video will not play on another device

Playback fails when the player cannot find a decoder for one of the tracks. A common case is 10-bit HEVC from a recent phone: the file plays on the phone, but an older television or Windows installation lacks the codec. Another is an MKV or WebM container that some phones and living-room apps do not index at all. Audio can be the blocker too, especially when a file carries an unusual track such as DTS or an older MPEG audio format.

Web playback adds its own rules. Browsers need a codec they support and, for reliable streaming, a file whose metadata sits at the front rather than the end. A large MP4 can work when opened from disk but stall in a browser until nearly the whole file has downloaded. Digital rights management is separate again: no amount of converting will make a protected file play outside its authorised app.

What conversion can and cannot fix

There are two kinds of conversion. A remux copies the existing video and audio streams into a different container, which is fast and lossless; changing MOV to MP4 is often just that. A transcode decodes the video and encodes it again, which takes time and loses some quality, but it can change the codec, bitrate, resolution and bit depth so an incompatible file becomes playable.

A good conversion chooses the smallest change that fixes the problem. If the codec is already widely supported, remux. If the target device is unknown, H.264 video with AAC audio in an MP4 container is the lowest-risk delivery format. No conversion can recover detail a low-bitrate source never had, and none can remove DRM legally or technically.

Frequently asked questions

Is MP4 a codec?
No. MP4 is a container format; the codec is what compresses the video inside it, such as H.264 or HEVC. Two .mp4 files can therefore behave very differently on the same device.
Does converting a video always reduce quality?
A remux that copies the streams loses nothing at all. A transcode decodes and re-encodes the video, which loses some quality, though a high bitrate and a good encoder usually keep the loss hard to see on the first generation.
Why does a MOV file play on a Mac but not on Windows?
The QuickTime container and the codec inside it may not be supported by the Windows player. A MOV holding ProRes or 10-bit HEVC is especially likely to fail. Converting to MP4 with H.264 video and AAC audio fixes it for almost every Windows machine.
Which codec should I choose for maximum compatibility?
H.264 for video and AAC for audio inside an MP4 container is the combination with the widest support across browsers, phones, TVs and social platforms. Newer codecs save space but always exclude some older device.
What is a 10-bit HEVC video?
It stores ten bits per color channel instead of the usual eight, which reduces banding and allows HDR. Phones often record in this mode, but many older players and computer monitors cannot decode or display it correctly, so a conversion to 8-bit H.264 is the usual fix.
What is hardware acceleration, and why does it matter?
Phones, graphics cards and browsers can decode or encode certain codecs in dedicated hardware, which is faster and uses less power. A codec such as AV1 may play smoothly on a new laptop and stutter on an older one even when the files are identical.

Tools for this job