Replace video track in MKV with track from different MKV file

3

I have two MKV files with the same movie and I want to replace video track in the first file with video track from the second file, using commandline (so it can be used again with different pair of MKV files).

It's important that I want to keep all attachments, audio tracks, chapters etc in first MKV unchanged. This is why, if possible, I don't want to extract everything from first file and then mux everything again with only video track changed.

lort

Posted 2014-05-06T07:24:20.810

Reputation: 161

Answers

3

Following command seems to do the thing:

mkvmerge -o "merged.mkv" -D ( "first.mkv" ) -A -S -T -M -B --no-chapters ( "second.mkv" )

It takes everything except the video (-D) from the first.mkv and only video (-A -S -T -M -B disables audio, subtitles, tags, attachments and buttons) from second.mkv.

lort

Posted 2014-05-06T07:24:20.810

Reputation: 161