GStreamer and Linux, screen recording works well on Xorg but not on Wayland.
Nicolas Dufresne
nicolas at ndufresne.ca
Mon Jul 17 00:24:56 UTC 2023
Le dim. 16 juill. 2023, 11 h 59, Davide Perini <perini.davide at dpsoftware.org>
a écrit :
> Ok, that snippet return a path=79
>
> python3 snippet.py
>
> it asks me if I want to record the screen full size or windowed, but there
> is no screen recording.
> should I see a file of the recorded video? what that snippet should do?
>
> I am even trying to do this command:
> gst-launch-1.0 pipewiresrc path=79 ! videoconvert ! autovideosink
> this command open a window, but there is no visible output.
>
Take your time, read the code. It will display the screen cast into
xvimagesink, a bit ironic isn't it? You can edit with autovideosink if you
want. The path is only valid while the portal is open.
Nicolas
Any further suggestions are appreciated.
>
> Thanks
> Davide
>
>
> Il 2023-07-15 12:51 Nicolas Dufresne via gstreamer-devel ha scritto:
>
>
>
> Le ven. 14 juill. 2023, 07 h 15, Davide Perini via gstreamer-devel <
> gstreamer-devel at lists.freedesktop.org> a écrit :
>
> Thanks for the answer, I really appreciate it.
>
> Is it possible to run a command to check if everything works?
> I mean can I test it with a command like this before developing my
> integration in my software?
>
> Isn't this command the right one to use?
>
> gst-launch-1.0 pipewiresrc ! fd=%d path=%u ! videoconvert ! xvimagesink
>
> If yes, how can retrieve the right fd and path variable to use using CLI?
>
> I want to test it via CLI before developing a software for it if possible.
>
>
> The attached program is in python and should just work.
>
> python3 snippet.py
>
> The path is return through a dbus IPC call.
>
> Nicolas
>
>
>
>
> Thanks!!!
> Davide
>
>
>
> Il 13/07/2023 15:58, Nicolas Dufresne via gstreamer-devel ha scritto:
>
> Hi Davide,
>
> Le mardi 11 juillet 2023 à 23:45 +0200, Davide Perini via gstreamer-devel
> a écrit :
>
> Hi all,
> I'm trying to use GStreamer on Wayland and it seems to have some
> problems...
>
> This pipeline:
> gst-launch-1.0 ximagesrc startx=1 endx=3839 starty=0 endy=2159 !
> video/x-raw,framerate=30/1 ! videoscale method=0 ! ximagesink
>
> works well on Xorg, but not on Wayland.
>
>
> ximagesrc will have very little use anyway on Wayland, as wayland have
> built-in privacy security. Please consider using the appropriate portal and
> pipewire streams for this purpose. The following link is an example on how
> to do this in your own application.
>
> https://gitlab.gnome.org/-/snippets/19
>
> Nicolas
>
>
>
> On wayland I have this error:
> Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL
> ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock:
> GstSystemClock Redistribute latency... WARNING: from element
> /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Pipeline construction is
> invalid, please add queues. Additional debug info:
> ../gstreamer/subprojects/gstreamer/libs/gst/base/gstbasesink.c(1249):
> gst_base_sink_query_latency ():
> /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Not enough buffering
> available for the processing deadline of 0:00:00.015000000, add enough
> queues to buffer 0:00:00.015000000 additional data. Shortening processing
> latency to 0:00:00.000000000. WARNING: from element
> /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Pipeline construction is
> invalid, please add queues. Additional debug info:
> ../gstreamer/subprojects/gstreamer/libs/gst/base/gstbasesink.c(1249):
> gst_base_sink_query_latency ():
> /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Not enough buffering
> available for the processing deadline of 0:00:00.015000000, add enough
> queues to buffer 0:00:00.015000000 additional data. Shortening processing
> latency to 0:00:00.000000000. X Error of failed request: BadMatch (invalid
> parameter attributes) Major opcode of failed request: 73 (X_GetImage)
> Serial number of failed request: 52 Current serial number in output stream:
> 52 Is there any fix for this since Xorg is going to be deprecated
> everywhere? :) Thanks Davide
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230716/b0a59bb2/attachment-0001.htm>
More information about the gstreamer-devel
mailing list