gstreamer can not play .mp3 file to usb audio device, reason not-negotiated
Soho Soho123
soho123.2012 at gmail.com
Sun Aug 5 20:41:52 PDT 2012
Hi all,
When I try to play mp3 audio to usb audio, it is fail.
Due to "reason not-negotiated",
After checking the configuration,
my usb sound card from "aplay",
Hardware PCM card 0 'USB AUDIO ' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 24000
stop_threshold : 24000
silence_threshold: 0
silence_size : 0
boundary : 1572864000
appl_ptr : 0
hw_ptr : 0
#
But mp3 decoder "mad" can not output width 16 from gst-inspect output,
mad can output width 32
I am not sure whether width 32 cause "reason not-negotiated".
gst-launch-0.10 filesrc
location=/var/tmp/usb/sda1/audio_src/1503-9.mp3 ! mad ! audioconvert !
audioresample ! audio/x-raw-int,
rate=48000,channels=2,width=16,endianness=1234 ! alsasink
device="hw:0,0"
===========================================================================
the gst-launch error is :
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps = audio/x-raw-int,
endianness=(int)4321, signed=(boole
an)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0:
Internal data flow error.
Additional debug info:
gstbasesrc.c(2625): gst_base_src_loop ():
/GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps = NULL
Freeing pipeline ...
===============================================================================
Is there wrong configuration about ALSA?
Your input is very appreciated, I have this trouble for a long time.
Thanks!
More information about the gstreamer-devel
mailing list