GNOME Bugzilla – Bug 534570
Gstreamer plays flac files with the wrong channel mapping
Last modified: 2008-05-25 19:51:31 UTC
Please describe the problem: Title says it all really. The flac spec defines what the channel order should be for various assorted channel configurations, it is available here: http://flac.sourceforge.net/format.html#frame_header. This is how flac defines channels: * 1 channel: mono * 2 channels: left, right * 3 channels: left, right, center * 4 channels: left, right, back left, back right * 5 channels: left, right, center, back/surround left, back/surround right * 6 channels: left, right, center, LFE, back/surround left, back/surround right * 7 channels: not defined * 8 channels: not defined Gstreamer seems to get this wrong, notably for 5.1 audio. Where it should be reading the channels as FL,FR,CEN,LFE,RL,RR it actually reads the channels as FL,FR,RL,RR,CEN,LFE which of course is the wrong way round. Steps to reproduce: 1. Play multichannel flac encoded according to actual flac standards 2. Hear sound come out of the wrong speakers Actual results: It depends on the number of channels I suppose it just results in sound coming out of all the wrong channels. Expected results: It should come out of the correct channels! Does this happen every time? Yup! Other information: A test flac file made with audacity and alsa sample sounds is available here: http://137.222.225.69:8008/Multichannel_test_flac_standard_6.flac This has the channel ordering FL,FR,CEN,LFE,RL,RR which is the standard. Each speaker should say in order which channel it is coming out of, except the lfe channel, which plays a 60 hz tone for two seconds. Here is an 8 channel flac made in a similar way except that the channels were jigged around to workaround the bad channel mapping get it to play properly: http://137.222.225.69:8008/Multichannel_test_flac_nonstandard_8.flac
flacdec doesn't set any channel positions at all it seems... fixed in CVS now. 2008-05-25 Sebastian Dröge <slomo@circular-chaos.org> * ext/flac/Makefile.am: * ext/flac/gstflacdec.c: (gst_flac_dec_write): Set the channel layout when decoding FLAC files with more than 2 channels as defined by the FLAC spec. Fixes bug #534570.