My friends and I hang out with each other online instead of in real life, and sometimes, we want to share what's on each other's screen. It's true that there are existing solutions to this problem. Streaming on Twitch has upwards of a 10-15 second delay to broadcaster, and you can't make broadcasts private. Youtube does let you make streams private, but it still has a 10-15 second delay. Mixer is super low-latency with only a 1 second delay, but you can't make broadcasts private.
I found this module for nginx that adds an RTMP server, and it's pretty configurable. You can stream to the server, and then watch the stream from VLC with a 1-2 second delay!
Try it yourself
- Open your preferred streaming software, like XSplit or OBS.
- Set it up to stream to
rtmp://convex.st4r.io/live, then set the stream key to be whatever you want the stream name to be. (We'll use
exampleas an example.)
- Start streaming.
- To view the stream, you can go to
https://convex.st4r.io/live/exampleor open VLC, click
Open Network Stream(or press
Ctrl + N) and enter
The RTMP module can also serve an XML document which lists all the streams and clients watching the streams. Based around this XML doc, I created a simple web front end using Ruby on Rails. It can list the currently live streams and provides a simple video player to view the stream. Every minute, a cron job runs to grab a thumbnail from each stream to display on the front page. Unfortunately, I haven't figured out how to shorten the delay for the web player at all, which was about 30 seconds the last time I tested it.
Despite it's flaws, it serves it's purpose well for my friends and I. The low latency eliminates all that awkward waiting for the viewer to catch up to the broadcaster. It was definitely worth my time to set up.