ximagesrc is super choppy on Linux on high end hardware...

Robert Ayrapetyan robert.ayrapetyan at gmail.com
Fri Nov 3 18:08:16 UTC 2023


use-damage=1 should help a lot for a typical office desktop sharing
type of work, but will be a killer for an active motions type of
stream (e.g. video).

To use xshm extension, you need to:
1. Make sure it's enabled when building gstreamer:
    -Dgst-plugins-base:xshm=enabled
2. Make sure X server is started with XSHM extension support, e.g.:
    /usr/bin/X :10 -noreset +extension GLX +extension RANDR +extension
RENDER +extension MIT-SHM -config /etc/xorg.conf
3. Make sure extension is being used in the pipeline:
GST_DEBUG=3,ximagesrc:5
You should see:
DEBUG              ximagesrc
gstximagesrc.c:733:gst_ximage_src_ximage_get:<ximagesrc0> Retrieving
screen using XShm
in logs.

This extension increases screen capture time order of magnitude times.

On Fri, Nov 3, 2023 at 9:55 AM Davide Perini
<perini.davide at dpsoftware.org> wrote:
>
> No, how can I use it?
> I can't find lot of infos on it.
>
> In the mean time it seems that using
> use-damage=0
> helped a lot but it's not as smooth as on Windows with dx11capture...
>
> Thank you very much!!!
>
> Il 25/10/2023 02:22, Robert Ayrapetyan ha scritto:
> > Are you using the XShm extension
> > (-Dgst-plugins-good:ximagesrc-xshm=enabled)? With XShm you can
> > smoothly get 60 FPS for your resolution with almost no CPU usage.
> >
> > On Tue, Oct 24, 2023 at 11:53 AM Davide Perini via gstreamer-devel
> > <gstreamer-devel at lists.freedesktop.org> wrote:
> >> Hi,
> >>
> >> I'm using a simple pipeline like this
> >> gst-launch-1.0 ximagesrc startx=0 endx=3800 starty=0 endy=2150 !
> >> videoscale ! videoconvert ! autovideosink
> >>
> >> on Ubuntu 23.10 using an AMD Ryzen 9 7950X3D and an Nvidia RTX4090.
> >>
> >> Video drivers are correctly installed since I can play games at very
> >> high framerate...
> >>
> >> When I try to record the screen with the pipeline above, the screen
> >> became choppy, mouse starts lagging and the screen record get two or
> >> three frames per second.
> >>
> >> How this is possible?
> >>
> >> What can I do to troubleshoot this problem?
> >>
> >> Thanks
> >>
>


More information about the gstreamer-devel mailing list