Posted by memet_rush 5 days ago
Ask HN: Why is there no P2P streaming protocol like BitTorrent?
I was thinking most people nowaday have at least 30mbps upload and a 1080p stream only needs ~10mbps and 720p needs ~5ish. Also i think it wouldnt have to be live, people would definitely not mind some amount of lag. I was thinking the big O for packets propagating out in the network should be Log(N) since if a master is sharing the content then is connected to 10 slaves, then those connected to 10 other slaves and so on.
The other limitation I could think of is prioritizing who gets the packets first since there's a lot of people with 1gbs connections or >10mbps connections. Also deprioritizing leechers to keep it from degrading the stream.
Does anyone have knowledge on why it isn't a thing still though? it's super easy to find streams on websites but they're all 360p or barely load. I saw the original creator of bittorrent was creating something like this over 10 years ago and seems to be a dead project. Also this is ignoring the huge time commitment it would take to program something like this. I want to know if this is technically possible to have streams of lets say 100,000 people and why or why not.
Just some thoughts, thanks in advance!
Netflix famously offers ISPs an appliance.
And if you pay for the streaming, why would you donate your bandwidth to them? Would you get a discount?
Live events, e.g. sports?
"why would you donate your bandwidth to them?"
I don't know but people donate bandwidth for torrents, maybe it's 'free' for them?
I believe pirating is seen an alternative to paying through the nose?
I pay through the nose for most live sports I watch.
Besides bandwidth problems (as you can't 100% rely on remote connections), any P2P solution would mean the same fragment will be shared many times between clients; something CDN networks have solved already (just serving content, instead of juggling with signalling)
1. Hybrid architecture (CDN+P2P): - Use CDN to process backbone traffic, and edge nodes distribute through P2P to reduce the pressure on the central server (such as LivePeer trying to combine blockchain and P2P). - Platforms such as Youku have experimented with such solutions, but they need to weigh the cost and effect.
2. Protocol optimization: - Sliced transmission: Divide the streaming media into small pieces and improve efficiency through multi-path transmission. - Dynamic priority: Dynamically adjust the data allocation strategy according to node bandwidth and latency. - Buffering and preloading: Allow users to tolerate higher latency in exchange for more stable transmission (such as HLS/DASH protocol ideas).
3. Decentralized network exploration: - Projects such as IPFS and BitTorrent Live have tried real-time streaming, but are limited by technical maturity and ecological support. - Web3 projects (such as Theta Network) combine token incentives to encourage nodes to contribute bandwidth, which may promote development.
You might want to look into the tradeoffs Discord decided to go with, https://discord.com/blog/how-discord-handles-two-and-half-mi....
Here's some boilerplate for rolling your own, https://blog.swmansion.com/building-a-globally-distributed-w....
In theory you could gain resilience from a P2P architecture but you're going to have to sacrifice some degree of live-ness, i.e. have rendering clients hold relatively large buffers, to handle jitters, network problems, hostile nodes and so on.
One possibility as you allude to is licensing. In a P2P streaming model “rights” holders want to collect royalties on content distribution. I’m not sure of a way you could make this feel legal short of abolishing copyright, but if you could build a way to fairly collect royalties, I wonder if you’d make inroads with enforcers. But overall that problem seems to have been solved with ads and subscription fees.
Another data point is that the behemoths decided to serve content digitally. Netflix and Spotify showed up. The reason the general population torrented music is because other than a CD changer, having a digital library was a requirement in order to listen to big playlists of songs on your… Zune. Or iPod. That problem doesn't exist anymore and so the demand dried up. There was also an audiophile scene but afaik with Apple Lossless the demand there has diminished too.
And finally, since people were solving the problem for real, we also entertained big deal solutions to reduce the strain on the network. If you stream P2P your packets take the slow lane. Netflix and other content providers build out hardware colocated with last mile ISPs so that content distribution can happen even more efficiently than in a P2P model.
In short: steaming turned into a real “industry”. Innovators and capitalists threw lots of time and money at the problem. Streaming platforms emerged, for better and for worse. And here we are today, on the cusp of repeating the past because short sighted business mongers have balkanized access with exclusive content libraries for the user numbers.
Modern streaming protocols sometimes go to absurd lengths to avoid too many hops so you get the data as soon as possible... torrent has so many jumps and negotiations to get to the actual file. It's good for decentralization but decentralization and efficiency go against each other.
Churn & reliability: Peers come and go, making stable streaming tricky. Latency: BitTorrent-style protocols aren’t built for real-time delivery. Incentives: Without rewards, too many users just leech. WebRTC: It hits limits fast and often relies on centralized relays. Legal risks: Media companies don’t play nice with decentralized distribution.
Bram Cohen tried with BitTorrent Live, but it fizzled out. Would love to see someone revive this with modern tech — still feels like untapped potential.
IPv6 multicast is probably the way forward for livestreams but I haven't really been keeping up on recent developments. In theory there could be dynamic registrations of multicast addresses that ISPs could opt-in to subscribe to and route for their customers.
it is insane to me, for people to have need to watch toxic channels like LinusTechTips livestream, regurgitating weeks old toxic marketing disinformation and having need to have that 0ms latency... XD
why everyone needs low latency for one way stream? unnecessary hurdle just to have that hurdle. no benefit to anything.
but agree with you that if companies already forget existence of IPv4, internet will be simpler, faster and more usable. for less price for everyone.