[MPlayer-dev-eng] [PATCH] Automatic downmix
Nicolas George
nicolas.george at normalesup.org
Tue Aug 17 17:37:17 CEST 2010
Le nonidi 29 thermidor, an CCXVIII, ubitux a écrit :
> > 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).
> What you said is strange: I just encoded 6_Channel_ID.wav with flac, and
> tried to play the generated 6_Channel_ID.flac with my patched MPlayer, and
> everything went fine: channels assignment were good.
Sorry, my mistake: I assumed that FLAC, being issued by the same
organization as Vorbis, would follow the same channel layout, but I was
wrong: Vorbis follows its own channel layout (FL FC FR RL RR LF) while FLAC
follows the SMPTE/ITU-R recommendation (FL FR FC LF RL RR). Since ffmpeg
uses the same SMPTE/ITU-R layout, the current behaviour is correct.
Now, regarding your initial problem:
>>> 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:
The answer is: there is a conversion somewhere, namely in
libmpcodecs/ad_ffmpeg.c, a call to reorder_channel_nch. Apart from bugs, all
audio circulating inside mplayer, in particular through audio filters, is in
the ALSA channel order: FL FR RL RR FC LF. The correct arguments for pan
should therefore be:
# in FL FR RL RR FC LF
pan=2: 0.4:0 : 0:0.4 : 0.4:0 : 0:0.4 : 0.2:0.2 : 0.2:0.2
# out L R L R L R L R L R L R
(spacing added for better readability; where did my "Alternate syntax for -af
pan" patch disappear?)
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/20100817/db149634/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list