Someone sends you an AVI that will not play. You convert it to MP4 and it works. Nothing about the picture changed — so what actually happened? The answer is the single most useful idea in digital video, and almost nobody explains it.
Containers and codecs are not the same thing
The file extension — .mp4, .mov, .avi, .mkv, .webm — tells you the container. A container is a box. It holds a video track, one or more audio tracks, subtitles, chapter markers, and metadata, and it keeps them synchronised.
The codec is the method used to compress what is inside the box. H.264, H.265, VP9 and AV1 are video codecs; AAC, MP3 and Opus are audio codecs.
This explains the mystery. When a file will not play, it is usually not the container the player objects to but the codec inside it. An AVI holding an obscure 2003 codec fails not because AVI is unsupported, but because nothing on your machine knows how to decode its contents.
The containers
| Format | Strength | Use it when |
|---|---|---|
| MP4 | Plays essentially everywhere | Almost always — the default choice |
| MOV | Apple's format; excellent for editing | Working in Apple software, or handling iPhone footage |
| AVI | Very old, very widely recognised | Legacy hardware only; avoid for new files |
| MKV | Holds anything: multiple audio tracks, subtitles, chapters | Archiving films with several languages or subtitle tracks |
| WebM | Open, royalty-free, built for browsers | Embedding video directly in a web page |
MP4
If you are unsure, the answer is MP4 with H.264 video and AAC audio. That combination plays on every phone, browser, television, editing program and social platform in current use. It is not the most efficient option available any more, and it does not matter — compatibility beats efficiency for anything you are sending to another person.
MOV
Apple's container, and what an iPhone records by default. Technically it is a close relative of MP4 and often holds the same H.264 video. It behaves impeccably across Apple software and reasonably well elsewhere, but Windows machines and some upload forms still occasionally object. Converting MOV to MP4 is a common, quick fix.
AVI
A Microsoft format from 1992, and it shows its age: no proper support for modern codec features, poor handling of variable frame rates, and larger files for the same quality. It survives on old hardware. There is no good reason to create a new AVI today.
MKV
Technically the most capable container here — it will hold almost any codec, unlimited audio tracks, embedded subtitles and chapter markers. That makes it excellent for archiving. The catch is playback support: fine on computers with a decent media player, patchy on televisions, phones and web browsers.
WebM
Designed for the web, open and royalty-free, holding VP9 or AV1 video with Opus audio. Browser support is excellent and file sizes are smaller than equivalent MP4. Outside the browser, support falls away quickly — so use it for embedding on a page, not for sending to someone.
The codecs
H.264 (AVC)
The workhorse. Around twenty years old, supported by hardware decoders in effectively every device ever made since, which means it plays smoothly without draining a battery. Not the most efficient, but by far the safest.
H.265 (HEVC)
Roughly half the file size of H.264 at comparable quality — a genuinely large gain. Adoption has been slowed by licensing complications, so support is good on modern devices and absent on older ones. Excellent for storage; risky for sharing.
VP9 and AV1
Open, royalty-free alternatives. VP9 is broadly comparable to H.265 and is what much of YouTube serves. AV1 is more efficient still and is being adopted steadily, though encoding is slow and older hardware cannot decode it without help.
Why converting sometimes takes seconds and sometimes takes ages
Changing the container while keeping the same codec — MKV to MP4 with H.264 inside both — means copying the existing video stream into a new box. Nothing is re-compressed, so it is fast and completely lossless.
Changing the codec means decoding every frame and re-encoding it. That is computationally heavy, slow, and lossy: you are re-compressing already-compressed video, so quality drops a little each time. Convert once, from the best source you have, rather than repeatedly.
Choosing, in practice
- Sending to someone — MP4 / H.264 / AAC. No exceptions worth making.
- Uploading to social media — MP4. Platforms re-encode everything anyway, so give them a clean, standard file.
- Embedding on your own website — WebM, with an MP4 fallback.
- Archiving at home — MKV with H.265, if your playback devices support it.
- Editing — whatever your editor prefers; MOV and MP4 are both safe.
Common questions
Which video format has the best quality?
None of them, on their own. The container does not affect quality at all — that is determined by the codec, the bitrate and the resolution inside it. An MP4 and an MKV holding the same H.264 stream are visually identical.
Why won't my MOV file play on Windows?
Usually a codec the system does not recognise, rather than the container itself — iPhone footage often uses H.265. Converting to MP4 with H.264 resolves it in nearly every case.
Does converting video reduce quality?
Changing container only, keeping the same codec: no. Changing codec: yes, slightly, because the video is re-encoded. Always convert from your best original rather than from a file that has already been converted.