Unable to stream 16bit wav file to speaker

Stefan Sauer ensonic at hora-obscura.de
Mon Dec 5 15:58:17 UTC 2016


On 12/05/2016 02:53 PM, Walter Lucetti wrote:
> Hi all,
>
> I have a problem with GStreamer 1.9.90 and a 16bit PCM mono channel
> wave file to be played.
>
> I'm using this very simple pipeline that works very well with 8bit file:
>
> gst-launch-1.0.exe filesrc
> location="C:/Users/walter/Desktop/00000002.wav" ! decodebin !
> audioresample ! audioconvert ! autoaudiosink -v -e
>
> With 16 bit file (S16LE to be precise) the output is a long noise.
>
> this is the output I obtain with "-v" option... I notice that
> recognized format il "8U", but I'm not able to force it to 16bit anyway:
>
> Pipeline is PREROLLING ...
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
> caps = audio/x-wav
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
> caps = NULL
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0.GstPad:src:
> caps = audio/x-raw, format=(string)U8, layout=(string)interleaved,
> channels=(int)1, rate=(int)22050

Are you sure the 16bit wav file is well formed? According to the output
gstreamer plays it as 8bit, which explains the noise. Can you share this
file?

Stefan

> /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:src:
> caps = audio/x-raw, format=(string)U8, layout=(string)interleaved,
> channels=(int)1, rate=(int)22050
> /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps
> = audio/x-raw, format=(string)U8, layout=(string)interleaved,
> channels=(int)1, rate=(int)22050
> /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink.GstProxyPad:proxypad1:
> caps = audio/x-raw, format=(string)U8, layout=(string)interleaved,
> channels=(int)1, rate=(int)22050
> Redistribute latency...
> /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstDirectSoundSink:autoaudiosink0-actual-sink-directsound.GstPad:sink:
> caps = audio/x-raw, format=(string)U8, layout=(string)interleaved,
> channels=(int)1, rate=(int)22050
> /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink:
> caps = audio/x-raw, format=(string)U8, layout=(string)interleaved,
> channels=(int)1, rate=(int)22050
> /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps
> = audio/x-raw, format=(string)U8, layout=(string)interleaved,
> channels=(int)1, rate=(int)22050
> /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:sink:
> caps = audio/x-raw, format=(string)U8, layout=(string)interleaved,
> channels=(int)1, rate=(int)22050
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad2:
> caps = audio/x-raw, format=(string)U8, layout=(string)interleaved,
> channels=(int)1, rate=(int)22050
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstAudioSinkClock
> handling interrupt.
> Interrupt: Stopping pipeline ...
> EOS on shutdown enabled -- Forcing EOS on the pipeline
> Waiting for EOS...
> Got EOS from element "pipeline0".
> EOS received - stopping pipeline...
> Execution ended after 0:00:03.745515003
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
>
> Thank you for help
> Walter
>
> -- 
> *Walter Lucetti*
>
> email: myzhar at gmail.com <mailto:myzhar at gmail.com>
> web: /www.robot-home.it <http://www.robot-home.it/>/
> project:  http://myzharbot.robot-home.it
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161205/bebab8a9/attachment.html>


More information about the gstreamer-devel mailing list