Hi, I'm new here in the forums, I came here because I'm having some problems trying to replace subtitles from a video.
I want to remove the current ones that are in the file and put another subtitle instead using mkvmerge from the terminal. (I want to do it for a bunch of files using a batch script)
So for remove the current subtitles I’m using this command:
My problem is when I try to add the new subtitles I must duplicate my files again because mkvmerge always ask me for an output file instead of replace the current one.Code:for i in *.mkv; do mkvmerge --no-subtitles "$i" -o WithoutSubs/"$i" done
There is any way to remove the currents subs and add another one into a single output file?![]()
+ Reply to Thread
Results 1 to 12 of 12
-
-
Code:
for i in *.mkv; do mkvmerge -o "./WithoutSubs/$i" --no-subtitles "./$i" "./${i%.*}.ass" done
-
-
Post the complete error message/log. What is the file name of your subtitle file?
-
-
Mkvmerge doesn't support wildcards. Or do you mean you don't actually use the wildcard? I'm not sure I understand you correctly. If your shell interprets "./${i%.*}.ass" as "*.ass" then that's one more thing that's different on mine.
Here I'd have:
Code:!#/bin/bash for i in *.mkv do mkvmerge -o "./WithoutSubs/$i" --no-subtitles "./$i" "./${i%.*}.ass" done
Last edited by sneaker; 15th Jan 2017 at 09:18.
-
Yup, I'm running this:
Code:for i in *.mkv; do mkvmerge -o WithoutSubs/"$i" --no-subtitles "$i" "*.ass" done
I'll try pass the exact subtitle file name now.
Maybe if you post your OS/shell someone else has advice on what you need to change.
I'm running on Ubuntu 16.10 x64, bash 4.3.46 -
And without "./"?
Code:!#/bin/bash for i in *.mkv do mkvmerge -o "WithoutSubs/$i" --no-subtitles "$i" "${i%.*}.ass" done
-
Srry for the double post.
Do u know how can I pass the language code for the subtitle?
I just try to addCode:--language 0:spa
-
Tried to add where? What does "it doesn't work" mean? Error message?
The command order is important.
Code:!#/bin/bash for i in *.mkv do mkvmerge -o "WithoutSubs/$i" --no-subtitles "$i" --language 0:spa "${i%.*}.ass" done
-
Similar Threads
-
mkvmerge batch subtitle replace
By ben45 in forum Newbie / General discussionsReplies: 4Last Post: 14th Oct 2024, 22:08 -
How to extract only forced subtitles with a batch muxing using mkvmerge?
By davboc in forum EditingReplies: 1Last Post: 1st Jul 2016, 13:28 -
My Subtitles wont show up! (Mkvmerge GUI software)
By amiynwahid in forum User guidesReplies: 8Last Post: 17th Dec 2012, 23:50 -
Multiple subtitles with MKVMerge
By pandabear in forum Newbie / General discussionsReplies: 2Last Post: 18th Nov 2012, 12:10 -
Problem merging video and subtitles with mkvmerge.
By csh in forum EditingReplies: 4Last Post: 7th Nov 2012, 21:16