GNOME Bugzilla – Bug 467214
Could not get buffers from device '/dev/video0'
Last modified: 2008-03-31 08:38:50 UTC
$> gst-launch-0.10 v4l2src ! ffmpegcolorspace ! xvimagesink Setting pipeline to PAUSED ... 0:00:00.118412000 16414 0x804e050 WARN v4l2src v4l2src_calls.c:1025:gst_v4l2src_capture_init:<v4l2src0> error: Could not get buffers from device '/dev/video0'. 0:00:00.118538000 16414 0x804e050 WARN v4l2src v4l2src_calls.c:1025:gst_v4l2src_capture_init:<v4l2src0> error: error requesting 0 buffers: Cannot allocate memory Pipeline is live and does not need PREROLL ... ERROR: from element /pipeline0/v4l2src0: Could not get buffers from device '/dev/video0'. Additional debug info: v4l2src_calls.c(1025): gst_v4l2src_capture_init (): /pipeline0/v4l2src0: error requesting 0 buffers: Cannot allocate memory ERROR: pipeline doesn't want to preroll. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... FREEING pipeline ... If I give a parameter "queue-size=2" to the v4l2src, the pipeline works smoothly. Why v4l2src doesn't work with default parameter (queue-size=2)? $> gst-launch-0.10 v4l2src queue-size=2 ! ffmpegcolorspace ! xvimagesink Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... 0:00:00.810488000 16490 0x804e050 WARN pipeline gstpipeline.c:491:gst_pipeline_change_state:<pipeline0> failed to query pipeline latency New clock: GstSystemClock 0:00:03.141901000 16490 0x8066610 WARN xvimagesink xvimagesink.c:1199:gst_xvimagesink_handle_xevents:<xvimagesink0> error: Output window was closed ERROR: from element /pipeline0/xvimagesink0: Output window was closed Additional debug info: xvimagesink.c(1199): gst_xvimagesink_handle_xevents (): /pipeline0/xvimagesink0 Execution ended after 2331573000 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... FREEING pipeline ...
This is fixed in gst-plugins-good CVS.
I have fedora 8 and gstreamer-plugins-good-0.10.6-6.fc8 installed. I still have this problem. Should it be fixed in 10.6 or do I have to wait until 10.7? If so, is the release expected anytime soon? I have been trying to get the program Cheese to work with my UVC webcam, but I think this issue is causing it to fail.
> I have fedora 8 and gstreamer-plugins-good-0.10.6-6.fc8 installed. I still > have this problem. Should it be fixed in 10.6 or do I have to wait until 10.7? You have to wait until 0.10.7 unless the package is patched to use v4l2src from CVS. > If so, is the release expected anytime soon? A release is planned, but I can't say when it will be. > I have been trying to get the program Cheese to work with my UVC webcam, > but I think this issue is causing it to fail. You might be able to work around it by setting the queue-size property manually. If this works: $ gst-launch-0.10 v4l2src queue-size=2 ! ffmpegcolorspace ! ximagesink then you could fire up gstreamer-properties and in the Video tab change 'Default Input' to 'Custom' and then enter 'v4l2src queue-size=2' in the 'pipeline' field. This might fix it if you're lucky.
I tried that change in gstreamer-properties and it seemed to work. At least the pressing test showed an image from webcam instead of failing. However, the setting doesn't seem to save. When I relaunch gstreamer-properties the video field is back set to just "v4l2src" - So, when I try to make it work in "Cheese" it still doesn't work.
> I tried that change in gstreamer-properties and it seemed to work. At least > the pressing test showed an image from webcam instead of failing. However, the > setting doesn't seem to save. When I relaunch gstreamer-properties the video > field is back set to just "v4l2src" - So, when I try to make it work in > "Cheese" it still doesn't work. This isn't a GStreamer issue though (gstreamer-properties is part of gnome-media). However, you may be able to use gconf-editor and go to /system/gstreamer/0.10/default and change the key 'videosrc' manually to 'v4l2src queue-size=2' to set the key manually without gstreamer-properties.
Ok, I was able to do that and the change stuck I think. However cheese still gives the following error: ** Message: Probing the webcam, please ignore the following, not applicabable tries ** Message: Error running pipeline 'v4l2src ! fakesink': Could not get buffers from device '/dev/video0'. [v4l2src_calls.c(1025): gst_v4l2src_capture_init (): /pipeline0/v4l2src0: error requesting 0 buffers: Cannot allocate memory] ** Message: test pipeline for v4l2src failed: [v4l2src ! fakesink]: Could not get buffers from device '/dev/video0'. ** Message: Error running pipeline 'v4lsrc ! video/x-raw-rgb,width=640,height=480 ! fakesink': Could not get/set settings from/on resource. [v4l_calls.c(409): gst_v4l_set_chan_norm (): /pipeline1/v4lsrc0: Error setting the channel/norm settings: Invalid argument] I guess cheese is not actually looking at that gconf setting and is just running "v4l2src ! fakesink" ... This behavior doesn't seem easy to fix at the moment without patching the code. Oh well. Thanks for your help.
*** Bug 524789 has been marked as a duplicate of this bug. ***