aiff playback @ 44.1/16bit keeps swapping channels

Stefan Kost ensonic at hora-obscura.de
Sat Jun 25 03:54:46 PDT 2011


Hi,

On 06/24/11 05:01, Stuart Gray wrote:
> 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
Please also add " ! audioresample " after audioconvert.
>
> 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.
>
please open a bug and attach the file. Also tell us if it happens with
one specific file only or if you have several. This way we can
immediately try it ourself when (or before) answering to the mail.

> 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.

If you also get the channel swapping with mplayer, the file might be
broken. mplayer does not use 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

I wonder why you need to play the raw file at 88200 Hz, but the
gstreamer elements use 44100.
>
> Decodebin correctly reports 16 bit audio at 44.1khz, but even without
> the audioconvert and caps, gstreamer will convert this to 32 bit.
that might be for the audiosink in use.

Stefan
>
> 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
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110625/e8f046d4/attachment.htm>


More information about the gstreamer-devel mailing list