Summary: | ffmpeg screen capture with kmsgrab and vaapi either fails or gives corrupt video on kwin wayland | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Vasishath Kaushal <vasishath> |
Component: | egl | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | nate, xaver.hugl |
Priority: | NOR | ||
Version First Reported In: | 5.27.5 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Garbled video when recorded with KWIN_DRM_PREFER_COLOR_DEPTH=24
drm_info on KDE wayland with KWIN_DRM_PREFER_COLOR_DEPTH=24 Correct video with yuzu running in full screen mode (DRM format switches to XRGB8888) |
Description
Vasishath Kaushal
2023-05-30 07:38:48 UTC
Created attachment 159342 [details]
Garbled video when recorded with KWIN_DRM_PREFER_COLOR_DEPTH=24
Created attachment 159343 [details]
drm_info on KDE wayland with KWIN_DRM_PREFER_COLOR_DEPTH=24
Update I found that when I run the emulator yuzu in full screen, the DRM format changes to XRGB8888 and the screen recording also works fine in that case. Attaching the captured video. Created attachment 159351 [details]
Correct video with yuzu running in full screen mode (DRM format switches to XRGB8888)
Most likely this is caused by either kmsgrab or vaapi not handling the buffer format + modifier combination properly. If you get a correct image on the screen, KWin isn't doing anything wrong. In general, please use the xdg portal system to do screen casting, which handles these sort of things automatically. kmsgrab is not a good way to do screen recording and will only get more problematic over time, as we start to use more hardware features it can't deal with. |