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.
command-line matroska
add a comment |
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.
command-line matroska
Are you sure thatvideo1.en.srt
does exist in the directory theFOR
loop is executed in? Just to make sure... Or maybe it is open in another program withoutSHARE_READ
privileges...
– zx485
Jan 15 at 23:27
Yes. It does exist but sometimes it doesn't. Sometimes I get es.srt instead of en.srt because some videos are subtitled in English, some in Spanish. Do you that could be a problem? If yes, I will autotranslate all of them to en.srt
– G. L.
Jan 16 at 0:58
1
I guess you have to check if a file exists before passing it tomkvmerge
.
– zx485
Jan 16 at 2:08
OK. I'll test today if it will solve the problem. That is, I have a batch to autosub the video in "en.srt". I don't think it's gonna work but I'll try.
– G. L.
Jan 16 at 10:36
add a comment |
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.
command-line matroska
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.
command-line matroska
command-line matroska
asked Jan 15 at 22:16
G. L.G. L.
7511
7511
Are you sure thatvideo1.en.srt
does exist in the directory theFOR
loop is executed in? Just to make sure... Or maybe it is open in another program withoutSHARE_READ
privileges...
– zx485
Jan 15 at 23:27
Yes. It does exist but sometimes it doesn't. Sometimes I get es.srt instead of en.srt because some videos are subtitled in English, some in Spanish. Do you that could be a problem? If yes, I will autotranslate all of them to en.srt
– G. L.
Jan 16 at 0:58
1
I guess you have to check if a file exists before passing it tomkvmerge
.
– zx485
Jan 16 at 2:08
OK. I'll test today if it will solve the problem. That is, I have a batch to autosub the video in "en.srt". I don't think it's gonna work but I'll try.
– G. L.
Jan 16 at 10:36
add a comment |
Are you sure thatvideo1.en.srt
does exist in the directory theFOR
loop is executed in? Just to make sure... Or maybe it is open in another program withoutSHARE_READ
privileges...
– zx485
Jan 15 at 23:27
Yes. It does exist but sometimes it doesn't. Sometimes I get es.srt instead of en.srt because some videos are subtitled in English, some in Spanish. Do you that could be a problem? If yes, I will autotranslate all of them to en.srt
– G. L.
Jan 16 at 0:58
1
I guess you have to check if a file exists before passing it tomkvmerge
.
– zx485
Jan 16 at 2:08
OK. I'll test today if it will solve the problem. That is, I have a batch to autosub the video in "en.srt". I don't think it's gonna work but I'll try.
– G. L.
Jan 16 at 10:36
Are you sure that
video1.en.srt
does exist in the directory the FOR
loop is executed in? Just to make sure... Or maybe it is open in another program without SHARE_READ
privileges...– zx485
Jan 15 at 23:27
Are you sure that
video1.en.srt
does exist in the directory the FOR
loop is executed in? Just to make sure... Or maybe it is open in another program without SHARE_READ
privileges...– zx485
Jan 15 at 23:27
Yes. It does exist but sometimes it doesn't. Sometimes I get es.srt instead of en.srt because some videos are subtitled in English, some in Spanish. Do you that could be a problem? If yes, I will autotranslate all of them to en.srt
– G. L.
Jan 16 at 0:58
Yes. It does exist but sometimes it doesn't. Sometimes I get es.srt instead of en.srt because some videos are subtitled in English, some in Spanish. Do you that could be a problem? If yes, I will autotranslate all of them to en.srt
– G. L.
Jan 16 at 0:58
1
1
I guess you have to check if a file exists before passing it to
mkvmerge
.– zx485
Jan 16 at 2:08
I guess you have to check if a file exists before passing it to
mkvmerge
.– zx485
Jan 16 at 2:08
OK. I'll test today if it will solve the problem. That is, I have a batch to autosub the video in "en.srt". I don't think it's gonna work but I'll try.
– G. L.
Jan 16 at 10:36
OK. I'll test today if it will solve the problem. That is, I have a batch to autosub the video in "en.srt". I don't think it's gonna work but I'll try.
– G. L.
Jan 16 at 10:36
add a comment |
1 Answer
1
active
oldest
votes
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"
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1394713%2fmkvmerge-command-line-on-windows-not-working-for-multiple-subtitle-languages%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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"
add a comment |
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"
add a comment |
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"
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"
answered Jan 16 at 11:15
G. L.G. L.
7511
7511
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1394713%2fmkvmerge-command-line-on-windows-not-working-for-multiple-subtitle-languages%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Are you sure that
video1.en.srt
does exist in the directory theFOR
loop is executed in? Just to make sure... Or maybe it is open in another program withoutSHARE_READ
privileges...– zx485
Jan 15 at 23:27
Yes. It does exist but sometimes it doesn't. Sometimes I get es.srt instead of en.srt because some videos are subtitled in English, some in Spanish. Do you that could be a problem? If yes, I will autotranslate all of them to en.srt
– G. L.
Jan 16 at 0:58
1
I guess you have to check if a file exists before passing it to
mkvmerge
.– zx485
Jan 16 at 2:08
OK. I'll test today if it will solve the problem. That is, I have a batch to autosub the video in "en.srt". I don't think it's gonna work but I'll try.
– G. L.
Jan 16 at 10:36