by pjc50 · 3y ago · 0 comments
You can't be suggesting that the source streamer sends out millions of webRTC streams from their house, can you?
If you use HLS to deliver video to viewers, you can cache segments in a CDN. Your CDN. Someone else's CDN. You'll add some latency, but your bill will be lower.
It's not about just switching protocol nor it is about the source steamer (who should never be exposed, for DDoS/doxing reasons). But instead of delivering the video from the CDN to all users directly, you build a p2p network of viewers and have non-leaf viewers rebroadcast the video segments they've received (either directly from the CDN or from another peer).
It's obviously not as trivial as the description above implies, but it's not very hard either and for live streaming with lots of users it works very well. (I used to work on such a system and deployed it in production for streams with up to 300k concurrent viewers)
P2P may be explored again.
- don't do full P2P, keep twitch as a central server, and delegate only part of the load to P2P to those with good connection, with progressive roll in as buffering grows
- get a 2 minutes padding between the live and actual video streaming, so that you have a decent buffer and margin of maneuver to switch back to twitch server
- create an OBS clone that does streaming and video client with less ads as you said, but that act as an optimized node that works even when you don't what a video (the more you accumulate up time, the less you see adds, you get points, etc)
[1] https://www.lumen.com/help/en-us/cdn/mesh-knowledge-base/faq...
From your description elsewhere was it using the WebRTC data channels to deliver DASH/HLS style segments or actually using the MediaStream stuff?
I think the magic info we're missing here is what the Twitch viewers are watching on, and my hunch is it's a lot of mobile for which the P2P idea will not work (and/or provoke angry messages from mobile operators). In the case of smart TV then I can see the P2P idea saving a lot of money, but I don't believe there is even an official Twitch app for Samsung TVs so they don't seem to think that is where their audience is.