hey all,
i have been searching and i can't seem to find the right answer, or i don't know enough about this kind of stuff on OS X
I have a large folder of Multi Audio MKV files, and i need to disable 3 of the 4 audio tracks
I know how to do this one by one, but i have read i should be able to do this with a batch file... I can't for the life of me, get any of the examples to work for me.
Could anyone please point me in the right direction.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 14 of 14
Thread
-
Last edited by neostylez; 13th Sep 2015 at 21:48. Reason: change title
-
Do you want to disable or remove the tracks?
For removing you need to write a script using mkvmerge:
Code:#!/bin/bash mkdir "output" for filename in ./*.mkv do mkvmerge -o "./output/$filename" --audio-tracks 1 "./$filename" done
-
Can anyone help me to setup a script for Mac and MKVToolNix to delete unwantend audio tracks (in my case ID2) from a whole bunch of MKV's?
I'm so sorry but I'm a absolute newbie.
Would be so great if anyone could help me.
Bets wishes from Germany! -
You should be able to use the script I posted above. It will only keep audio track ID1 so it will already do what you want if there are only two audio tracks. Otherwise you can use "!2" instead of "1". It means "keep all audio tracks except ID2".
-
Thank you for your reply but how do I have to use it? Do I have to use it within MKVToolNix or do I have to run AppleScript and create something?
-
There are different ways to run it. One is to save it in a text file called e.g. "whatever.sh" and copy that to the folder you want to work in. Then open the terminal and navigate to said folder (cd command...). There you need to make it executable once via "chmod +x whatever.sh". Then "./whatever.sh" to actually execute it. You may have to edit the "mkvmerge" in the script to include the full absolute path of the mkvmerge executable or copy it to a known path like (I think) "/usr/local/bin". https://forum.videohelp.com/threads/377326-mkvtoolnix-8-9-0-mkvmerge-from-command-line
-
Thank you so much! You are my hero of the day!
After a long long time I'm now abled to get this problem solved for me.
Thank you!!! -
Thanks this was very helpful. How can I edit this to also merge a subtitle file with the same name? I tried
Code:mkvmerge -o "./output/$filename" --audio-tracks 1 --language 0:eng "./$filename.srt" "./$filename"
-
The order of the commands is important. They belong before the corresponding input file. You tried to use "--audio-tracks 1" on the subtitle file.
This will keep only the audio track with TrackID 1 of the mkv and set the language of the srt to english:
mkvmerge -o "./output/$filename" --audio-tracks 1 "./$filename" --language 0:eng "./$filename.srt"
(for "file.mkv.srt")
mkvmerge -o "./output/$filename" --audio-tracks 1 "./$filename" --language 0:eng "./${filename%.*}.srt"
(for "file.srt")
https://mkvtoolnix.download/doc/mkvmerge.html -
-
-
Simply put multiple commands.
https://mkvtoolnix.download/doc/mkvmerge.html#d4e1751
Similar Threads
-
Mkvtoolnix
By Freelife2345 in forum Video ConversionReplies: 1Last Post: 27th Nov 2014, 16:39 -
mkvtoolnix
By Harshad Patil in forum Newbie / General discussionsReplies: 2Last Post: 21st Jul 2013, 07:17 -
MKVToolNix problem
By RosyIvory in forum Video ConversionReplies: 14Last Post: 8th Feb 2011, 21:46 -
MKVtoolnix issue
By hbx2006 in forum Video ConversionReplies: 11Last Post: 16th Dec 2010, 11:29 -
MKVtoolnix
By jjis in forum Video ConversionReplies: 0Last Post: 28th Nov 2010, 12:41