Too bad Wayland is glacially slow when taking screenshots next to X11 (Had a python script taking screenshots of a Minecraft window and doing some image recognition at 60 fps on X11 and …3 on Wayland. I now need to rewrite it to stream the whole desktop as a webcam for the same thing.)
X11 was built to solve a completely different problem and it did that marvelously well. But then it kept being adapted to solve a different problem it wasn’t great at. It was just the only real option for so long that people optimized the shit out of it and it kept up. Seriously, there is absolutely no reason x11 should have been able to do what it was doing as well it was doing it.
Wayland says enough is enough. We are starting over and building on what we’ve learned over the past few decades and making something based on how it will actually be used rather than working backwards like X11 ended up doing.
Then Covid hit and remote use cases exposed it weaknesses. So it’s adapting too.
Wayland is built in a way that lets you meet in the middle cleaner than X11 did. It’ll be fine. It’s just young.
My uneducated guess is maybe it should be written in C instead of python. On top of that, screen recording via OBS works great on Wayland, so Wayland can’t be fully to blame.
At least part of that is complete nonsense. Python often already does low level things in c and it was doing 60 fps under X so python is unlikely to be the bottleneck. You would need to profile it to determine the actual bottleneck.
Is it not an option for you to just use Pipewire, or is that what you mean by a webcam? It’ll be somewhat of a refactor but should still be quite fast compared to screenshots even on X11.
Did you know there is no accessible documentation to do so with pipewire? The best I could find was an uncommented python source and a technical wiki that skips the basics. V4Lloopback is far simpler. And shorter.
Too bad Wayland is glacially slow when taking screenshots next to X11 (Had a python script taking screenshots of a Minecraft window and doing some image recognition at 60 fps on X11 and …3 on Wayland. I now need to rewrite it to stream the whole desktop as a webcam for the same thing.)
X11 was built to solve a completely different problem and it did that marvelously well. But then it kept being adapted to solve a different problem it wasn’t great at. It was just the only real option for so long that people optimized the shit out of it and it kept up. Seriously, there is absolutely no reason x11 should have been able to do what it was doing as well it was doing it.
Wayland says enough is enough. We are starting over and building on what we’ve learned over the past few decades and making something based on how it will actually be used rather than working backwards like X11 ended up doing.
Then Covid hit and remote use cases exposed it weaknesses. So it’s adapting too.
Wayland is built in a way that lets you meet in the middle cleaner than X11 did. It’ll be fine. It’s just young.
My uneducated guess is maybe it should be written in C instead of python. On top of that, screen recording via OBS works great on Wayland, so Wayland can’t be fully to blame.
At least part of that is complete nonsense. Python often already does low level things in c and it was doing 60 fps under X so python is unlikely to be the bottleneck. You would need to profile it to determine the actual bottleneck.
Most likely, it’s Wayland throttling screenshot demands. Obs actually stream the desktop instead of grabbing it.
Is it not an option for you to just use Pipewire, or is that what you mean by a webcam? It’ll be somewhat of a refactor but should still be quite fast compared to screenshots even on X11.
Did you know there is no accessible documentation to do so with pipewire? The best I could find was an uncommented python source and a technical wiki that skips the basics. V4Lloopback is far simpler. And shorter.