mkvmerge -o output.mkv -atrack !2 input.mkv
But I wasn't able to get the exclamation mart (meaning DON'T copy this track) to work. For some reason I kept getting "track not found" message. This should work with --vtrack or --strack (subtitle) or whatever.
Fortunately, I wanted to remove all the subtitles from my files, so I used the following instead:
mkvmerge -o output.mkv --no-subtitles input.mkv
If you only want to do this on one file, the mkvmergeGUI is fast and easy, but if you want to do it on a whole directory of files, you want to use this at the command line in a "For Loop," like so:
for i in *mkv; do mkvmerge -o ./newfiles/`basename "$i" mkv`.mkv --no-subtitles "$i" ; done
This will remove all subtitle tracks from all MKV files in the current folder, then put the new files in a previously-created sub-folder named "newfiles".
i was unexpected at this time.
ReplyDeleteWhat if you just want the output to the same directory? and what is the correct syntax for this to be placed in a batch file?
ReplyDeleteThe ! is a bash keyword that will get expanded/substituted, for a history item. !2 means replace with history item 2. This messes it up. You need to delimit it with a \ or enclose the argument in single quotes ', to prevent the expansion. Then it will work.
ReplyDeleteAvdshare Video Converter can Remove subtitles from MKV without recoding the original streams
ReplyDeletehttps://www.avdshare.com/remove-subtitles-from-mkv
Avdshare Video Converter can Remove subtitles from MKV without recoding the original streams
ReplyDeletehttps://www.avdshare.com/remove-subtitles-from-mkv