How to convert MKV to MP4

Updated

MKV is a great format for recording: OBS and many other tools use it because it’s robust and flexible. But Discord shows MKV files as a download card instead of a video, and web browsers don’t officially support MKV. MP4 plays everywhere. Here’s how to convert, and why it’s sometimes instant and sometimes not.

Short answer: open 20mb.net, choose the MKV and click Use MP4 instead (or set Advanced options → Output format → MP4), then Compress. If the file is already under 20 MB with H.264 and AAC inside, it’s repackaged in seconds with no quality loss. Otherwise it’s re-encoded to H.264 and AAC and made to fit.

MKV and MP4: the same video in a different box

MKV (Matroska) and MP4 are containers. A container is the box that holds the video, the sound and extras such as subtitles and chapters. The codecs inside, like H.264, HEVC or AAC, decide how the picture and sound are compressed. The same H.264 video can sit in either box.

MKV can hold almost any codec, several audio and subtitle tracks, and it stays readable if a recording stops abruptly, which is why recording software likes it. MP4 is less flexible, but it’s the standard of the web: every current browser and phone plays an MP4 with H.264 video and AAC sound, and so does Discord, on every device.

Remux or re-encode?

There are two ways to turn an MKV into an MP4:

  • Remuxing copies the video and sound into an MP4 container without decoding them. It takes seconds, loses no quality and keeps the file about the same size. It only works when the codecs inside are allowed in MP4, and the result only plays everywhere if those codecs do.
  • Re-encoding decodes the video and compresses it again. It’s slower and loses a little quality, but it can change everything: the codec, the file size, the resolution and the frame rate. You need it when the file is too big for where you’re sending it, or when the codec itself doesn’t play everywhere, as with HEVC, AV1, 10-bit or HDR video, or AC-3 or DTS sound.

Remuxing doesn’t make a file smaller. If your MKV is 300 MB, the remuxed MP4 is also about 300 MB, still far over Discord’s free 20 MB limit.

How 20mb.net converts MKV to MP4

20mb.net keeps your video’s format by default, so an MKV stays an MKV unless you change it. Because Discord can’t play MKV in the chat, it tells you so and offers a one-click Use MP4 instead. Then it picks the right method on its own:

When 20mb.net repackages an MKV into MP4 and when it re-encodes it
Your MKVWhat 20mb.net doesResult
Under the target size, with H.264 video (8-bit, standard colors) and AAC or MP3 soundRepackages it without re-encodingThe same video and sound in an MP4, in seconds
Under the target size, with HEVC, AV1, 10-bit or HDR video, or other soundRe-encodes itAn H.264 and AAC MP4 that plays for everyone
Over the target sizeRe-encodes itAn H.264 and AAC MP4 under the target, checked to the byte
You trim it or change the resolution or frame rateRe-encodes itAn H.264 and AAC MP4 with your changes

Repackaging keeps the codecs as they are, so 20mb.net only does it when the result plays everywhere. An MKV with HEVC or AV1 video inside is re-encoded to H.264 instead.

When it re-encodes, the MP4 gets 8-bit 4:2:0 color, standard dynamic range (HDR is converted), and its index at the start of the file so it starts playing right away. 20mb.net keeps the main video and one audio track; subtitle tracks and extra audio tracks aren’t carried over.

Step by step

  1. Open the compressor. Go to 20mb.net on your computer or phone.
  2. Choose the MKV file. Drop it onto the page or click Choose a video. It stays on your device.
  3. Switch to MP4. Click Use MP4 instead, or open Advanced options and set Output format to MP4.
  4. Pick a target size. Keep 20 MB for Discord, or choose 18 MB for email.
  5. Convert. Press Compress. A repackage finishes in seconds; a re-encode shows a progress bar with the time left.
  6. Download the MP4. It’s named after the original, like match-20mb.mp4.

Converting large MKV files at full size

20mb.net always produces a file under your chosen target, 20 MB at most, because it’s made for sharing. To keep a large recording at full size and quality, remux it instead:

  • In OBS Studio: File → Remux Recordings turns MKV recordings into MP4 without re-encoding.
  • With FFmpeg, the engine 20mb.net is built on, the command ffmpeg -i input.mkv -c copy -sn output.mp4 does the same remux on a computer. The -sn part leaves out subtitles, which often can’t be copied into MP4 as they are.

Remember that a remux keeps the codecs: if the recording is HEVC or AV1, the MP4 will be too. For sharing in Discord, the Discord compression guide covers the rest.

Questions and answers

Does converting MKV to MP4 lose quality?

Not when it’s a remux: the video and sound are copied as they are. Re-encoding does lose a little quality, which is the price of a much smaller file. 20mb.net only re-encodes when it has to, for example to fit the size limit.

Why is my converted MP4 still too big for Discord?

Remuxing doesn’t compress anything, so the MP4 is as big as the MKV. To fit Discord’s 20 MB free limit, the video has to be re-encoded at a lower bitrate, which 20mb.net does automatically when the file is over the target.

Are subtitles and extra audio tracks kept?

No. 20mb.net keeps the main video and one audio track, which is what Discord and most players use. If you need subtitles or several audio tracks, keep the MKV for yourself and share the MP4.

Can I convert MKV to MP4 on my phone?

Yes. 20mb.net works in Safari, Chrome, Firefox and Edge on iPhone and Android, the same way as on a computer. Large files take longer on a phone, and very long 4K videos can run out of memory.

Need a video under 20 MB right now?

Open the compressor