GNOME Bugzilla – Bug 301848
Gstreamer fails to run pipelines into alsasink
Last modified: 2005-06-09 16:11:03 UTC
Please describe the problem: After installing alsa and the alsasink plug-in. Gstreamer does not want to run the pipeline. The command "gst-launch-0.8 sinesrc ! alsasink" gives the message: ERROR: pipeline doesn't want to play. Linux distribution is Debian, testing. Gstreamer-0.8 is installed from the distributinon as is alsa 1.0.8-7 Steps to reproduce: 1. Install alsa-modules and alsa-base 2. Install gstreamer0.8 including gstreamer0.8-alsa 3. type: gst-launch sinesrc ! alsasink 4. OR: attempt to play an audio using rhythmbox Actual results: gstreamer0.8: (See description) Trying to play rhythmbox gives error popup: "Internal GStreamer error: negotiation problem. File a bug." Expected results: Should hear tone from gst-launch command. Music should play from rhythmbox. Does this happen every time? Yes Other information: Other non-gstreamer apps seem to work OK. For example, totem plays audios just fine. I suspect it has something to do with alsasink not successfully opening the the audio or pcm device or some such.
Try "gst-launch sinesrc ! audioconvert ! audioscale ! alsasink", that's what RB uses too. What gst-plugins version?
Tried "gst-launch sinesrc ! audioconvert ! audioscale ! alsasink" and that did not help. Got the same "ERROR: pipeline doesn't want to play" message. All of the plugins are verson 0.8.8-2 except for gstreamer0.8-tools which is 0.8.9-2. Also, libgstreamer0.8-0 is version 0.8.9-2.
Are you using the right device? Try ... ! alsasink device="hw:0" or ... ! alsasink device="hw:1" or so.. (also device="default")
Hard to know what the right device is. Is it /dev/audio? /dev/pcm0p? /dev/dsp I expect it already knows and tries to use the default device. I did do a gst-inspect on alsasink and it returned information like alsasink was there, but don't know how to identify the sound card device. I tried entering as described: ... ! alsasink device="hw:0" also hw:1 and default. None worked. Another bit of information: The "sound card" for this machine is the intel-8x0 (AC97) codec. (No plug-in sound card.)
Some more info: Have installed gstreamer-oss and osssink runs OK.
Created attachment 45999 [details] Level 3 debug log
Here is a debug log attachment. This part is interesting: WARN (0x804ff10 - 309771:35:20.535745000) alsa( 3570) gstalsa.c(1701):gst_alsa_probe_hw_params:<alsasink0> "snd_pcm_hw_params_set_period_size_near (this->handle, hw_params, &period_size, 0)": Invalid argument INFO (0x804ff10 - 309771:35:20.565509000) GST_CAPS( 3570) gstpad.c(1350):gst_pad_link_call_link_functions:<alsasink0:sink> pad doesn't accept caps audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1 INFO (0x804ff10 - 309771:35:20.566008000) GST_STATES( 3570) gstelement.c(3015):gst_element_change_state:<sinesrc0> failed state change, could not negotiate pads
I'm having a simalar problem (allthough I can play the sinewave), with the same snd_intel8x0 card. when trying to play an mp3 (using the directions in the documentation) gst-launch filesrc location=/media/My.mp3 ! spider ! alsasink RUNNING pipeline ... ERROR: from element /pipeline0/spider0/mad0: Internal GStreamer error: pad problem. File a bug. Additional debug info: gstpad.c(2562): gst_pad_set_explicit_caps: /pipeline0/spider0/mad0: failed to negotiate (try_set_caps with "audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2" returned REFUSED) ERROR: from element /pipeline0/spider0/mad0: Internal GStreamer error: negotiation problem. File a bug. Additional debug info: gstmad.c(1199): gst_mad_check_caps_reset: /pipeline0/spider0/mad0: Failed to negotiate 44100 Hz, 2 channels Execution ended after 46 iterations (sum 1069233000 ns, average 23244195 ns, min 45000 ns, max 459900000 ns). anyother valid sink works for me. I added this to my modprobe.conf options snd-intel8x0 ac97_clock=44100 to make sure the clock rate was supported.
For your pipeline, add audioconvert/audioscale: gst-launch filesrc location=my.mp3 ! spider ! audioconvert ! audioscale ! alsasink *** This bug has been marked as a duplicate of 301785 ***