Page 1 of 1

Audio track selection from command line

Posted: 21 Aug 2010 01:06
by activey
Hi,

I have a m4v file ripped from a DVD using Handbreak. The file has two audio tracks. From the VLC UI, I can found the two audio tracks from Audio->Audio Track menu. So I tried to launch VLC with a specific audio-track from command line:

vlc --audio-track 1 myfile.m4v

And then the VLC UI set Disable in the Audio Track menu. "--audio-track 0" or "--audio-track -1" would use the first audio track. Anything else would disable the audio.

I have also tried using the rc interface to see the current audio track. Type "atrack" in rc returns nothing.

Is there anybody know how to pick the audio track from command line?

Thanks,
Arthur

Re: Audio track selection from command line

Posted: 21 Aug 2010 08:47
by rusty149
hello :)

option audio track is zero-based and requires an equals sign for the value
--audio-track=0 selects the first audio track
--audio-track=1 selects the second audio track
--audio-track=2 etc...

if there are no more tracks, it will select disabled

Code: Select all

vlc myfile.m4v --audio-track=0
or

Code: Select all

vlc myfile.m4v --audio-track=1