[MPlayer-dev-eng] [PATCH] ffvorbis surround broken

Nicolas George nicolas.george at normalesup.org
Fri Oct 30 21:24:36 CET 2009


Channel order is currently broken with ffvorbis. It probably has been since
2009-10-02 r20148 "Add vorbis channel layout support".

The attached trivial patch fixes it.

As far as I understand, lavc is progressively converting all its codecs to
output in the WAVE order, so it will probably make sense to change
AF_CHANNEL_LAYOUT_LAVC_DEFAULT in a near future, but note quite yet.

For reference, I use the following script to generate a speaker_test_6.ogg

my @channels = ("front left", "front center", "front right",
  "rear left", "rear right", "low freq");
my $out = "";
for my $i (0 .. 5) {
  my $data = `espeak --stdout "$channels[$i]" |
    sox -t wav - -t raw -r 48000 -s -2 -c 1 -`;
  my $pfx = "\0\0" x $i;
  my $sfx = "\0\0" x (5 - $i);
  $data =~ s/(..)/$pfx$1$sfx/gs;
  $out .= $data;
open my $oggenc, "|-", qw{oggenc -R 48000 -C 6 -B 16 -o speaker_test_6.ogg -};
print $oggenc $out;

The channel order comes straight from the Vorbis specification. The
resulting file plays fine with -ac tremor or with a moderately old mplayer
(both -ac tremor and -ac ffvorbis).

I may post similar patches in a near future as I continue my tests.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-ffvorbis-surround.diff
Type: text/x-diff
Size: 638 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20091030/5afdf85c/attachment.diff>
-------------- 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/20091030/5afdf85c/attachment.pgp>

More information about the MPlayer-dev-eng mailing list