Resampling audio from 88200 to 96000 samples per second

Tim-Philipp Müller t.i.m at zen.co.uk
Fri Nov 23 08:43:31 PST 2012


On Fri, 2012-11-23 at 08:17 -0800, Nick Okasinski wrote:

> This mailing list post suggests something like this:
> 
> % gst-launch-0.10 filesrc location=Song.flac ! decodebin !
> audioresample ! 'audio/x-raw-int, rate=96000' ! alsasink,
> device=hw:0,0 -v
> 
> However, this does not produce sound and provides the following
> message:
> 
> > /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
> > caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
> > width=(int)32, depth=(int)24, rate=(int)88200, channels=(int)2
> > /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacDec:flacdec0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)24, rate=(int)88200, channels=(int)2
> > ERROR: from
> > element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacParse:flacparse0: GStreamer encountered a general stream error.
> > Additional debug info:
> > gstbaseparse.c(2890): gst_base_parse_loop
> > (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacParse:flacparse0:
> > streaming stopped, reason not-negotiated
> > ERROR: pipeline doesn't want to preroll.
> > (snip)
> 
> I'm sure the NULL caps is not a good sign.  Can someone help me
> understand what I'm doing wrong?

The NULL caps are normal when shutting down the pipeline.

Try:  ... ! decodebin2 ! audioconvert ! audioresample ! alsasink ...

Cheers
 -Tim



More information about the gstreamer-devel mailing list