0

I have a bunch of mkv files, and an mka file for each one with the same name. I would like to merge them. I can do it with mkvmerge-gui one-by-one, but I want to do it from the terminal, because a script would be able to do it for each file.

I tried this:

mkvmerge -o 001.mkv EP01.mkv +EP01.mka

And i get this:

mkvmerge v7.1.0 ('Good Love') 64bit built on Jul 27 2014 13:10:18
'EP01.mkv': Using the demultiplexer for the format 'Matroska'.
'EP01.mka': Using the demultiplexer for the format 'Matroska'.
'EP01.mkv' track 0: Using the output module for the format 'AVC/h.264'.
'EP01.mkv' track 1: Using the output module for the format 'FLAC'.
'EP01.mkv' track 2: Using the output module for the format 'FLAC'.
'EP01.mka' track 0: Using the output module for the format 'FLAC'.
'EP01.mka' track 1: Using the output module for the format 'FLAC'.
'EP01.mka' track 2: Using the output module for the format 'AC3'.
'EP01.mka' track 3: Using the output module for the format 'PGS'.
'EP01.mka' track 4: Using the output module for the format 'PGS'.
No append mapping was given for the file no. 1 ('EP01.mka'). A default mapping of 1:0:0:0,1:1:0:1,1:2:0:2,1:3:0:3,1:4:0:4 will be used instead. Please keep that in mind if mkvmerge aborts with an error message regarding invalid '--append-to' options.
Error: The file no. 0 ('EP01.mkv') does not contain a track with the ID 3, or that track is not to be copied. Therefore no track can be appended to it. The argument for '--append-to' was invalid.

Thank you for your help!

2
  • Remove the plus. It means that you want to append the file rather than add the stream. – v010dya Nov 10 '14 at 19:27
  • See my answer. And please consider adding Matroska as the tag for your question, so that people can find it easier in the future if they will have similar problems. – v010dya Nov 10 '14 at 19:32
2

You do not need the + sign in the command. It means something quite different than you think.

mkvmerge -o output.mkv input.mkv input.mka

This should do the trick for you.

The plus sign appends the streams from the second file to the first. So if you were to have two video files and you wanted to make a single file that plays first the video from file1 and then video from file2 on the same stream, then you'd use the plus. The error basically tells you that it cannot find any video in your .mka file, and it has nothing to append.

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.