Containers and codecs, and why conversion speed varies so much
The same "convert to MP4" can take three seconds or forty minutes, and lose nothing or a visible generation of quality. One distinction explains both, and lets you predict which you are about to get.
Last reviewed
The distinction
A container is the box. MP4, MKV, MOV, WebM and AVI are containers: they define how the pieces are arranged in the file, how a player finds the start of each one, how timestamps are recorded, and what extras are permitted — subtitle tracks, chapters, multiple languages, cover art.
A codec is how the picture and sound inside are compressed. H.264, H.265, VP9, AV1 for video; AAC, MP3, Opus, Vorbis, AC-3 for audio.
The file extension names the container only, and this is where nearly all the confusion comes from. Two .mkv files can have nothing in common inside, and an .mp4 and a .mkv holding the same H.264 video are, at the level that matters, the same video in different boxes. The extension tells you almost nothing about how hard a conversion will be.
Remux or transcode: the whole question
When you convert a video, one of two very different things happens.
Remuxing moves the existing compressed streams into a new container without decoding them. Nothing is re-compressed, so the picture is bit for bit what it was, the file is about the same size, and a two-hour film finishes in seconds. It is possible whenever the codecs inside are ones the target container accepts.
Transcoding decodes every frame and encodes it again. It takes time proportional to the length of the video, and it costs a generation of quality — the new encoder cannot distinguish the old one's artefacts from real detail, so it spends bits preserving them. It is unavoidable when the codecs are incompatible with the destination.
If a conversion finishes almost instantly, that is the good outcome. People occasionally assume something went wrong because it was too fast. The opposite is true.
Which conversions are which
**MKV to MP4: usually a remux.** Most MKVs hold H.264 with AAC, which is exactly what an MP4 wants. Seconds, nothing lost.
**MOV to MP4: usually a remux, and barely a conversion at all.** The MP4 specification was built from QuickTime's file format, so they share the same internal structure. An iPhone .mov holds H.264 or H.265 and moves straight across. The exception is professional footage — ProRes or DNxHD — which must be transcoded and will shrink enormously.
**WebM to MP4: always a transcode. WebM holds VP8, VP9 or AV1 with Vorbis or Opus, and none of those belongs in an MP4 in any way that things reliably play. Expect real time, and expect the file to get larger**, because the newer codecs are more efficient than H.264.
**AVI to MP4: always a transcode. AVI is from 1992 and holds DivX, Xvid or motion JPEG. Here the file usually gets smaller**, because H.264 is roughly twice as efficient as what is inside — a genuine gain for one generation of loss.
What a container can hold that another cannot
This is the second half of what gets lost in conversion, and it has nothing to do with quality. MKV is the most capacious container in common use: several audio tracks for different languages, a stack of subtitle tracks, chapter markers, cover art, even the font files needed to render styled subtitles. MP4 in practice carries one video and one audio track comfortably and is awkward about the rest.
So converting MKV to MP4 typically keeps the first of each and leaves the rest behind — which is how people end up with a film in the wrong language, or without the subtitles they converted it for. Subtitles in particular do not survive: SRT and the styled ASS format used by fansubs have no proper home in an MP4. Pull them out first and keep them as a separate .srt beside the video, which every player and television will load.
MOV carries timecode and camera metadata that an editor uses to synchronise takes; those do not cross either. And ProRes can carry an alpha channel for transparency, which H.264 in an MP4 cannot — so a title or logo clip converts to a perfectly valid video with a black background where the transparency was, with nothing to warn you but your own eyes.
The practical consequences
Check whether you need to convert at all. VLC, MPV and most current smart televisions play MKV and WebM directly. Converting a file your player already handles costs time, size and quality for nothing. The genuine reasons are an Apple device, an older console, a video editor that refuses the format, or a messaging app.
Trimming exploits the same idea. Cutting a clip can copy the encoded video rather than re-encoding it, which is instant and lossless — but the cut has to land on a key frame, and those are one to ten seconds apart. That is why a copied cut starts slightly early and an exact cut takes longer and costs quality: it re-encodes the opening section to land on the frame you picked.
When you must transcode, do it once and do it well. Every re-encode is permanent, so convert from the best source you have, at a quality setting that leaves the second generation invisible, and keep the original until you have checked the result.
Frequently asked questions
How do I tell what codec is inside my file?
VLC shows it under Tools and then Codec Information, and MediaInfo is a free tool that does nothing else. It is worth checking before a long conversion — if the codec is already MP4-compatible, you are about to spend an hour on something that could take seconds.
Is MKV better than MP4?
As a container, yes — it holds more and restricts less. MP4 wins on compatibility, which is usually the reason people convert. Neither affects picture quality at all; that is entirely down to the codec and its settings.
Why did my WebM get bigger as an MP4?
Because VP9 and AV1 are more efficient than H.264, and giving that up costs what it saved. You are buying compatibility, not size — an MP4 plays on essentially everything, and a WebM does not.
Can I convert without losing quality?
Yes, whenever the codecs allow a remux — MKV to MP4 and MOV to MP4 usually do. When a transcode is unavoidable, a high quality setting makes the loss effectively invisible, but it is never literally zero.
Why does changing the file extension sometimes work?
Because occasionally the container really is the same underneath — an .f4v is an MP4 with a different name, for instance. It fails for everything else, and a renamed file that will not open is more confusing than one that was honestly rejected. Try it, but do not rely on it.