Plus how to convert between formats
You have plenty of options for exporting a video editing project, ripping video discs, or converting a batch of video files to a single format. MP4 and MKV are two of the most popular video file formats, but how they differ from each other is not immediately clear.
If you’re trying to decide which one is best for your needs or which version of a file you should download, there are some important things you need to know.
What Is MKV?
Matroska Multimedia Container (MKV) was developed to replace the AVI format. The term “container” is important and means that Matroska Video is simply a container for various video and audio codec formats. A “codec” (short for coder/decoder) is an algorithm that describes how video and audio data should be represented. Different codecs have varying degrees of quality loss and size compression.
The name “Matroska” comes from the Russian Matryoshka, the classic wooden nesting dolls. This refers to the most important feature of MKV: its ability to contain multiple media streams simultaneously. A single MKV file can contain multiple video, audio, and subtitle tracks. It also supports metadata such as chapters and menus.
This means, for example, having one video track with annotations and one without, or one track with censored content and another without. You can have audio tracks in multiple languages or stereo and surround tracks in one file. You can also mix codecs and have one audio track be AAC and another MP3. MKV supports any video codec and any audio codec.
MKV is an open file format and doesn’t require a licensing fee for software or hardware players to support it.
What Is MP4?
MP4 is short for MPEG-4 Part 14. It’s a container format based on Apple’s QuickTime MOV format. MP4 is identical to QuickTime but has minimum specified requirements and features that QuickTime does not. The QuickTime format supports some codecs that MP4 does not—FLAC lossless audio, for example.
While an iPhone will play MP4 and Quicktime formats without issue, you can’t play MOV files on an Android phone without converting it first or downloading a specialized player app. QuickTime files may contain MP4 video and audio data, but they can also include DRM (Digital Rights Management) to ensure that only the licensed owner of the media can play it.
MP4 supports several video codecs, including HEVC, H.264, MPEG-4, MPEG-2, and MPEG-1. It supports AAC, MP3, and multiple lossless audio codecs. MP4 files do support subtitles in the 3GPP format.
MP4 is a proprietary format and may attract licensing fees for anyone who wants to make a player device or application.
Video and Audio Quality: MKV Wins
As mentioned above, both MKV and MP4 are container formats. So, if you use the same codec (e.g., AVC/H.264) and encoding settings with both containers, there will be no difference in quality between them. The actual codecs encode the audio and video streams and can have several types.
Video quality depends on many factors besides the codec you’re using. These factors include the bitrate, resolution, frame rate, and color depth. MKV does support codecs that arguably offer better quality than the small selection of MP4 codecs.
The same is true for the supported audio formats, with some offering better technical quality than MP4. MP4 only supports “lossy” video formats, but MKV supports lossless video using FFV1 encoding.
Suitability for Streaming: MP4 Wins
When both MKV and MP4 were created in the early 2000s, streaming video as we know it today was a far-fetched idea, so it should be no surprise that it wasn’t at the top of the list. As a result, MKV isn’t a format favored for web streaming. However, MP4 has been updated to support two streaming protocols: HLS and MPEG-DASH.
HLS only works with H.264 and H.265 (HEVC), while MPEG-DASH works with anything MP4 can contain. HLS is a format specific to Apple devices, and MPEG-DASH is the more open format. Both technologies allow for variable bitrate streaming, making it suitable for streaming video on your local network or over the web.
File Size: It’s a Draw
As with video and audio quality, there should be no practical difference between an MKV format file and an MP4 file using the same settings and codecs. However, because MKV format files can contain multiple audio and video tracks, they can end up much larger than MP4 format files.
Of course, you’re getting more content for the space, but if you aren’t interested in additional language tracks, the extra space MKV files take up is wasted.
Playback Compatibility: MP4 Wins
You’d expect that since MKV is free and open source, it would have broad support compared to MP4, but the opposite is true. MP4 has almost universal support, especially for smart TVs, portable devices, or media players. The default video players included with most operating systems support MP4. So it’s not hard to decide which format has better compatibility.
If you want to play MKV files, you almost always have to download a specialized player such as VLC or make sure that the smart TV or media player you buy also lists MKV as a supported container format. Most importantly, all modern web browsers have native support for MP4 playback, making it a near-ubiquitous video format on the web.
Another problem is that MKVs can contain essentially any audio and video format. So, just because a device supports the container format doesn’t mean it can play back the audio or video content in a file.
Ease of Creation: MP4 Wins
Since MP4 only supports a limited number of codecs, playback will rarely fail. Almost anything can play an MP4, and just about every MP4 will work on those devices unless someone has done something strange to it during the creation process.
Speaking of which, if you want to make an MKV, it’s a much more complex process than creating an MP4. So unless you must have multiple media tracks, menus, chapters, and all the other extra features of MKV, it’s not worth the bother.
Versatility: MKV Wins
While you probably need to have a specific hardware or software player to use MKV files, there’s no doubt it’s the most versatile video file format of the two options. First, you get to choose any codec you’d like to use with MKV files, although, as mentioned above, that can also be a weakness in player support.
MKVs can contain almost any combination of video and audio in a single file. It is the best format for making good-quality compressed backups of your DVD and Blu-Ray discs. Since you can preserve almost all of the video and audio content. That’s handy if you want to port your physical disc collection to a home streaming solution such as Plex. The alternative is to make disc images such as ISO files, but of course, these high-quality video “rips” are enormous compared to a compressed MKV file.
Both formats have an audio-only version. M4A and MKA. M4A only supports lossy AAC encoding, while MKA supports lossless formats such as FLAC.
To add even more to its versatility, MKV supports 3D video in the form of its .mk3d file format. Although no one really has a 3D display anymore, it’s notable that MKV allows for such content to be preserved, and VR headsets still allow for 3D movie viewing.
Converting Between Formats
There’s no real reason to convert an MP4 file to an MKV file, but you may often want to convert a video saved as MKV to MP4—usually so it will work with mobile devices, smart TVs, or set-top media players. You may also find that you don’t need the extra language or video tracks, so converting an MKV to MP4 can save storage space.
Using video converter software on your Windows or Mac computer to perform a conversion isn’t hard, but you will have to choose which video and audio track from the MKV will go into the MP4. If you want to keep multi-language versions of an MKV file, you’ll have to make multiple MP4 files, each with the combination of audio and video you need. As for subtitles, you may have to extract the subtitle files from the MKV video container. As long as the subtitle file is in the same folder as the MP4 and has the same name, most MP4 players will automatically make it available.
For instructions to get the best video output format, check out How to Use Handbrake to Convert MKV to MP4.