Top
Best
New

Posted by memet_rush 4/14/2025

Ask HN: Why is there no P2P streaming protocol like BitTorrent?

I've been wondering if anyone knows why there is no P2P protocol for mass live stream content in decent quality? specifically what are the technical limitations or is it mostly that people don't want to get destroyed by media company lawyers? I've searched around for a while and i cant find anything like that that can handle thousands of people streaming. The closest is probably Webrtc and that looks like it can only handle 500~ peers.

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!

236 points | 223 commentspage 2
netsharc 4/14/2025|
AceStream is P2P, its primary use is to stream pirated live sports though. But looking it up, it seems to have been infected by "blockchain!" geniuses.
nisa 4/15/2025||
It still works without any blockchain and there are dockerfiles and images for using it with CLI only on github. It's closed source through and the UI was a forked version of VLC - it's also been suspected to spread malware - CLI tools look fine through but who knows.

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.

extraduder_ire 4/15/2025||
One of the main things that hindered acestream is probably it remaining mostly proprietary. There was an explosion of different bittorrent implementations past the first one, which forced everyone to properly standardise.

I was hopeful about bittorrent-live when that was announced, but they didn't open source that for some reason either.

wmf 4/14/2025||
This tech has been developed several times but ultimately CDNs are now so cheap that P2P is pointless. You can't ignore development cost since it dominates all other costs in this case.
globular-toast 4/15/2025|
If CDNs are so cheap, why is YouTube insistent that they should get paid for their bandwidth? I already pay for my bandwidth and am quite happy to use it for something like YouTube.

The real reason is centralised architecture gives them control and ability to extract rent.

dewcifer 4/16/2025|||
You are correct. It's about control and money.
crazygringo 4/15/2025|||
> why is YouTube insistent that they should get paid for their bandwidth?

What are you talking about?

YouTube has a lot more costs than bandwidth. And a lot of ads and Premium revenue goes to creators.

LargoLasskhyfv 4/14/2025||
https://en.wikipedia.org/wiki/PeerTube ?
memet_rush 4/14/2025|
looks interesting! surprised something like that never caught on. I looking for something like Twitch basically. It has really good quality and is live. But obviously Twitch is just losing money and using all Amazons resources so I wanted to see if there's a more sustainable p2p approach
LargoLasskhyfv 4/14/2025|||
What do you mean by never caught on? It's 'live' at https://joinpeertube.org/ where you can either go to https://joinpeertube.org/browse-content and put something into that search form, or limit that search to specific 'instances' under https://joinpeertube.org/instances

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/

memet_rush 4/14/2025||
Thanks! i will just check it out.

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

LargoLasskhyfv 4/14/2025||
Yes. It's the typical 'hen & egg' problem. I'm watching there from time to time, and even found some things (independent trance/ambient/goa music) which didn't exist on YT at all! Though the selection is limited, compared to YT or whatever, it's less algorithmic, and because of this you're not forced to use most exaggerated grimacing or clickbaity titles, IF you have no commercial interests and give a shit about ads.

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 :)

toast0 4/14/2025|||
For massive video distribution, getting acquired by a company with "infinite bandwidth" is the sustainable approach.

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?

Imustaskforhelp 4/14/2025||
There's iroh.computer which can use a relay/ do direct nat punching.

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.

Imustaskforhelp 4/14/2025|
Shame it's being abused by crypto bros who want to treat it as money.

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.

rklaehn 4/15/2025||
> Shame it's being abused by crypto bros who want to treat it as money.

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.

Imustaskforhelp 4/15/2025||
I actually wasn't referring to iroh but rather ipfs / the stratos thing that I mentioned.

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 :( )

rklaehn 4/15/2025|||
OK, thanks for the clarification.

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 :-)

Geee 4/15/2025|||
Haven't used Nostr recently, but isn't it associated with bitcoiners rather than crypto bros? At least it used to be that way.
jauntywundrkind 4/14/2025||
Tribler has had video streaming over BitTorrent for a bit less than two decades. https://www.tribler.org/StreamingExperiment/
Dibby053 4/15/2025||
It is a thing.

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.

cess11 4/15/2025||
As I understand it, P2P requires information sharing so when your distribution network grows this eventually turns into a performance bottleneck. You'll also need rather sophisticated mitigations against bad actors in the distribution network, like nodes that forward bad packets instead of distributing the good packets they receive and got requests for.

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.

RedNifre 4/15/2025||
This used to exist in 2008 and it was perfect. It was called Joost and worked like this: - P2P streaming - You get a big menu of channel logos - You click on a channel and it would start the first episode of a randomly chosen series from that channel, or it would continue from where you left off - There might have been a "zap" function? I'm not sure - The GUI was so nice and large that if you connected a Wii Remote to your PC, you had the best TV experience from your couch, ever: Just press a button to bring up the menu, aim at the channel you want to switch to, done.

Such a shame that it failed, nothing after it ever came close.

alganet 4/14/2025||
BitTorrent is already a streamable P2P protocol. You just need a client that can prioritize downloading the file parts in order.

It is a thing.

wmf 4/14/2025||
It doesn't work for live streaming without modifications though.
alganet 4/14/2025||
Fair enough.

For live streaming there is WebRTC. It is also a thing.

bawolff 4/15/2025||
But its not really p2p in the sense the original poster meant (as in its not an overlay network). Its p2p in the sense that tcp/ip is p2p, not in the sense that bit torrent is.
pabs3 4/15/2025|||
https://github.com/johang/vlc-bittorrent/
syndeo 4/14/2025||
I believe Popcorn Time worked this way, but I may be wrong. Never dug too deeply into it.
alganet 4/14/2025||
It did.

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).

1970-01-01 4/15/2025|
It's been tried a few times. The bottleneck still exists in the last mile of the network. Users simply don't have good enough equipment to reliably handle this amount of streaming data.
rollcat 4/15/2025||
Yep, real-world HLS/DASH solutions rely heavily on edge caches; you don't care as much about having your infra in the right region, but POPs are everything.

Netflix famously offers ISPs an appliance.

zinekeller 4/15/2025||
One of the problems is that even "symmetric" connections are usually not symmetric at all (obviously talking about residential connections here, not DIA).
More comments...