I have about 300 videos that I want to:
- Remove 1 audio track
- Remove Chapter 1 and 4
If I load one of the videos on MKVtoolnix and I see the command line I get this:
I created a .command file and it works! but I want to do this for all the files and I just can't figure it out, how do I make it go to each video and do that instead of an specific one?/Applications/MKVToolNix-45.0.0.app/Contents/MacOS/mkvmerge --ui-language en_US --output '/Users/user/Desktop/dbz/DBZ 002.mkv' --audio-tracks 1 --language 0:eng --track-name '0:30th Anniversary BD' --default-track 0:yes --display-dimensions 0:1440x1080 --language 1:jpn --track-name '1:Tokai Broadcast' --default-track 1:yes --language 4:eng --track-name 4:Funimation-Simmons --default-track 4:yes --language 5:eng --track-name 5:Signs '(' '/Users/user/Desktop/dbz/DBZ002 The Mightiest Warrior in All of History is Goku‘s Older Brother!.mkv' ')' --split chapters:2,4 --title 'DBZ 002' --track-order 0:0,0:1,0:4,0:5
+ Reply to Thread
Results 1 to 8 of 8
I moved your thread to the mac forum where you can get more help.I think,therefore i am a hamster.
Try something like:
#!/bin/bash for filename in /Users/user/Desktop/dbz/*.mkv do /Applications/MKVToolNix-45.0.0.app/Contents/MacOS/mkvmerge -o "/Users/user/Desktop/dbz/output/$(basename "$filename")" --audio-tracks 1 --split chapters:2,4 "$filename" done
Last edited by sneaker; 1st May 2020 at 02:12. Reason: fixed some more errors
Thanks for the reply, but I can't get it to work correctly.
It only goes to the last video on the folder, and the name I get is "$filename-001.mkv", "$filename-002.mkv" and so on.
I'd appreciate any help, thanks!
Try again, there were some errors.
It works, thanks!!!
Another question, in the output folder I'm getting these filenames:
DBZ002 The Mightiest Warrior in All of History is Goku‘s Older Brother!
How can I fix that? empty spaces are being replaced with "?"
Unfortunately, I don't know. I did a last attempt to change the script in my old post. You can try again.
Or maybe afterwards run another script to replace any "?"(non-ASCII?) by " "?
(Not sure if the "?" are actual question marks or just a placeholder for other non-printable characters.)
The revised version worked!
Thank you so much.