Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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 MPlayerhq.hu

Example:

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

 
discard

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.