I'm trying to "cast" my laptop's screen (Debian+GNOME) to my living room TV, either to an HDMI dongle or to the RPi connecting to it (LibreElec+Kodi) *without* resorting to a Chromecast and ideally only using FOSS.
It's revealing to be surprisingly difficult. Any suggestions?
@zacchiro maybe obs to capture the desktop streaming to a local rtmp server, then something to play the stream? Searching suggests piping rtmpdump to vlc and that nginx or apache can handle streaming rtmp.
Also I bet gstreamer has a set of modules that could do it.
Some searching turned up this story of trying to do something like what you want and eventually creating a small program that streams a desktop over gstreamer rtsp
https://www.reddit.com/r/rust/comments/12hxwlt/hacking_together_a_simple_chromecast_alternative/
Eventually he gets to a github project with that sets up the gstreamer to kodi daemon.
Looking up differences between rtmp and rtsp, rtsp probably has lower latency.
Last random idea would be a desktop streaming program like rustdesk
@alienghic more to the point, what would the "something to play the stream on Kodi" be?
So I'd first try vlc for playing random stream urls.
I finally managed to stream a window from one computer to another using the docker image of
https://github.com/bluenviron/mediamtx
(I didn't feel like testing audio)
I setup obs to stream to the rtmp lister port on a computer running mediamtx.
I then connected to the HLS port with a web browser and slowly watched my edit some text in emacs.
I also had a few moments of working with obs streaming to a v4l2loopback-dkms video device and then streaming that "video camera" to another device using vlc, but it didn't keep working.
Maybe it'd be worth packaging mediamtx for debian?