Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an AVI with two audio streams inside. How to play it with MPlayer using the 2nd non-default audio stream?

share|improve this question
up vote 4 down vote accepted

To find the audio track ID of the video that you want to play, use this:

mplayer -vo null -ao null -frames 0 -v <filename> | grep aid

To play the file using the audio track required, use the track ID that is found with the previous command and use it in the following one:

mplayer -aid <track_ID> <filename>

Source for this information - FAQ at


nits@nits-workstation:$ mplayer -vo null -ao null -frames 0 -v Blood\ \ 18\ Dual\ -\ Moon\ Over\ Ekaterinburg.mkv | grep aid
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
[mkv] Track ID 2: audio (A_AAC), -aid 0, -alang und
[mkv] Track ID 3: audio (A_AAC), -aid 1, -alang und
FAAD: compressed input bitrate missing, assuming 128kbit/s!

##To play with Audio Track ID 3## 
nits@nits-workstation:$ mplayer -aid 1 Blood\ \ 18\ Dual\ -\ Moon\ Over\ Ekaterinburg.mkv 

##To play with Audio Track ID 2## 
nits@nits-workstation:$ mplayer -aid 0 Blood\ \ 18\ Dual\ -\ Moon\ Over\ Ekaterinburg.mkv
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.