Mkvmerge command line on Windows not working for multiple subtitle languages

I''m trying to mux many subtitle languages into the same file (MKV as output) but it's not working. I'm trying the following from a batch file:

FOR /R %%A IN (*.mp4 *.webm) DO mkvmerge -o "%%~nA.mkv" "%%~A" --language 0:eng "%%~nA.en.srt" --language 1:spa "%%~nA.es.srt" --language 2:ger "%%~nA.de.srt" --language 3:por "%%~nA.pt.srt"

What am I doing wrong?

I get the following result:
Error: The file 'video1.en.srt' could not be opened for reading: open file error.

It's reading all the files correctly, but it won't process the command.

4

1 Answer

Now my command is working.

zx485 was right. All files must exist in order for it to work. Also, all language flags must be set to zero in order for it to work.

FOR /R %%A IN (*.mp4 *.webm *.avi) DO mkvmerge -o "%%~nA.mkv" "%%~A" --language 0:eng "%%~nA.en.srt" --language 0:spa "%%~nA.es.srt" --language 0:ger "%%~nA.de.srt" --language 0:por "%%~nA.pt.srt"

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like