VLC media player select audio track for conversion

When using VLC media player to convert a video with multiple audio tracks into another format (that may support only one audio track) using only one audio track, how do I select the audio track that is converted? VLC defaults to the first audio track.

Specifically: I have a MKV video with two language audio tracks and I want to convert the video and the second audio track to DivX format using AVI as container. VLC however converts only the first audio track and I did not find an option for selecting another track. I also tried switching the audio track manually while conversion is under way but the audio track is silent from that point on in the outputted file. Maybe there is an MRL option to select the audio track?

I am aware that one could use other tools like MKVToolNix to remove the undesired audio track(s) and then convert the file in VLC. However I wonder what the solution within VLC is - or whether one exists.


Looking at https://forum.videolan.org/viewtopic.php?t=115385, the options seem to be to use:

Use option --audio-track or --audio-track-id in Open Media dialog:

[v] Show more options
Edit Options [ :file-caching=300 :audio-track=0]

The audio track number (0 in above example) seems to be the audio track number as displayed in the VLC Gui when displaying the movie minus one.


As @kroonwijk noticed, a good way is to specify

Edit Options  [ :audio-track=0 ]

to select one of multiple tracks to use. Be aware, that tracks seem to be counted from 0.

This is what worked for me:

Edit Options  [ :no-sout-all :audio-track=1 ]

:no-sout-all - disable all audio tracks
:audio-track=1 - use second track as main audio (counted from 0).