pop-os / xdg-desktop-portal-cosmic

GNU General Public License v3.0
35 stars 31 forks source link

Recording issues with some (gstreamer) applications #65

Open Quackdoc opened 1 month ago

Quackdoc commented 1 month ago

I've only found this to be an issue with gstreamer, applications.

Kooha: Black screen Test script to record: Green Screen https://gist.github.com/Quackdoc/31fa6b308947c57dd264fb253c358071

it's likely worth noting that this issue is likely specifically a gstreamer one since OBS and other applications like webRTC + firefox seem to work fine. This seems to only effect cosmic so I will be cross posting since im not sure which side is actually the issue. Upstream pipewire issue is here https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4137

ids1024 commented 1 month ago

GStreamer 1.24, presumably?

With the examples/screencast.rs, I've noticed even after updating it to use DMA_DRM in https://github.com/pop-os/xdg-desktop-portal-cosmic/pull/64, using waylandsink may have some issues in the latest gstreamer with the new explicit modifier support. (I think that's a bug in the gstreamer Wayland plugins, not pipewire or the portal.) Not sure about the things you're testing.

Quackdoc commented 1 month ago

Correct 1.24. I found that doing I think there is an issue with the wayland plugins as I noticed a regression compared to before. However I think that might be a seperate issue to this one as glimagesink is working as intended. Im not in a possition to bisect gstreamer currently as I have critical software relying on it, and don't have another development setup currently. I did run with GST_DEBUG with level 2 and got this looping output

0:00:06.746685292 191468 0x79fcd8000d80 ERROR                default video-frame.c:168:gst_video_frame_map_id: failed to map video frame plane 0
0:00:06.746698988 191468 0x79fcd8000d80 WARN             videofilter gstvideofilter.c:296:gst_video_filter_transform:<videoconvert0> warning: invalid video buffer received
^C0:00:06.778659314 191468 0x79fcd8000d80 ERROR               fdmemory gstfdmemory.c:132:gst_fd_mem_map: 0x79fce0025b90: fd 343: mmap failed: Invalid argument
0:00:06.778685303 191468 0x79fcd8000d80 ERROR               fdmemory gstfdmemory.c:132:gst_fd_mem_map: 0x79fce0025b90: fd 343: mmap failed: Invalid argument
0:00:06.778699239 191468 0x79fcd8000d80 ERROR              videometa gstvideometa.c:362:default_map: cannot map memory range 0-1
0:00:06.778707384 191468 0x79fcd8000d80 ERROR                default video-frame.c:168:gst_video_frame_map_id: failed to map video frame plane 0
0:00:06.778720599 191468 0x79fcd8000d80 WARN             videofilter gstvideofilter.c:296:gst_video_filter_transform:<videoconvert0> warning: invalid video buffer received

EDIT: I am getting the same issue with a simple pipeline = Gst.parse_launch('pipewiresrc fd=%d path=%u ! videoconvert ! glimagesink'%(fd, node_id)) pipeline

Quackdoc commented 1 week ago

I hit this with separate hardware, with plasma, so I'm fairly certain this is an upstream issue, this can be closed if you wish or left open for tracking.