Log in

View Full Version : Getting rid of secondary audio from MKV container.


mob
24th March 2008, 21:19
Hi guys.

I have a bunch of videos encoded with H.264 in MKV containers. These videos have 2 audio tracks.

Basically I just want to delete the 2nd audio track and be left with the same video + only 1 audio track in the MKV container. I don't want to have to re-encode anything. I know this can be done with a simple direct stream copy.

The only problem is that I am used to working with XVID in AVI containers... so I don't really know where to start with these MKV files.

Also, I have to do this process to 98 videos. So I need a way to do this in a batch process. Maybe using a commandline tool or something.

Can anyone recommend anything or point me in the right direction?

Thanks a lot!

buzzqw
24th March 2008, 21:41
some question:

why posted on mpeg4 avc forum ? it's a container issue..

solution: mkvmerge (part of mkvtoolnix) can remux (and batch) your tracks while removing unwanted stream

BHH

mob
24th March 2008, 22:11
mkvmerge = magic :)

That will do exactly what I need! Thanks buzzq!!!!

:thanks: :thanks: :thanks:

P.S.: Sorry for posting this in the wrong section... don't know what I was thinking :p

setarip_old
24th March 2008, 23:46
@mob

Hi!

I realize that your problem has been solved but, I'm curious to understand WHY you encoded 98 original sources to MKV, each with TWO audiostreams, when you need for them to have only ONE audiostream each?

mob
25th March 2008, 22:43
@mob

Hi!

I realize that your problem has been solved but, I'm curious to understand WHY you encoded 98 original sources to MKV, each with TWO audiostreams, when you need for them to have only ONE audiostream each?

Well setarip_old, it's really simple... I changed my mind.

I thought I wanted both audio tracks, now I realize I wont ever be using that 2nd audio track anyway so it's pointless to have it. Plus, by removing it I'll be able to fit all the clips on one dvd-r instead of two.

Hope that feeds your curiosity :)

desta
25th March 2008, 23:01
Then again, you'd think if you encoded 98 files, you'd already know how to demux and remux.

mob
26th March 2008, 09:31
Then again, you'd think if you encoded 98 files, you'd already know how to demux and remux.

OK this is getting a bit ridiculous now...

If I knew how to do it, why would I ask?

Unlike "some people", I have better things to do than to waste other peoples time.

Thanks again for helping me buzzqw. I wrote a batch script for mkvmerge and it did the job beautifully. Saved me a lot of work. :)

buzzqw
26th March 2008, 12:35
glad to help :)

BHH

P.S. i have ripped many tv series from my dvds, and from time to time i will add/remove subs/audio tracks.. as i want (better.. when want to learn a new language :) )