[MPlayer-dev-eng] [PATCH] Automatic downmix

Nicolas George nicolas.george at normalesup.org
Sat Aug 14 22:48:28 CEST 2010


Le septidi 27 thermidor, an CCXVIII, ubitux a écrit :
> Also, I note that the channels assignements was wrong if I followed the
> FLAC specs (are they wrong or is there a convertion somewhere?). So I used
> those two samples in order to get the right assignement:

> It also seems it's the right assignment for FLAC; I got the right sound
> for all my videos with Flac 5.1.

By default, MPlayer uses libavcodec to decode FLAC. All libavcodec decoders
are supposed to output their channels in WAVE order (FL FR FC LF RL RR).
MPlayer then converts the channels from the decoder to the ALSA order
(FL FR RL RR FC LF)

THat is the theory.

In practice, when mplayer uses libavcodec, the channel order is correctly
handled.

On the other hand, it seems that libavcodec's FLAC decoder does not respect
the libavcodec policy about channels layout, and outputs in Xiph channel
order (FL FC FR RL RR LF).

The best course is probably to fix libavcodec. The commit that added
channels layout support to the Vorbis decoder is is this one:
http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=8709fe869812d68d5db56e2260f5ca3dadd3526c
Vorbis and FLAC are very similar in that regard, a similar approach would
probably work.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100814/f152c40f/attachment-0001.pgp>


More information about the MPlayer-dev-eng mailing list