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!
230 comments
[ 3.3 ms ] story [ 187 ms ] threadIn general people aren't tolerant of lag and spinning circles and other such things when they're trying to watch streaming content. If you're fine with just watching it a little bit later might as well queue it up and left the whole thing down load so it's ready when you're ready.
The main reason I would think it would be useful is 1. since streaming sites seem to lose a lot of money and 2. sports streams are really bad, even paid ones. I have dazn and two other sports streaming services and they still lag and are only 720p
I think you would probably need something more in the neighbourhood of 10 minutes to really make a difference. If you could make a stable p2p live streaming app with the number of peers all watching the same stream in the hundreds and only 30 seconds latency, i'd consider that pretty amazing.
> Also do you think there's any way you can prioritize seeders in such a protocol? like some kind of algorithm that the more you share the more you're prioritized in getting the most up to date packets.
If we are talking about a livestream (and not "netflix" type streaming) then i don't think seeders are a thing. You can't seed a file that isn't finished being created yet.
If you mean more generally punishing free-riders, i think that is difficult in a live stream as generally data would be coming in from a different set of peers than the peers you are sending data out to, so its difficult (maybe not impossible) to know who is misbehaving.
It's similar to popcorn time that was killed by legal ways so I'd say they did take off.
Stremio smartly avoids being killed by making pirating an optional plugin you have to install from another site so they get deniability.
It works well and save my ass from needing 1000s' of subscriptions.
Popcorn Time got taken down pretty hard because they became too popular too fast.
A commercial solution could have a seed server optimized for streaming the initial segments of video files to kickstart the stream, and let basic torrents deal with the rest of the stream.
> To enable multicast on the unicast Internet we start by building an encrypted overlay network using point-to-point links between participating nodes. Once established, our overlay network can run whatever protocols we require, unimpeded by routers and middleboxes and which is resistant to interception, interference and netblocks.
[0] https://www.librecast.net/librecast-strategy-2025.html
[1] https://spectra.video/w/9cBGzMceGAjVfw4eFV78D2
Off-topic but I'm impressed with how many potentially revolutionary projects get funding from NLNet.
But after working in ISP for a while I realised that the issue is getting ISP's to use cool protocols is just impossible and everything must be built at higher levels.
Or to get back to your original question: https://docs.joinpeertube.org/use/create-upload-video
edit: Your'e not limited to these addresses, for one there are other instances, for another you can selfhost your own, if your'e into that.
Technically that is one of many possible solutions, 'ready to roll' right now.
addit: Regarding sustainability, and who is behind it, maybe https://framasoft.org/en/ would be of interest?
Linked from there https://framablog.org/2024/12/17/peertube-v7-offer-a-complet...
and
https://framablog.org/2025/04/10/2025-peertube-roadmap/
I just meant like never caught on as in like it's not super popular, but looks like it's on the come up. would be nice to have a real youtube competitor lol
If that's your thing. And you have some sort of presence online elsewhere, then you can link to peertube, no matter which, or selfhosted, without problem.
That's why I pointed you to it. If you need/want the most massive audience, because of platform familarity/network effect, then probably not. At least not now. But someone has to start somehow :)
Orchestrating p2p realtime video distribution is going to have a lot of problems, and spend VC money until someone acquires you is just a lot easier.
Here's a small list of challenges you'd face:
You'll need to have a pretty good distribution network to handle users who just can't manage to p2p connect.
Figuring out the right amount of user's bandwidth you can use without people getting upset; there's a lot of internet accounts with bandwidth quotas, especially for mobile
Trying to arrange so that users connect to users with the least transmission delays would be needed to reduce overall latency. Between cross oceanic connections having unavoidable latency, the potential of buffer bloat, and having a reasonable jitter buffer, pretty soon you have wild delays and potential rebuffering.
Bandwidth constraints / layer switching is going to be a big challenge; it's one thing when your server can just push the best stream the client can manage, but if you're streaming from a peer and the stream is too big, the peer probably doesn't have a smaller stream to switch to and there's no good way to know if where the bandwidth constraint is ... maybe you should switch to the same stream from someone else or maybe you should switch to a smaller stream. Can you get even packets from one peer and odd packets from another ... should you?
Surprisingly the channels that are available work really well if you just use the mpegts stream.
In a past life I've added a few channels to a tvheadend instance on a VPS. It reliable crashed Kodi watching some channels and I've wondered if it's just broken streams or something more interesting is going on.
If you open the ports and watch popular channels it's easily saturating bandwidth - there is no limit.
I've since stopped using it it's the kind of thing that breaks not often enough to be not useless but often enough to be annoying.
It's IPv4 only and seems to use it's own tracker or at least calls to some URLs for initial peer discovery.
Building something similar as true open source would be great but I guess the usecase is mostly illegal streaming.
Be careful - it's attempting to use upnp to open ports on the router and even if just looking through the lists makes you upload fragments.
Still fascinating tool. It's getting to close to what op is looking for but I think it has scalability issues and everything about it is kind of shady and opaque.
I was hopeful about bittorrent-live when that was announced, but they didn't open source that for some reason either.
You'd need to make a UI for it
https://webtorrent.io/
The former don't want to use it as it degrades their control over the content, and the later don't want to make a new system cause systems that are built on torrents are good enough.
Encryption (can work with sharing), signatures, fall back to CDN. Control is not an issue.
> torrents are good enough.
Torrents can't do the massive market of livestream, like sports or season finales or reality TV / news. This is the entire point of the question.
> The only entities
And everyone kicked off of YouTube or doesn't want to use big corporations on principal, like Hacker Cons or the open source community.
And of course if an encryption key gets leaked, you can just rotate it. Since it’s a stream, past content is not as important.
(That said, I don’t think it will help — any DRM can be cracked, and there’s plenty of online TV streaming sites even with the current centralized systems.)
or very similar point - i had conversation with some big youtuber and person was confused why he is not more popular with certain demographic. reason was that said demographic was watching on big TV and content he was filming was big head directly in front of camera. so they do not like having 3 feet big head right in front of them... most young people watch things on mobile..
I then left and the company later got acquired by Level 3 so I don't know exactly how it evolved but it's likely that they abandoned the illegal streaming market for reputational reasons and stuck with big players.
It just struck me that there are probably plenty of large media companies that use all sorts of proprietary video streaming products for distribution that we've never heard of, simply because the tech isn't available to consumers.
Media companies are generally pretty secretive about their tech (Netflix being the exception to this rule), so there isn't much to be found about this. The piracy community (because, let's be real here) also won't be interested in a non-free (speech and beer) streaming solutions like these. So that's probably why there is just very little public information available.
But if you use paid digital TV products (Eurosport being a perfect example here) then you are probably already using all sorts of P2P streaming protocols you've never heard of.
The real reason is centralised architecture gives them control and ability to extract rent.
What are you talking about?
YouTube has a lot more costs than bandwidth. And a lot of ads and Premium revenue goes to creators.
I remember it as it was one of rare apps built in XUL, the same framework as Mozilla apps (Firefox).
https://en.m.wikipedia.org/wiki/Joost
one issue I can imagine would be that each part would discover peers independently where assumption that most peers of previous parts should be expected to also have those files.
second idea would be to use ipfs in that way instead of torrent. that would probably have much easier time for reusing peer discovery between parts and also would solve issue when to stop seeding as this is already build in into protocol.
I guess that creating distributed twitch basing on ipfs would be feasible but not sure how many people would like to install ipfs node before that could use that. that's kind of chicken and egg problem, you need a lot of people before this system starts work really well, but to get interest it need to really perform well so people would migrate from twitch like services.
ofc you can use public gateways. afaik cloudflare have public ipfs endpoint that could serve as fallback
They use bao hashing which is something that I discovered through them (IIRC) and its really nice.
Could create such a protocol though bittorrent/ipfs is fine
I once wanted to create a website which was just a static website.
and I used some ipfs gateway to push it with my browser and got a link of that static website, all anonymous.
Kind of great tbh.
There are other genuinely useful crypto projects (like Monero for privacy and I don't like the idea of smart contracts)
I really want to tell you the fact that most crypto is scam. These guys first went into crypto and now I am seeing so much crypto + AI.
As someone who genuinely is interested in crypto from a technology (decentralization perspective)
I see transactions as a byproduct not the end result & I see people wanting to earn a quick buck feel really weird.
Also crypto isn't safe. I just think like now its better to correlate as a tech stock though 99% of the time, its run by scams, so absolutely worse.
The technology is still fascinating. But just because the technology is fascinating doesn't mean its valuable. Many people are overselling their stuff.
That being said, I have actually managed to use crypto to create a permanent storage (something like ipfs but its forced to store it forever) , so I think this can be used where anonymity/decentralized is required. But still, this thing could be done without including money in the process as well & crypto is still not as decentralized as one might imagine.
Iroh contributor here. I don't know what you are referring to. Iroh is just a library to provide direct QUIC connections between devices, even if they are behind a NAT. We don't have any plans doing a blockchain or an ICO or anything like that.
I am not aware of any project called Iroh that is a scam, but if there is, please provide a link here. It's not us.
I know there have been some scammers trying to make a BLAKE3 coin or something, a year ago.
My only gripe with iroh currently is that its browser wasm feels too much for me/ I don't want to learn rust.
So I actually wanted to build something that required connectivity and I used nostr because nostr is great for website and not gonna lie ,its awesome as well (but nostr is also riddled with crypto bros :( )
I have nothing against crypto in principle, but I really don't want Iroh to be associated with crypto scams.
Iroh is just a library for p2p connections. You can use it for crypto, but I would say that the majority of our users are non-crypto(currency).
We will try to make the wasm version easier to use, but if nostr works well for you, go for it! Not the right place if you want to avoid crypto bros though :-)
I work on low latency and live broadcast. The appropriate latency of any video stream is the entire duration of it. Nobody else seems to share this opinion though.
It is a thing.
For live streaming there is WebRTC. It is also a thing.
All of it started with the webtorrent project though. One of the first demos was booting Ubuntu while streaming the incomplete live ISO image, quite impressive for the time.
This is great tech for media files. Currently better than any other. But making it would make those media files very easy to redistribute, and it is hard to change that without loosing the P2Pness goodies.
If Popcorn Time had a synchronized multi-resolution catalog, bandwidth-sensitive auto switch and some paid seed servers, it would be better than any other streaming service (technically speaking).
Tailscale (or any other P2P overlay network) could solve this problem by re-enabling the multicast support that most ISPs block. It's not a terrible idea.
Edit: a comment elsewhere linked https://www.librecast.net/librecast.html which seems to be doing exactly this.
For livestreams there's AceStream built on BitTorrent, but I think it's closed-source. They do have some SDK but I never looked into it. It's mostly used by IPTV pirates. I've used it a few times and it's hit-or-miss but when it works well I have been able to watch livestreams in HD/FullHD without cuts. Latency is always very bad though.
Then for video-on-demand there are some web-based ones like PeerTube (FOSS) and I think BitChute? Sadly webtorrent is very limited.
Source: I worked on the Twitch video system for 6 years.
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.