Audio track selection from command line

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
activey
New Cone
New Cone
Posts: 1
Joined: 21 Aug 2010 00:49

Audio track selection from command line

Postby activey » 21 Aug 2010 01:06

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

rusty149
Blank Cone
Blank Cone
Posts: 15
Joined: 17 Aug 2010 23:32

Re: Audio track selection from command line

Postby rusty149 » 21 Aug 2010 08:47

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


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 21 guests