Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-good gst-plugins-good
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 646
    • Issues 646
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 71
    • Merge requests 71
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamerGStreamer
  • gst-plugins-goodgst-plugins-good
  • Issues
  • #882
Closed
Open
Issue created Apr 29, 2021 by Yann Salmon@ysalmon

Cannot capture window image with ximagesrc and xid : X reports invalid parameter attributes

I am trying to pinpoint why I sometimes (and unpredictably !) get a black video instead of the image of the selected window in Kazam screencast. It uses GStreamer for capturing so I tried to run a capture using the command line example in the GStreamer documentation.

I can (seemingly always) capture the whole desktop with gst-launch-1.0 ximagesrc ! video/x-raw,framerate=5/1 ! videoconvert ! theoraenc ! oggmux ! filesink location=/tmp/desktop.ogg

However, specifying an xid gives various results. Sometimes it just works. Sometimes it fails with

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  130 (MIT-SHM)
  Minor opcode of failed request:  4 (X_ShmGetImage)
  Serial number of failed request:  42
  Current serial number in output stream:  42

Sometimes it seems to start recording normally but on Ctrl-C'ing it, it says

^Chandling interrupt.
Interruption : arrêt du pipeline…
Execution ended after 0:00:04.728716374
Définition du pipeline à PAUSED...
Définition du pipeline à READY (prêt)…

then seems to stall for several minutes before concluding

Définition du pipeline à NULL…
Libération du pipeline…

and the resulting video is a corrupted file.

This is with

GStreamer 1.16.2 X.Org X Server 1.20.9 kernel 5.8.0-50-lowlatency KUbuntu 20.04 KDE Framework 5.68.0 nvidia driver, 460.73.01

Capturing the same window with OBS works without a problem on the same system.

Edited Apr 29, 2021 by Yann Salmon
Assignee
Assign to
Time tracking