After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721220 - ximagesrc returns black screen
ximagesrc returns black screen
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.2.1
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-30 00:33 UTC by Azat
Modified: 2014-01-17 11:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Azat 2013-12-30 00:33:39 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
Comment 1 Sebastian Dröge (slomo) 2014-01-03 09:26:07 UTC
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?
Comment 2 Azat 2014-01-03 16:38:49 UTC
(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.
Comment 3 Azat 2014-01-03 16:44:16 UTC
(In reply to comment #2)
After setting startx value to capture screen only on second display it works but I still get black screen.
Comment 4 Vincent Penquerc'h 2014-01-09 17:25:50 UTC
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)
Comment 5 Azat 2014-01-15 05:19:49 UTC
I installed gstreamer from source and it works fine now.
Comment 6 Vincent Penquerc'h 2014-01-17 11:21:45 UTC
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.