GNOME Bugzilla – Bug 721220
ximagesrc returns black screen
Last modified: 2014-01-17 11:21:45 UTC
Tried to record desktop using gst-launch-1.0 ximagesrc ! video/x-raw,framerate=5/1 ! videoconvert ! theoraenc ! oggmux ! filesink location=desktop.ogg Result is a black video. OS: Fedora 20 64 bit. ximagesrc works normally using gst-launch-0.10
Works just fine here. Can you check if > gst-launch-1.0 ximagesrc ! video/x-raw,framerate=5/1 ! queue ! videoconvert ! autovideosink sync=false shows black too already?
(In reply to comment #1) > Works just fine here. Can you check if > > gst-launch-1.0 ximagesrc ! video/x-raw,framerate=5/1 ! queue ! videoconvert ! autovideosink sync=false > shows black too already? Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... ERROR: from element /GstPipeline:pipeline0/GstXImageSrc:ximagesrc0: Internal data flow error. Additional debug info: gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstXImageSrc:ximagesrc0: streaming task paused, reason not-negotiated (-4) ERROR: pipeline doesn't want to preroll. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... I'm getting this error after running the command.
(In reply to comment #2) After setting startx value to capture screen only on second display it works but I still get black screen.
With: gst-launch-1.0 ximagesrc ! video/x-raw,framerate=5/1 ! queue ! videoconvert ! autovideosink sync=false It work on Ubuntu 12.04, but gives black on Fedora 18 (on which I do not have a gst tree handy atm). Adding remote=1 makes it work on Fedora. On the Fedora side, I see warnings: Could not initialise Xv output Looking at the code from there, it turns out the gst I get on Fedora is apparently built without SHM, so we go into the XGetimage/XGetSubImage path (strings -a on the plugin does not show the "Retrieving screen using XShm" being compiled in). So it'd seem like a bug (unless argued otherwise) in the builing setup for the gst Fedora packages. This Fedora is a VM with no dev/gst setup so I can't easily build gst there to double check it works when using shm, but it seems likely. remote=1 provides a workaround (though may have performance implications)
I installed gstreamer from source and it works fine now.
Thanks for checking. I guess you might want to file a bug against Fedora if you wish, pointing to this bug. I'm not sure why SHM is disabled, but since it's a common and useful thing, it might just be an easily corrected oversight.