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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.