I will provide a simple and general answer that works with any number of audios and srt subtitles and respects the metadata that may include the mkv container. So it will even add the images the matroska may include as attachments (though not another types AFAIK) and convert them to tracks; you will not be able to watch but they will be there (you can demux them). Ah, and if the mkv has chapters the mp4 too.
ffmpeg -i <mkv-input> -c copy -map 0 -c:s mov_text <mp4-output>
As you can see, it's all about the -map 0
, that tells FFmpeg to add all the tracks, which includes metadata, chapters, attachments, etc. If there is an unrecognized "track" (mkv allows to attach any type of file), it will end with an error.
You can create a simple batch mkv2mp4.bat
, if you usually do this, to create an mp4 with the same name as the mkv. It would be better with error control, a different output name, etc., but you get the point.
@ffmpeg -i %1 -c copy -map 0 -c:s mov_text "%~n1.mp4"
Now you can simply run
mkv2mp4 "Video with subtitles etc.mkv"
And it will create "Video with subtitles etc.mp4" with the maximum of information included.