Log in

View Full Version : Extract audio from MKV and split titles according to chapters


Jackie
25th March 2012, 14:02
Hi,

I have an MKV file, which contains video, audio, and chapters. I have already extracted the chapters as XML and the Audio part as .DTS, and now I am searching for an easy way to split the Audio (AC3) to multiple tracks, according to the chapters in the XML file. Optionally, I would also loke to convert them to MP3.

Any idea how to automatically have that done?

Thanks alot!

hello_hello
25th March 2012, 18:37
I'd use foobar2000. It opens the audio in MKV files directly without the need to extract it. If the MKV contains chapters, when you open the MKV it should list each chapter in the playlist as though it's an individual file. From there I'm pretty sure you can convert them individually to MP3. foobar2000 also comes with a DSP for mixing 5.1 channel audio down to stereo while converting.

foobar2000 is an audio player but it's a good converter too. However it requires you to download separately the appropriate encoder. Lame for MP3, Aften for AC3 and NeroAAC for AAC. It shouldn't be too hard to find them with Google. Here are the plugins for decoding AC3 (http://www.foobar2000.org/components/view/foo_ac3) and DTS (http://www.foobar2000.org/components/view/foo_input_dts).

Edit: I should add the DSP for converting 5.1ch to stereo can result in clipping, depending on the levels in the original audio. It's not a problem when encoding directly to MP3 or AAC etc as I'm pretty sure levels above 0db are encoded correctly. As I generally only mixdown to stereo when converting to MP3, I then use MP3Gain's (http://mp3gain.sourceforge.net/) "max no-clip analysis" to adjust the volume of the MP3 to prevent clipping. This is done losslessly. The "max no-clip analysis" function needs to be enabled in preferences.