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
Thanks!
		
			+ 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: 
 Code:#!/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 03: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!
- 
	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!-002
 
 Instead of:
 
 DBZ002 The Mightiest Warrior in All of History is Goku‘s Older Brother!
 
 How can I fix that? empty spaces are being replaced with "?"
 
 Thanks!
- 
	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 " "?
 https://superuser.com/questions/696816/remove-question-mark-from-file-names-osx
 
 
 (Not sure if the "?" are actual question marks or just a placeholder for other non-printable characters.)
Similar Threads
- 
  BATCH remove audio track from mkvBy MarquisdeOz in forum AudioReplies: 53Last Post: 30th Jul 2018, 09:48
- 
  MKVtoolnix : adding an audio track results in warnings and corrupted audioBy Jose Hidalgo in forum EditingReplies: 10Last Post: 9th Mar 2018, 12:48
- 
  Need Help Batch Remove Audio,Remove Subtitle,Change Default Audio and SubBy Inoyama in forum Newbie / General discussionsReplies: 9Last Post: 9th Jan 2018, 16:20
- 
  Mkvtoolnix Batch Remove Audio OSXBy neostylez in forum Newbie / General discussionsReplies: 13Last Post: 27th Dec 2016, 09:42
- 
  batch remove subtitles track from mkv ffilesBy simonrule in forum SubtitleReplies: 2Last Post: 16th Jun 2016, 18:51


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			
 Quote
 Quote 
 
			
			 
			