Listening to multi-channel audio with only two speakers in stereo using mplayer
Post
Cancel

Listening to multi-channel audio with only two speakers in stereo using mplayer

Have you already noticed while listening to multi-channel music with only two stereo speakers with mplayer, how the sound is low? Same thing applies with videos using the AC3 format, often composed of 5 channels. Mplayer, being the swiss-army knife of video players, gives you the tools to deal with multi-channel audio with your two poor laptop speakers.

Here’s the command-line I use when I have to deal with 5-channel audio files (or videos):

1
mplayer file.ac3 -channels 5 -af pan=2:'1:0':'0:1':'0.7:0':'0:0.7':'0.5:0.5'

The quotes are here only for readability. Here’s what this command-line says:

  • -channels 5 : I want to use the 5 channels of the input file
  • -af pan=2 : I only have 2 speakers and so only need 2 output channels
  • 1:0 : route the entire front-left input channel to the left output channel
  • 0:1 : route the entire right-left input channel to the right output channel
  • 0.7:0 : lower its volume a bit and route the entire rear-left input channel to the left output channel
  • 0:0.7 : lower its volume a bit and route the entire rear-right input channel to the right output channel
  • 0.5:0.5 : eavenly mix the center input channel into the two output channels, 50% each

The resulting left channel will be a mix of:

  • 100% of the input front-left channel
  • 70% of the input rear-left channel
  • 50% of the input center channel

Same thing goes for the right channel, just replace all “left” occurences by “right” above ;)

If you want to test by yourself, I recommend the use of a freely available 5.1 Surround Test File, thanks to Bjorne Lynne. There are some very nice tunes on this site by the way :)

This post is licensed under CC BY 4.0 by the author.