What's the best approach to live stream reliably even with spotty Internet?

I think what “Living as One” offers is very interesting. Basically you stream to their cloud, but it will always verify if what you’re streaming is the right data or if the connection is lost/frames are dropping. Basically you can have Internet outage for as long as you set the delay before anyone notices when watching. I think this is a great way for broadcasts where user interactions isn’t priority and delay can be some minutes for best quality possible.
Of course it’s a bit pricey and I was wondering if any of you has any alternatives like streaming on the go to your home pc/server?
I was looking into the SRT streaming protocol, which promises realiable streaming even with spotty Internet, but as far as I see it can only have a maximum buffer for up to 8 seconds and in my testing it didn’t handle disconnects well at all.

Also I know that you can somewhat counter the issue with bundling multiple Internet connections together, but this is not what I’m aiming for. I’m talking worst case scenario :smiley:

gunrun.tv is a good resource for mobile livestreaming options. They recommend https://www.superstreamsystem.com/ for a cloud-hosted “auto-AFK” screen and other features which kick in to replace the stream content when the remote transmitter goes offline.

In essence what matters is that you are sending to a private OBS instance that switches away from your RTMP / SRP stream to another scene if your bitrate is too low for too long. Then that OBS encodes the output for normal CDN / multistreaming.

You can achieve this feature with your own software and hardware using this github project: https://github.com/715209/nginx-obs-automatic-low-bitrate-switching

The first level of redundant internet failover would be using a VPN service like https://speedify.com/ which could let you avoid dropping your stream if your connection has problems.

The next level up is adding a Live-U Solo which takes advantage of multiple internet connections and handles keeping the RTMP frames in sync. There’s theoretically a technical possibility that multiple-upstream VPN’s like Speedify would have issues maintaining a RTMP connection if your internet does not transition from one connection to another smoothly. The Live-U with 4 internet connections is the standard for worst case scenario connectivity.

Thank you @KarlAlexPauls for your answer but this is isn’t really my use case.
Your points are very valid for people who prioritize interactivity and are ok with occuring breaks (like the scene switch). I’m looking more for a way to guarantee high bitrate streaming without any breaks ever but with the compromise of having a big delay like the example of the service provided by Living As One.

In the last days I tried to copy this behaviour on the cheap. I’m not 100% happy how it works yet, but I think I’m on the right track. If anybody has other ideas please feel free to let me know.
Here are the basic steps:

A = PC with unreliable Internet (e.g. with mobile connection)
B = PC with reliable Internet to stream with constant bitrate to YouTube/Twitch/Facebook etc. (like your home PC or a PC in the cloud with NVENC/AMF support, Paperspace worked well for me)

  1. Record your OBS stream locally on A via FFmpeg in the HLS container
    (this will generate lots of small .ts files, which can be played together via a native media player or a web player)
  2. From A transfer all the files in the output directory automatically to B
    (you can do this directly via P2P with a tool like Syncthing or do it over a web server in between, in my festing automatically uploading all the files from A to a FTP server and then download them back on B worked well)
  3. Create a local web server and host the HLS files (B)
    (Nginx and Apache work fine)
  4. Feed the HLS stream to a web player/media player (B)
    (I used the example file of HLS.js with my local stream)
  5. Display the player in OBS and stream to your normal RTMP location (B)

The great thing is that you can use the player on B now as a DVR and rewind back for as long as you want. It will automatically append the small .ts files as soon as they arrive. And you can have as long of a dropdown in upload speed on A as you have set the “DVR delay” on B. As soon as A has proper upload speed again it will just continue to upload as many segment files as possible.

Alternatively you can upload from A to a web server directly and host the HLS player there, but you’d need lots of web hosting space and a fast server. For example in my testing I used the free hosting of Infinityfree.net, which has unlimited web space but with a max file size of 12 MB. Optimal for HLS with lots of small files :smiley: FTP speed is pretty good, but normal http request are too slow for seamless playback.

I know this is way too hacky and complicated, but I have my fun getting these things to work :smiley:

Yes the Live-U would do that at some expense.

Your HLS project sounds like a great option for that use-case. Unfortunately I would recommend a delay of 3-5 minutes in order to handle a reconnect. I’ll be cheering on your progress.