Show HN: Pion/handoff – Move WebRTC out of browser and into Go
github.com
github.com
In the README is an screenshot of sending my webcam, but replacing outgoing video with a ffmpeg testsrc. Handoff sits between so it can replace with any arbitrary video.
No better feeling to work on something and hear it is novel! So many projects that I think will be useful miss the mark.
Have you come across https://github.com/elixir-webrtc/ex_webrtc ?
Wasn't sure if they used Pion as a guide
ex_webrtc is super cool. They have a cool built-in dashboard/analytics flow. It is way more 'operations friendly' then Pion it seems. I haven't used it heavily myself though.
Are there any complications with that or is it kind of on me to not confuse the other peer by sending unexpected formats?
You need to make sure you are sending the same codec that the remote expects, otherwise nothing else! You can do a different resolution, bitrate etc...
I ended up doing proxy because Google Meet doesn’t let me hook at any RTCPeerConnection APIs at all. I wanted to send synthetic media in, but couldn’t get it working. Ending up doing a virtual webcam on Linux.
With ‘media-send’ I can send it out to ffmpeg/GStreamer and that does all the heavy lifting
But your way of grabbing the stream is so much simpler.
Overlay layer is super new in KDE Plasma is the only problem. You can also do v4l2loopback and make it a virtual camera.
I am also using v4l2loopback, but its annoying to juggle /dev/video* devices. I wanted to do video stuff in docker containers, and it would be amazing if I could do pipewire in each container and have no global state.
I couldn't get anything to work in Chromium. FireFox saw the device, but video didn't come across.
I use v4l2 regularly with OBS. In order for Chrome/Chromium to see it you need to make the device before launching Chrome/Chromium. You can start v4l2 devices automatically by setting a modprobe config for your kernel.
My v4l2 notes might be helpful http://technex.us/2022/06/v4l2-notes-for-linux/
* Do video playback out of the browser. You can render a subset of frames, use a different pipeline for decode etc...
* Pull video from a different source. Join Google Meet on current computer, but stream from another host.