flathub / com.obsproject.Studio

This repository is no longer used to build OBS. Issues should be reported at https://github.com/obsproject/obs-studio
https://github.com/obsproject/obs-studio
29 stars 21 forks source link

Jittery cursor and flicker on window-only screencast #98

Closed ghost closed 3 years ago

ghost commented 3 years ago

When trying to screen cast a single window using the 'Desktop Screencast (Wayland/X11)' source (the one using the xdg portal) the window is correctly recorded but the cursor keeps jumping around. This happens both on Wayland and X11. Sometimes the whole window would flicker (rarely on amdgpu, constantly on NVIDIA).

Full desktop screencast doesn't have problems.

The problem could also be a bug in mutter. I tested the xdg portal using firefox on wayland and the webrtc test page and firefox seems to not capture the cursor at all. I will cross post this issue also on the mutter bug tracker.

OS information:

Fedora 32 (linux 5.10.10), tested both on NVIDIA proprietary and on amdgpu OBS version 26.1.1 (flatpak) Software encoding Relevant screencasts:

xorg:

https://user-images.githubusercontent.com/37741488/106025899-802c1e00-60c9-11eb-84c3-f524b0a9a3d0.mp4

wayland:

https://user-images.githubusercontent.com/37741488/106025964-920dc100-60c9-11eb-99bd-25d8affb8aa7.mp4

window flicker: (will upload later, don't have access to my PC with NVIDIA right now)

GeorgesStavracas commented 3 years ago

NVidia does not provide compositors a zero-copy fast path, so it is expected that on Wayland it's slow.

For AMD, make sure to enable Mutter's dma-buf-screen-sharing experimental feature.

ghost commented 3 years ago

Nvidia was tested only on X11 because i can't get it to work on wayland on my setup. For AMD, how do I enable these features? Are they meson compile time options?

GeorgesStavracas commented 3 years ago

Nvidia was tested only on X11

X11 is the slowest of all paths - there's no way for now you'll get a smooth screencast with X11 on GNOME with the obs-xdg-portal plugin.

For AMD, how do I enable these features?

$ gsettings set org.gnome.mutter experimental-features "['dma-buf-screen-sharing']"

ghost commented 3 years ago

Tested with dma-buf-screen-sharing: on xorg problem persists, while on wayland it gets interesting

https://user-images.githubusercontent.com/37741488/106038807-ae652a00-60d8-11eb-9f74-8ee569b91f45.mp4

https://user-images.githubusercontent.com/37741488/106038810-aefdc080-60d8-11eb-8e01-d123406142ea.mp4

Wayland looks like a problem I once had with screen sharing (without dma-buf). Maybe it's related?

ghost commented 3 years ago

Found the old issue: https://gitlab.gnome.org/GNOME/mutter/-/issues/1420

It seems that the issue is not yet resolved (even though the issue it's closed) and it is pretty much confirmed that it has nothing to do with obs itself so I'm closing this issue.