Log in

View Full Version : mkv audio tracks


trekkie101
2nd April 2007, 00:29
I am trying to use an avs script in a video converter.
The conversion will be mkv--->mp4.
The problem is though, the mkv has 2 audio tracks. I was wondering is there anyway to select which track I want?

Also, The directshow splitter doesn't work correctly...it picks the first track which is not what I want.

mahsah
3rd April 2007, 16:03
I don't think there is any direct way to do it via directshowsource or such, I just demux the audio with MKVextractgui or virtualdubmod and do this:

video = Directshowsource("file.mkv", audio=false)
audio = wavsource("sound.wav")
Audiodub(video,audio)

G_M_C
3rd April 2007, 19:21
I am trying to use an avs script in a video converter.
The conversion will be mkv--->mp4.
The problem is though, the mkv has 2 audio tracks. I was wondering is there anyway to select which track I want?

Also, The directshow splitter doesn't work correctly...it picks the first track which is not what I want.

When you get Haali's mediasplitter for MKV'sm there will be an CLI called "MKVExtract" in that directory. Use that to extract the audio and video into separate streams before trying to load them into avisynth. Chances are that you wont need directshowsource either (wich is better imho :) )