The Most Common Video Format Misconception
When people compare video formats, they often say things like:
- "MKV quality is better than MP4"
- "MP4 compresses video more than MKV"
- "Converting MKV to MP4 reduces quality"
All of these statements are wrong — because they confuse containers with codecs. Understanding this one distinction eliminates most of the confusion around video formats.
What Is a Container?
A container (also called a wrapper or mux format) is the file format that packages multiple media streams into a single file. Think of it as a shipping box: it holds your video stream, audio stream, subtitle tracks, chapter markers, and metadata together in one organized package.
The container itself does not compress or decompress any data. It simply defines how the streams are stored, indexed, and synchronized inside the file.
Common video containers:
- .mp4 — MPEG-4 Part 14, the universal standard
- .mkv — Matroska, the feature-rich open format
- .webm — Google's web-optimized format (based on Matroska)
- .mov — Apple's QuickTime container
- .avi — Microsoft's legacy container (1992)
What Is a Codec?
A codec (coder-decoder) is the compression algorithm that encodes and decodes the actual media data. This is what determines quality, file size, and encoding speed. Think of the codec as how you pack items inside the box — efficiently or wastefully.
Video Codecs
- H.264 (AVC): The most widely used video codec (2003). Universal hardware support, good compression.
- H.265 (HEVC): H.264's successor (2013). 40–50% better compression, but slower and less compatible.
- VP9: Google's open-source codec (2013). Similar efficiency to H.265, used by YouTube.
- AV1: Next-generation codec (2018). 20–30% better than H.265, royalty-free, very slow to encode.
- Xvid/DivX: Legacy MPEG-4 Part 2 codecs. Obsolete but found in old AVI files.
Audio Codecs
- AAC: Advanced Audio Coding. The standard for MP4, excellent quality at 128–256 kbps.
- MP3: Older but universally supported. Good quality at 192–320 kbps.
- Opus: Modern codec, excellent at low bitrates. Used in WebM.
- FLAC: Lossless compression. Perfect quality, large files. Supported in MKV, not MP4.
- DTS / Dolby TrueHD: Surround sound codecs from Blu-ray. MKV only.
Container-Codec Compatibility Table
Not every codec fits in every container. This is why format conversion sometimes requires re-encoding:
| Container | Video Codecs | Audio Codecs |
|---|---|---|
| MP4 | H.264, H.265, AV1 | AAC, MP3, AC-3 |
| MKV | H.264, H.265, VP9, AV1, VP8, Theora, Xvid, virtually any | AAC, FLAC, Opus, DTS, TrueHD, MP3, Vorbis, virtually any |
| WebM | VP8, VP9, AV1 | Vorbis, Opus |
| MOV | H.264, H.265, ProRes | AAC, PCM, Apple Lossless |
| AVI | Xvid, DivX, MJPEG | MP3, PCM |
Notice that MKV accepts virtually any codec, while MP4 and WebM are more selective. This is the fundamental reason MKV-to-MP4 conversion sometimes requires re-encoding.
Why This Matters for Conversion
When you convert between formats, one of two things happens:
Scenario 1: Remux (Container Change Only)
If the codecs inside your source file are compatible with the target container, the streams are simply copied from one container to another. This is called remuxing. It's near-instant and produces zero quality loss.
Example: MKV with H.264 video + AAC audio → MP4. Both codecs are MP4-compatible, so the data is copied directly.
Scenario 2: Re-encode (Codec Change Required)
If the codecs are not compatible with the target container, the video and/or audio must be decoded and re-encoded with a compatible codec. This involves a small quality loss (imperceptible at CRF 23) and takes longer.
Example: MKV with VP9 video + FLAC audio → MP4. VP9 is not well supported in MP4, and FLAC is not supported at all. The video is re-encoded to H.264 and audio to AAC.
The key insight: Converting MKV to MP4 does not automatically reduce quality. If the codecs are compatible, the conversion is lossless. If re-encoding is needed, CRF 23 produces visually identical results.
Practical Examples
Here is what happens inside our converter for common MKV files:
| MKV Contents | Conversion Method | Quality Impact | Speed |
|---|---|---|---|
| H.264 + AAC | Remux (copy) | Zero loss | Instant |
| H.264 + DTS | Copy video, re-encode audio | Negligible (audio only) | Fast |
| H.265 + AAC | Remux (copy) | Zero loss | Instant |
| VP9 + Opus | Full re-encode | Imperceptible at CRF 23 | Slower |
| Xvid + MP3 (AVI) | Full re-encode | Often improves (better codec) | Slower |
Common Misconceptions Debunked
- "MKV has better quality than MP4" — False. An H.264 video at CRF 18 is identical in MKV and MP4. MKV simply supports more codecs and features (subtitles, audio tracks).
- "Converting reduces quality" — Only if re-encoding occurs, and even then the loss is imperceptible with proper settings. Remuxing is lossless.
- "Renaming .mkv to .mp4 works" — Never. The containers have different internal structures. Renaming produces a corrupted file.
- "MP4 is more compressed" — The container adds negligible overhead (a few KB). File size is determined by the codec and its settings.
- "All MKV files need re-encoding" — False. Many MKV files contain H.264 + AAC, which can be remuxed to MP4 instantly.