Open SimonBiggs opened 2 weeks ago
To get just the streaming done, it needs to be adjused in gstreamer. I would expect that there is similar element to ximagexrc
like waylandsrc
but there is not.
To get the controls ported to wayland, there would need to be implemented a new driver (possibly using libei) that satisfies this interace: https://github.com/m1k1o/neko/blob/5d62e56d601ebf66a81a702f68aa1f58072106b1/server/internal/types/desktop.go#L43-L77
Also... I imagine multi cursor / seat would be quite helpful?
https://github.com/swaywm/wlroots/pull/352 https://youtu.be/WO2L_ihO_rI
SEAT CONFIGURATION¶ Configure options for multiseat mode.
A seat is a collection of input devices that act independently of each other. Seats are identified by name and the default seat is seat0 if no seats are configured. While sway is running, - (hyphen) can be used as an alias for the current seat. Each seat has an independent keyboard focus and a separate cursor that is controlled by the pointer devices of the seat. This is useful for multiple people using the desktop at the same time with their own devices (each sitting in their own "seat"). The wildcard character, *, can also be used in place of
to change settings for all seats.
https://manpages.debian.org/experimental/sway/sway-input.5.en.html
Definitely, that would be great to have.
I think what I'll need to do is just set up the "view only" no inputs version first with webRTC, and then potentially in the next couple of weeks I'll come back to this and see if I can sort out the inputs.
Do you have any preferences for how to do PRs or anything?
Do you have a recommendation on how best to use / edit / refactor your tool if all I want to do with it initially is pass through Wayland screen captures through webRTC?
This seems like it would be something appropriate to use to pipe the video and audio through to Neko? https://github.com/ammen99/wf-recorder
Actually, maybe as a first step entirely I'll just have wf-recorder go to the video loopback and then just stream it with this for now (until I get Neko inputs sorted):
For neko you could just replace all x11 dependencies with dummy functions so that you get rid of it, and then just try to setup gstreamer pipeline that captures video & audio. That way you shuld be able to acheive the first step.
For now I think I won't actually pick this up 😞, but I might pick this up in a few weeks. I give it ~15% chance
An update here:
Setting up a loopback video device with:
sudo modprobe v4l2loopback devices=1 video_nr=0 exclusive_caps=1
Then using wf-recorder:
wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video0 -x yuv420p -r 30 -D
Followed by this for gstreamer:
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! x264enc tune=zerolatency ! video/x-h264,profile=baseline ! webrtcsink
Seems promising :)
webrtcsink is from:
git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
That's great news, thanks for updating. Unfortunately loading kernel module in docker is not possible. It would have to be done on host. I wonder if this is the only way or there is someone containerization friendly alternative.
Hi @m1k1o,
Do you have an idea how I might get this working with a wayland target like sway. Also, for clarification, I don't mean something like this:
As that is using sway with an x11 backend. The above config works fine enough. But I explicitly don't want to be using x11 so that I can have many nested sway instances without needing to have them all in RAM