aiff playback @ 44.1/16bit keeps swapping channels

Stuart Gray stuart68 at gmail.com
Thu Jun 23 20:01:19 PDT 2011


Hi,

Using:

gstreamer-0.10.32
gst-plugins-base-0.10.32
gst-plugins-good-0.10.26
gst-plugins-bad-0.10.20
gst-plugins-ugly-0.10.16

Running on an openembedded linux build on a TI OMAPL138 I cannot get
playback of AIFF to be perfect.

My pipeline has had to be modified to include audioconvert with capabilities
set. It is as follows:

gst-launch -v souphttpsrc location=http://some aif file.aif  ! queue2 !
decodebin2 ! audioconvert ! audio/x-raw-int,channels=2,endianness=1234 !
alsasink

Now this produces audio which plays ok for the most part, but if I pause it
will swap channels, if I pause again the channels remain un-swapped, if I
let the complete track play it will swap the channels at random times during
playback.

I have installed sox and used wget to pipe the track into sox, it plays fine
when I do this. If I install mplayer and use it to playback the track, I get
channel swapping as before. So this tells me that my kernel and ALSA layers
are fine, the issue is somewhere within gstreamer.

I output the decoded audio to a file and then took the file onto my Linux
PC, it played back slowly. I then used the following aplay command to get it
to playback correctly:

aplay -c 2 -f S16_LE -r 88200 aifFile.raw

The file playback completes without any channel swapping.

For the above pipeline I get the following output from gstreamer:

decodebin20.GstDecodePad:src0.GstProxyPad:proxypad2: caps = audio/x-raw-int,
width=(int)16, depth=(int)16, channels=(int)2, endianness=(int)4321,
rate=(int)44100, signed=(boolean)true
/GstPipeline:pipeline0/
GstCapsFilter:capsfilter0.GstPad:src: caps = audio/x-raw-int,
endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32,
rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0
/GstCapsFilter:capsfilter0.GstPad:sink: caps = audio/x-raw-int,
endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32,
rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps =
audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32,
depth=(int)32, rate=(int)44100, channels=(int)2
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock

Decodebin correctly reports 16 bit audio at 44.1khz, but even without the
audioconvert and caps, gstreamer will convert this to 32 bit.

If I try the pipeline without the caps and play 24 bit aiff at 88.2 or 96kHz
it plays fine.

Why does aiff at 44.1kHz/16bit not playback correctly through gstreamer?

Thanks,
Stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110624/b2f5fe8b/attachment.htm>


More information about the gstreamer-devel mailing list