swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.48k stars 1.11k forks source link

Screen drops frames when capturing games #6732

Open VC73 opened 2 years ago

VC73 commented 2 years ago
emersion commented 2 years ago

That doesn't surprise me too much. shm-based capture takes a lot of bandwidth, and is a blocking operation due to the graphics APIs.

VC73 commented 2 years ago

I see, sadly I guess that not much can be done atm then.

progandy commented 2 years ago

You can try to replace your capture setup with txproto which does support zero-copy dmabuf capture or screencopy with dmabuf.

Setup is not trivial, you need to write lua scripts. There are some examples, though: https://github.com/cyanreg/txproto/tree/master/DOCS/examples

Edit: OBS with the wlrobs plugin should support it as well I think.

VC73 commented 2 years ago

Just tried the obs pluging using dmabuf and the result is the same even tough the recording itself is smooth