Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th September 2011, 02:13   #1  |  Link
tosh9i
Registered User
 
Join Date: Oct 2009
Posts: 15
MKVmerge Batch File - Remove Audio Track

I have about 51 video files and I want to remove one of the audio tracks (ID 3), but I don't want to do it one at a time. Instead, I prefer using a script to do the work. Unfortunately, I've been unsuccessful, so I was hoping that someone could help me create a mkvmerge batch script to remove one of the audio tracks (ID 3).

Previously, some people helped me create a batch file to remux some files, and I'm thinking that the second half just needs to be modified:
FOR %%A IN (*.mkv) DO mkvmerge -o "remux-%%~nA.mkv" "%%~A"
tosh9i is offline   Reply With Quote
Old 27th September 2011, 13:10   #2  |  Link
7ekno
Guest
 
Posts: n/a
Quote:
Originally Posted by tosh9i View Post
Previously, some people helped me create a batch file to remux some files, and I'm thinking that the second half just needs to be modified:
For no audio at all, run in a folder with all MKVs to be processed:
Code:
FOR /F "delims=*" %%A IN ('dir /b *.MKV') DO "<path_to_mkvmerge>mkvmerge.exe" -o "fixed_%%A" -A -S --compression -1:none "%%A" -A -D "%%A"
7ek
  Reply With Quote
Old 28th September 2011, 01:35   #3  |  Link
tosh9i
Registered User
 
Join Date: Oct 2009
Posts: 15
well, that does remove all the audio like you said, but I don't suppose you know of a way to keep one of the audios?
tosh9i is offline   Reply With Quote
Old 28th September 2011, 07:48   #4  |  Link
the_weirdo
Yes, I'm weird.
 
the_weirdo's Avatar
 
Join Date: May 2010
Location: Southeast Asia
Posts: 271
@tosh9i:
I think the following batch will do what you want (modified from 7ekno's script):
Code:
FOR /F "delims=*" %%A IN ('dir /b *.MKV') DO "<path_to_mkvmerge>mkvmerge.exe" -o "fixed_%%A" -a !3 --compression -1:none "%%A"
the_weirdo is offline   Reply With Quote
Old 28th September 2011, 09:11   #5  |  Link
tosh9i
Registered User
 
Join Date: Oct 2009
Posts: 15
Unfortunately, when I used that script, a cmd window just opened and closed. However, no changes were made to the mkv file. This is what the screen looked like:
http://i675.photobucket.com/albums/v...lipboard02.jpg
tosh9i is offline   Reply With Quote
Old 28th September 2011, 10:15   #6  |  Link
the_weirdo
Yes, I'm weird.
 
the_weirdo's Avatar
 
Join Date: May 2010
Location: Southeast Asia
Posts: 271
Quote:
Originally Posted by tosh9i View Post
Unfortunately, when I used that script, a cmd window just opened and closed. However, no changes were made to the mkv file. This is what the screen looked like:
http://i675.photobucket.com/albums/v...lipboard02.jpg
Can you update your mkvtoolnix to latest version and try that batch again (add PAUSE at the end to see what mkvmerge output):

Code:
FOR /F "delims=*" %%A IN ('dir /b *.MKV') DO "<path_to_mkvmerge>mkvmerge.exe" -o "fixed_%%A" -a !3 --compression -1:none "%%A"
PAUSE
the_weirdo is offline   Reply With Quote
Old 30th September 2011, 01:10   #7  |  Link
tosh9i
Registered User
 
Join Date: Oct 2009
Posts: 15
Worked like a charm, thanks.
tosh9i is offline   Reply With Quote
Old 11th February 2012, 13:31   #8  |  Link
flapane
Registered User
 
flapane's Avatar
 
Join Date: Jan 2009
Location: Italy
Posts: 108
A sidenote: if you're running it inside a cmd shell, substitute %%A with %A (I've just found it out by myself)
__________________
My site www.flapane.com - MY GALLERY - MY Linux/OSX REPOSITORY
Ibook 12''1,33ghz 1.5GB 160GB-PC Intel i3-2120@3.3ghz-Galaxy S4 Mini-Sony a6000 16-50
flapane is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:39.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.