Hi all,
I'm new to this forum. I've been searching for 2 days a way to systematically delete non-english tracks from a hundred MKVs I have, all of them being in the same folder, using a single batch command.
I haven't found it. I know I could do this file by file with MKVToolnix, but it would take me forever.
I want to keep the English audio track along with the English subs, and the other tracks deleted.
I'm using OS X 10.10.3, with a rMBP 13". I have the latest MKVToolnix installed, with MediaInfo.
Here's an example of a MKV I'd like to be processed.
Any chance I could perform this easily ? I'm not a power user.Code:General Format : Matroska Format version : Version 2 File size : 3.86 GiB Duration : 43mn 4s Overall bit rate mode : Variable Overall bit rate : 12.8 Mbps Movie name : LOST S05E01 Bluray 1080p Multi DTS HDMA x264-MAN OF STYLE.mkv Writing application : HandBrake 0.10.1 2015030800 Writing library : Lavf55.12.0 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Codec ID : V_MPEG4/ISO/AVC Duration : 43mn 4s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Writing library : x264 core 142 r2479 dd79a61 Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=78125 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00 Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio #1 ID : 2 Format : DTS Format/Info : Digital Theater Systems Mode : 16 Format settings, Endianness : Big Codec ID : A_DTS Duration : 43mn 4s Bit rate mode : Constant Bit rate : 1 509 Kbps Channel(s) : 6 channels Channel positions : Front: L C R, Side: L R, LFE Sampling rate : 48.0 KHz Bit depth : 24 bits Compression mode : Lossy Stream size : 465 MiB (12%) Title : Surround Language : French Default : Yes Forced : No Audio #2 ID : 3 Format : DTS Format/Info : Digital Theater Systems Format profile : MA / Core Mode : 16 Format settings, Endianness : Big Codec ID : A_DTS Duration : 43mn 4s Bit rate mode : Variable Bit rate : Unknown / 1 509 Kbps Channel(s) : 6 channels Channel positions : Front: L C R, Side: L R, LFE Sampling rate : 48.0 KHz Bit depth : 24 bits Compression mode : Lossless / Lossy Title : Surround Language : English Default : No Forced : No Text #1 ID : 4 Format : PGS Codec ID : S_HDMV/PGS Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs Language : English Default : No Forced : No Text #2 ID : 5 Format : PGS Codec ID : S_HDMV/PGS Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs Language : French Default : No Forced : No Text #3 ID : 6 Format : PGS Codec ID : S_HDMV/PGS Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs Language : French Default : No Forced : No Text #4 ID : 7 Format : PGS Codec ID : S_HDMV/PGS Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs Language : French Default : No Forced : No Menu 00:00:00.000 : :(01)00:00:00:000 00:05:34.000 : :(02)00:05:33:916 00:12:14.734 : :(03)00:12:14:608 00:19:38.886 : :(04)00:19:38:802 00:27:01.119 : :(05)00:27:01:036 00:34:47.293 : :(06)00:34:47:210 00:42:26.794 : :(07)00:42:26:710
Thanks.
+ Reply to Thread
Results 1 to 5 of 5
-
-
Dual boot into windows and try mkvcleaver.
.
I haven't seen any other easy batch code for stripping out tracks just by language. -
Create a .bat file with:
Code:md output for %%a in (*.mkv) do mkvmerge -o "output\%%~na.mkv" --audio-tracks 2 --subtitle-tracks 3 "%%a"
Oh, you're not on Windows. I'll let it here to show you the general mkvmerge command, though. Maybe you can adapt it for OS X.
/edit2:
No OS X to test here, but probably something like that:
Code:#!/bin/bash mkdir "output" for filename in ./*.mkv do mkvmerge -o "./output/$filename" --audio-tracks 2 --subtitle-tracks 3 "./$filename" done
Last edited by sneaker; 31st May 2015 at 09:00.
-
Does that strip by language? If the mkvs are muxed different. If all are same it would work though.
-
It's not by language. If the files have varying track orders the script would have to be vastly more complicated because mkvmerge has no commands to filter input by language. You'd have to do some parsing of mkvmerge --identify-verbose. That said, as long as English is always the second audio as well as the first subtitle track it will work.
Similar Threads
-
Remove audio tracks from Blu-ray while preserving chapters?
By (Evan) in forum Newbie / General discussionsReplies: 2Last Post: 24th Jun 2014, 20:54 -
How to create WMV file with multi-language audio tracks
By rakf1 in forum User guidesReplies: 1Last Post: 16th Mar 2014, 08:46 -
How to remove audio tracks from many MKV files?
By santaxl in forum Video ConversionReplies: 12Last Post: 21st Jan 2014, 04:04 -
MPEG Streamclip - remove excess audio tracks from Dreambox Video
By Tseb in forum MacReplies: 2Last Post: 19th Oct 2012, 17:47 -
How to create mkv video with several audio tracks?
By Giviko in forum Video ConversionReplies: 3Last Post: 29th May 2012, 16:33