Speaking of this, I make a shameless plug.
I'm a contributor for the Sunshine project: https://github.com/SunshineStream/Sunshine project, which allows Nvidia GameStream to be used on Linux systems with Moonlight clients. I haven't tested the Linux side of things, but it has many ways to both encode the screen or acquire it (via KMS, Pipewire or x11grab IIRC).