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.
41 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"