[MPlayer-users] Vorbis multichannel downmixing

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jan 25 19:12:50 CET 2010


On Mon, Jan 25, 2010 at 03:54:31PM -0200, Lucas Clemente Vella wrote:
> I have been experimenting with 5.1 audio encoded in Vorbis, and I
> found that MPlayer can't automatically downmix 5.1 Vorbis audio to
> stereo, like in AC3 or DTS. It seems that it leaves this task to the
> decoder, and since the decoder can't do the downmixing, MPlayer simply
> discards all but the left and right channels. To workaround the
> problem, I tried to use the pan filter with these settings:
> 
> -channels 6 -af pan=2:1:0:0:1:0.5:0:0:0.5:0.7:0.7:0:0

They seem a bit simplistic, from the man page example section:

       Play a 6-channel AAC file with only two speakers:
       mplayer -rawaudio format=0xff -demuxer rawaudio -af pan=2:.32:.32:.39:.06:.06:.39:.17:-.17:-.17:.17:.33:.33 adts_he-aac160_51.aac
       You might want to play a bit with the pan values (e.g multiply with a value) to increase volume or avoid clipping.

Note that there were a lot of changes to the channel order,
so the order may be wrong, however the values should be about
right and play most files without the clipping issues you seem to have.
I also think that all file formats now should play with identical
channel order - if not something was just missed (and -ac ffvorbis might help).
If you got the order right for above values, I think this should
be the appropriate filter:
-af pan=2:.39:.06:.06:.39:.17:-.17:-.17:.17:.32:.32:.33:.33
The volume may be rather low, however fixing it via e.g. the volume filter
will give you at least some clipping protection - and using -af-adv you
should also be able to make MPlayer use floats for intermediate
processing which can avoid some of those issue.
Note that for headphones a simple way to get even better downmixing would
be -af hrtf (note that I do not know if it will handle the current channel
order correctly).


More information about the MPlayer-users mailing list