Convert MP4 to MKV without re-encoding
Going from MP4 to MKV doesn't require redoing the video: you simply move it to a different "box". The command copies the streams as they are, in a few seconds, with no quality loss at all.
Updated on
An MKV can hold several audio tracks and subtitles.
How to use it
- Install ffmpeg if you haven't already.
- Open a terminal in the folder containing your file.
- Copy the generated command, adjust the file names if needed, then run it.
- Open the resulting file to check the result.
MP4 or MKV: what's the difference?
Both are containers, meaning files that bundle video, audio and possibly subtitles. MP4 is the most compatible (phones, browsers, TVs). MKV is more flexible: it accepts almost any codec, multiple audio tracks and chapters, which makes it the favorite format for archiving and editing.
The other way around
A movie's MKV often contains audio or subtitles that MP4 can't handle. The reverse conversion page takes this into account.
Frequently asked questions
Is there any quality loss?
No: with "-c copy", the video frames and audio are copied as they are. Only the packaging changes, which is why the operation is so fast.
Why not use -map 0 to copy everything?
An MP4 can contain data tracks (timecode, camera metadata) that MKV can't hold: ffmpeg would stop with an error. The command explicitly selects the video, the audio and, if needed, the subtitles.
Why convert a subtitle to SRT?
Subtitles in an MP4 are in mov_text format, which MKV can't accept as is. They are therefore converted to SRT text, which every player can read.
What should I do for the reverse operation?
Use the MKV to MP4 conversion page, which also handles cases where the content needs to be re-encoded.