Skip to content

Explainer

Video file formats explained: containers and codecs

MP4, MOV, MKV and WebM are containers; H.264, HEVC and ProRes are codecs. What the difference is, which to record in, and why some files refuse to play.

Mamane BelloMamane Bello4 min read

CastKit workspace with the clips found in an episode and their scores, beside video file formats explained: Container versus codec; The codecs worth knowing; Audio file formats, briefly; Variable frame rate files
The steps from the article, beside the clips CastKit found in an episode. Screenshot of the live tool, November 2026.

"What format is the video?" has two answers, and mixing them up explains most of the confusion around video files. A file has a container, which is what the extension on the end of the name tells you, and inside it one or more codecs, which are how the picture and sound are actually compressed. Two files that both end in .mp4 can behave very differently because of what is inside.

Container versus codec

Think of the container as a box and the codecs as the way each item in the box was packed. The box holds a video stream, one or more audio streams, and sometimes subtitles, chapters and metadata. The codec decides how each stream was squeezed down to a manageable size, and a player needs to understand both the box and the packing to play it.

ContainerCommon video codecs insideCommon audio codecs insideWhere you meet it
MP4H.264, HEVC (H.265), AV1AACPhones, cameras, almost everything online
MOVH.264, HEVC, ProResAAC, uncompressed PCMApple devices, professional cameras and editors
MKVH.264, HEVC, othersAAC, Opus, othersScreen and stream recordings
WebMVP9, AV1OpusRecordings made in a web browser

The codecs worth knowing

  • H.264 is the most widely supported video codec. Nearly every device, browser and editor plays it. If you are unsure, it is the safe choice.
  • HEVC (H.265) makes smaller files at the same quality, and many phones record it by default. Support is good but not universal, especially on older computers and some web tools.
  • AV1 is newer and efficient, increasingly used by streaming sites. Playback and editing support are still catching up on older hardware.
  • ProRes is an editing codec. Files are very large but easy for editors to work with and lose little quality. It is meant for production, not for sharing.
  • AAC is the usual audio codec in MP4 and MOV. Opus is common in WebM and MKV. PCM is uncompressed audio, as in a WAV file.

Audio file formats, briefly

FormatCompressionUse
WAVNoneRecording and editing, largest files
FLACLosslessArchiving, half the size of WAV with no quality loss
MP3LossyPodcast distribution, plays everywhere
M4A (AAC)LossyPodcast distribution and Apple devices, slightly better quality per size than MP3

Record and edit in WAV or another uncompressed format if you can, and publish in MP3 or AAC. Our measured guide to audio settings for speech to text covers what actually affects transcript quality, which is less about the file type than you might think.

Your first episode is free, and your clips never expire.

Start free

Why a file refuses to play, or plays without sound

When a video plays with no picture, no sound, or not at all, the cause is nearly always a codec the player does not understand, not a broken file.

  • Picture but no sound: the audio codec is not supported. Common with uncompressed or unusual audio inside MOV or MKV files.
  • Sound but black picture: the video codec is not supported, often HEVC or AV1 on older systems.
  • Refuses to open at all: the container may be unsupported, or the file was cut off before it finished writing.

The last case deserves a word. An MP4 file normally writes its index at the very end. If the recording software crashes or the power goes, that index is never written and the file may fail to open, even though most of the video data is there. This is why many people who record streams and screens choose MKV, which can be read up to the point where it stopped, and convert to MP4 afterwards. Some recording software offers a fragmented MP4 option for the same reason.

Variable frame rate files

One more property hides inside a file: whether its frame rate is constant or variable. Phones and screen recorders sometimes record variable frame rate to save space, adding frames when there is motion and dropping them when there is not. Players cope, but editors and anything that has to line audio up with video can struggle, and the sound slowly slides out of step. If your device offers a constant frame rate option, use it for anything you plan to edit.

Which format to choose

  1. For recording: keep your camera's or recorder's native format at its highest quality. Do not convert on the way in.
  2. For screen and stream recordings: MKV or fragmented MP4, so a crash does not cost the whole session.
  3. For sending to an editor or a clipping tool: the original file if possible. If you must convert, use MP4 with H.264 video and AAC audio, at a generous bitrate.
  4. For publishing: whatever the platform asks for, which today is almost always MP4 with H.264 or HEVC.

Converting without losing quality

Changing only the container, for example MKV to MP4 with the same H.264 video inside, can be done without re-encoding, and nothing is lost; it is quick because the video is only copied into a new box. Changing the codec always means re-encoding, which takes longer and loses a little quality each time. When a tool offers a choice between remuxing and re-encoding, remux whenever the codecs are already supported where the file is going.

For what resolution and bitrate to aim for once the format is settled, see resolution and bitrate for podcasts.

Mamane Bello

Mamane Bello

Founder

By day, Mamane builds tech for farmers. By night, he builds CastKit and a few other tools he wishes already existed. He loves hard problems, and making technology that works where it's hardest to make it work.

Send us an episode.

Paste the link and sign up. That episode is the first one we run.

Audio episodes usually finish in a few minutes. Or try it without an account