noupload.tools

guides

Containers are not codecs

The file extension tells you how a video is wrapped. It tells you almost nothing about what is inside, and that is the difference between a one-second conversion and a long one.

"Convert MKV to MP4" is one of the most searched media tasks there is, and most of the sites that answer it do something wasteful: they decode every frame of the video and encode every frame again, taking minutes or hours and losing a little quality, when the job could have taken a second and lost nothing. Understanding why requires separating two words that get used as if they mean the same thing.

The container is the box

A container is a file format that holds one or more streams and the information needed to play them together: which bytes belong to the video, which to the audio, how they line up in time, where the chapters are, what the subtitles say. MP4, MOV, MKV, WebM and AVI are containers. They differ in what kinds of streams they are allowed to hold and in how much extra information they can carry, but none of them is a kind of video.

The codec is what is in the box

A codec is the method used to compress the pictures or the sound. h.264, h.265, VP8, VP9 and AV1 are video codecs. AAC, MP3, Opus, Vorbis and FLAC are audio codecs. The codec decides how the file looks, how big it is and what can play it. The container decides only how it is packaged.

So an MP4 might contain h.264 video and AAC audio, which is the common case, or h.265 video, which is what recent iPhones record. An MKV might contain exactly the same h.264 and AAC streams as the MP4 next to it. The two files would have different extensions, identical pictures, and near-identical sizes.

Which containers take which codecs

ContainerVideo it usually holdsAudio it usually holdsNotes
MP4h.264, h.265, AV1AAC, MP3, Opus (recent players)The universal one. Plays everywhere. Limited subtitle support (text only).
MOVSame as MP4, plus ProRes and other editing codecsAAC, PCMApple's format. MP4 was derived from it, and the two are nearly interchangeable for h.264 content.
MKVAnythingAnythingThe most flexible. Multiple audio tracks, styled subtitles, chapters, attachments. Poorly supported by browsers and some televisions.
WebMVP8, VP9, AV1Opus, VorbisThe open format for the web. Will not hold h.264 or AAC.
AVIOlder codecs: DivX, Xvid, MJPEGMP3, PCMFrom 1992. No proper support for modern codecs or variable frame rates. Convert out of it.

Remux or transcode

This table is the whole point. If the streams inside your file are allowed in the container you want, you can remux: copy the streams, byte for byte, into a new wrapper. No decoding, no encoding, no quality loss, and it runs as fast as the file can be read. In FFmpeg terms that is -c copy, and the converter on this site chooses it automatically when it can.

If they are not allowed, you have to transcode: decode the video to raw frames and encode them again with a codec the target container accepts. That is slow, and it is lossy, because every encode throws something away. An MKV with h.264 inside becomes an MP4 in a second. A WebM with VP9 inside becoming an MP4 means re-encoding every frame to h.264, which in a browser tab takes real time.

How to know which you are facing: run the file through media info. It prints the container and the codec of each stream. Then read across the table. "MKV, h.264, AAC" to MP4 is a remux. "MOV, HEVC" to MP4 is a remux too, since MP4 holds h.265, though the result will only play on devices that support h.265, which is why some converters re-encode it anyway. "WebM, VP9, Opus" to MP4 is a transcode of the video; the audio can sometimes be copied.

The common conversions, honestly

MKV to MP4
Usually a remux. The things that break it are subtitles (MKV holds styled ASS subtitles, MP4 only plain text, so they are dropped or flattened) and a second audio track you did not know was there, since MP4 players tend to play only the first.
MOV to MP4
For phone footage, a remux. For a file exported from an editor in ProRes, a transcode, and a large one: ProRes is an editing codec that is roughly ten times the size of h.264 at the same resolution.
WebM to MP4
Always a video transcode, because MP4 does not take VP8 or VP9. Budget time for it.
AVI to MP4
Nearly always a transcode, because the codec inside an AVI is usually something nothing modern wants. The upside is that the result is far smaller: h.264 is a generation or two ahead of whatever DivX was doing.
MP4 to WebM
A transcode in both directions, video and audio. This site encodes VP8 rather than VP9 for WebM output, because the VP9 encoder is not stable in its WebAssembly build. VP8 files are somewhat larger than VP9 at the same quality; for the use WebM is usually put to, short clips on a web page, that rarely matters.

Why the distinction matters beyond speed

Every transcode is a generation. Video that has been h.264, then VP9, then h.264 again has been through three lossy encoders and looks like it. If you are converting in order to get a file to play somewhere, remux whenever the table allows and keep the original when it does not. If you are converting in order to make the file smaller, that is a different job, covered in the compression guide, and it is worth doing once with the settings you actually want rather than as a side effect of a format change.

A last practical note. When a remux fails, the error from FFmpeg nearly always names the stream it could not place: "could not find tag for codec" followed by a codec name is the container refusing a stream. The fix is to convert that one stream and copy the rest, which is what the converter here does when you choose a codec for the video and leave the audio on "copy".

Tools this applies to

More guides