Free online tool

Upload a file

Drop your file hereTap to choose a file

or click to browse, or paste from the clipboard

← Back to Blog

How to Convert MKV to MP4 Without Losing Quality

To convert MKV to MP4 without losing quality, remux it: copy the video and audio streams into an MP4 container without re-encoding them. Free tools such as FFmpeg and VLC do this in about the time it takes to copy the file. The result plays almost everywhere when the MKV holds H.264 video and AAC audio. Other audio, such as AC-3 or DTS, can be converted to AAC while the video is copied, and video that players can't decode has to be re-encoded, which costs a little quality.

For a short clip, Zutilium's MKV to MP4 Converter re-encodes the video to H.264 and the audio to AAC online, a combination nearly every phone, browser and editing app accepts.

How to convert MKV to MP4 online with Zutilium

The MKV to MP4 Converter runs on Zutilium's server, so your MKV is uploaded. It accepts .mkv files up to 100 MiB and 30 minutes long and exports up to five minutes at a time.

  1. Drop the .mkv file on the upload area or click Choose file.
  2. Leave Start time (seconds) at 0, or enter the second where the clip should begin.
  3. Leave Clip duration (seconds) blank to convert everything after the start, if that part runs five minutes or less, or enter up to 300 seconds.
  4. Choose a Maximum dimension (pixels) for the longer side. For a 1920 × 1080 video, 1920 keeps full HD, the default 1280 gives 1280 × 720, and 1080 gives 1080 × 606, not 1080p.
  5. Pick a Quality (Smaller file, Balanced or Higher quality) and, under Audio, Keep audio or Mute.
  6. Click Convert to MP4, then Download when "Your MP4 is ready" appears.

Download it promptly. After a successful conversion, the upload is scheduled for deletion after about one minute and the MP4 after about ten minutes; cleanup runs once a minute, so removal is not instant.

What the converter keeps and leaves out

Because it always re-encodes, no setting is lossless, so hold on to the original MKV.

Part of the MKV In the MP4
First video track H.264, 8-bit, at most 30 fps, never enlarged
First audio track Stereo AAC, 128 kbps, 48 kHz
Other audio tracks Left out
Subtitles Left out, not burned in
Chapters, attached fonts, tags Left out
HDR video Converted without tone mapping, so it can look flat

"First" means first in the file, not the track marked as default. If a commentary or second language comes first, that is what you get, so check the sound before sharing.

Processing limits per export

Each export also has a processing budget of 12 billion output pixels and 30 billion decoded source pixels (frames × width × height). The budget alone allows the lengths below, but the 100 MiB upload, the 80 MiB result and a two-minute processing deadline usually stop a long export first:

Source At 1280 (default) At 1920
1080p, 23.976 fps (film, anime) 5:00 4:01
1080p, 60 fps (game capture) 4:01 3:12
1440p, 60 fps 2:15 2:15
4K, 23.976 fps 2:30 2:30
4K, 60 fps 1:00 1:00

A 1920 × 1080 frame has 2,073,600 pixels, so a 60 fps source hits the 30-billion budget after 14,467 frames, or 4:01, at any output size.

At YouTube's recommended upload bitrates, 100 MiB holds about 1 minute 40 seconds of 1080p (8 Mbit/s video plus 384 kbit/s audio) and only 12 to 24 seconds of 4K, so the 1440p and 4K rows apply only to unusually small files. A five-minute export must also average under about 2.2 Mbit/s, audio included, to fit the 80 MiB result limit.

MKV vs MP4: containers versus codecs

MKV and MP4 are containers: wrappers for separately compressed video, audio and subtitle streams. The codec inside, such as H.264 or HEVC, and its bitrate decide the picture quality, so the same stream looks identical in either.

The difference is what each container can hold and where it plays. Matroska, standardized as RFC 9559, is built to carry many audio, video and subtitle tracks plus chapters and attachments such as fonts. MP4 (ISO/IEC 14496-14) is what the web expects: MDN's guide to media containers lists it as supported by all browsers but leaves MKV off its list.

MKV MP4
Video H.264, HEVC, AV1, VP9, VP8, MPEG-2, Theora and more H.264, HEVC, AV1, VP9, MPEG-2, MPEG-4
Audio AAC, AC-3, E-AC-3, DTS, TrueHD, FLAC, Opus, Vorbis AAC, MP3, AC-3, E-AC-3, Opus, FLAC; DTS and TrueHD with limited player support
Subtitles Text (SRT, styled ASS) and pictures (PGS, VobSub) Text; no PGS
Attached fonts Yes No
Plays in VLC and similar players; support elsewhere varies Browsers, phones, editors, social apps

Check what is inside your MKV

In VLC, play the file and choose Tools > Codec Information (Window > Media Information on a Mac), or list every track with ffprobe, which comes with FFmpeg:

ffprobe -v error -show_entries stream=index,codec_type,codec_name,channels:stream_tags=language -of compact input.mkv
stream|index=0|codec_name=h264|codec_type=video
stream|index=1|codec_name=aac|codec_type=audio|channels=2|tag:language=jpn
stream|index=2|codec_name=ac3|codec_type=audio|channels=6|tag:language=eng
stream|index=3|codec_name=subrip|codec_type=subtitle|tag:language=eng

Remux or re-encode?

Inside the MKV Best method Quality
H.264 video, AAC audio Remux everything Unchanged
H.264 or HEVC video, AC-3, E-AC-3, DTS or TrueHD audio Copy the video, convert the audio to AAC Video unchanged
VP9, AV1, MPEG-2 or other video, for older devices Re-encode to H.264 Small loss
Picture subtitles (PGS) you need on screen Re-encode and burn them in Small loss

HEVC with AAC audio remuxes the same way, but HEVC plays only on devices that can decode it; Chrome needs hardware support.

Remux MKV to MP4 without losing quality in FFmpeg

The FFmpeg command most guides give is short but incomplete:

ffmpeg -i input.mkv -c copy output.mp4

Without a track list, FFmpeg picks one stream of each type: the video with the highest resolution and the audio track with the most channels. Subtitles are dropped without a warning, and adding -map 0 to keep everything fails as soon as the file contains an SRT or ASS track. Choose the tracks yourself instead:

# Video plus every audio track
ffmpeg -i input.mkv -map 0:v:0 -map 0:a -c copy -movflags +faststart output.mp4

# The same, plus text subtitles as switchable MP4 subtitles
ffmpeg -i input.mkv -map 0:v:0 -map 0:a -map "0:s?" -c copy -c:s mov_text -movflags +faststart output.mp4

# Copy the video, convert the first audio track (for example AC-3, DTS or TrueHD) to stereo AAC
ffmpeg -i input.mkv -map 0:v:0 -map 0:a:0 -c:v copy -c:a aac -b:a 192k -ac 2 -movflags +faststart output.mp4
  • 0:v:0 is the first video track, 0:a every audio track and 0:a:1 only the second. The ? skips the subtitle map when there are none; the quotes stop zsh, the default Mac shell, from treating it as a wildcard.
  • If the file also has PGS or VobSub tracks, the subtitle command stops with "Subtitle encoding currently only possible from text to text or bitmap to bitmap". Map only the text tracks by their index in the ffprobe list, such as -map 0:3, instead of "0:s?".
  • -movflags +faststart moves the MP4's index to the start of the file, so playback can begin before a download finishes.
  • For 5.1 surround in the third command, drop -ac 2 and use -b:a 384k.

To convert the video itself, re-encode it; lower -crf values keep more detail:

ffmpeg -i input.mkv -map 0:v:0 -map 0:a:0 -c:v libx264 -crf 20 -preset medium -pix_fmt yuv420p -c:a aac -b:a 160k -movflags +faststart output.mp4

To remux a whole folder in bash or zsh, or in the Windows Command Prompt:

for f in *.mkv; do ffmpeg -i "$f" -map 0:v:0 -map 0:a -c copy -movflags +faststart "${f%.mkv}.mp4"; done
for %f in (*.mkv) do ffmpeg -i "%f" -map 0:v:0 -map 0:a -c copy -movflags +faststart "%~nf.mp4"

A remuxed MP4 is about as big as the MKV. If it is too large to send, compress the video (see common size limits). To keep only the soundtrack, the Audio Extractor saves an MP4's audio as MP3 or WAV. Both online tools take files up to 100 MiB and export up to five minutes at a time; for a longer video, use HandBrake or FFmpeg on your computer.

Other ways to convert MKV to MP4: OBS, VLC and HandBrake

OBS Studio recordings

OBS's recording guide recommends MKV because an MKV isn't corrupted as a whole when recording stops unexpectedly. To get an MP4 without re-encoding, choose File > Remux Recordings, pick the file with the … button and press Remux. To do this automatically, turn on Automatically remux to mp4 in the Advanced tab of Settings.

VLC

VLC's Convert/Save re-encodes with its stock profiles, but it can remux too:

  1. Choose Media > Convert/Save (Windows and Linux; on a Mac use File > Convert / Stream), click Add, select the MKV and continue to the Convert dialog.
  2. Select the Video - H.264 + MP3 (MP4) profile and click Edit selected profile.
  3. Tick Keep original video track on the Video codec tab and Keep original audio track on the Audio codec tab, then save.
  4. Enter a Destination file ending in .mp4 and click Start.

If the codecs don't fit MP4, VLC may create no file at all; use FFmpeg or HandBrake instead.

HandBrake

HandBrake is free for Windows, Mac and Linux, but it always re-encodes the video, so it can't remux. Use it to change codecs, shrink a file or burn in subtitles:

  1. Click Open Source and choose the MKV.
  2. Keep the default Fast 1080p30 preset (H.264 in an MP4, up to 1080p at 30 fps), or choose Creator 1080p60 for 60 fps game footage.
  3. Choose the audio tracks on the Audio tab and the subtitles on the Subtitles tab.
  4. Set the file name in Save As and click Start.

Keeping subtitles and extra audio tracks

  • Text subtitles (SRT, ASS) become MP4's mov_text format with -c:s mov_text: words and timing carry over, ASS positioning and effects don't. To keep a separate file, extract it with ffmpeg -i input.mkv -map 0:s:0 subtitles.srt and load it in a player such as VLC.
  • Picture subtitles (PGS from Blu-ray, VobSub from DVD) are images. FFmpeg won't turn them into text, and HandBrake's subtitle guide says PGS can't be passed into MP4 at all. Burn one track into the picture with HandBrake, keep the MKV, or turn the track into SRT with an OCR subtitle editor.
  • Extra audio tracks survive a remux with -map 0:a; to keep one language only, map it by position, such as -map 0:a:1 for the second.

Troubleshooting

FFmpeg says "codec not currently supported in container"

A track can't go into MP4 as it is; the message names it, for example Could not find tag for codec subrip in stream #3. Map only the tracks you need, add -c:s mov_text for text subtitles, or convert audio with -c:a aac, which also fixes TrueHD's "experimental" error.

The MP4 plays without sound

The player probably can't decode the copied audio, which happens with DTS and TrueHD in MP4 and with AC-3 or E-AC-3 in Chrome. Convert it to AAC with the third FFmpeg command.

A remuxed HEVC MP4 won't open on a Mac or iPhone

FFmpeg labels copied HEVC video as hev1 unless told otherwise, while Apple's streaming guidelines recommend the hvc1 label. Run the remux again with -tag:v hvc1 added after -c copy.

Colors look washed out

The source is HDR, and Zutilium's converter, like the FFmpeg re-encode above, doesn't tone-map it. A remux leaves HDR untouched; for a standard copy, HandBrake's Colorspace filter can tone-map to BT.709.

The online converter refuses the file

  • "Export up to 5 minutes at a time": enter a Clip duration (seconds) of 300 or less, and move Start time (seconds) forward to convert the next section.
  • "This clip needs too much processing": shorten the clip; a smaller Maximum dimension (pixels) helps only where the table shows a longer limit at 1280 than at 1920.
  • "Media export took too long": the two-minute processing limit was reached; shorten the clip or lower the dimension.
  • "The output exceeds 80 MiB": shorten the clip, choose a smaller dimension or pick Smaller file.

Frequently asked questions

Can I just rename .mkv to .mp4?

No. Renaming changes only the label: the file is still Matroska inside, a different structure from MP4, so apps that expect MP4 can't read it. The shortcut works for some MOV files, whose structure MP4 inherited, but not for MKV; remux it instead.

Is MKV or MP4 better quality?

Neither. Quality comes from the codec and bitrate, not the container, so a remuxed MP4 looks identical to the MKV; only re-encoding loses detail. MKV holds more kinds of tracks, while MP4 plays on far more devices and websites.

Can I convert MKV to MP4 on a phone?

Yes, in the browser. Open the MKV to MP4 Converter, tap the upload area and choose the MKV from your files. The 100 MiB upload limit and five-minute export limit still apply.

Is it safe to convert MKV files online?

Zutilium's converter uploads the file to its server. After a successful conversion, the upload is scheduled for deletion after about a minute and the MP4 after about ten minutes. For videos you'd rather not upload, remux them locally with FFmpeg, VLC or OBS.