[HN Gopher] Why is there no P2P streaming protocol like BitTorrent?
       ___________________________________________________________________
        
       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!
        
       Author : memet_rush
       Score  : 23 points
       Date   : 2025-04-14 18:04 UTC (4 hours ago)
        
       | elmerfud wrote:
       | People have tried to build BitTorrent clients to do this. As far
       | as I know they never took off. The primary problem is you
       | oftentimes don't get people who want to share back or who have
       | firewalls or other connections that don't allow them to share
       | back. So you end up with a few people who end up seeding
       | everything out. The second problem is in order to watch a
       | streaming protocol things need to arrive in order. It is totally
       | possible to do with BitTorrent and request the blocks in the
       | order that you want but you may not always be able to get them in
       | the order you want.
       | 
       | In 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.
        
         | memet_rush wrote:
         | what about having something reasonable for lag, like 30-60
         | seconds would that make a big difference or you think it would
         | just eventually degrade too? 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.
         | 
         | 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
        
           | dave4420 wrote:
           | With sports streams you specifically want low lag, don't you?
           | It's no fun being spoilered by people cheering (or not) next
           | door.
        
             | memet_rush wrote:
             | i wouldn't mind a minute of lag tbh if the quality and
             | reliability was better. I'm pay $20 a month for dazn and it
             | still lags and buffers lol
        
       | dp-hackernews wrote:
       | Isn't that what multicast is for?
        
         | memet_rush wrote:
         | i guess but im thinking like multicast with the people sharing
         | like bittorrent, just live. so you'd need to factor in people
         | leaving and people leeching
        
           | dp-hackernews wrote:
           | So a multicast like derivative that is peer aware and can
           | redistribute locally any available parts - which would
           | require some sort of caching, which would probably break
           | copyright etc... So perhaps that's the reason why nothing
           | exists. \o/
        
         | wmf wrote:
         | Multicast doesn't work on the Internet.
        
           | Lammy wrote:
           | https://en.wikipedia.org/wiki/Mbone
        
             | wmf wrote:
             | Mbone was fake multicast (today you'd be better off using a
             | CDN) and I don't know if it's still operating.
        
       | LargoLasskhyfv wrote:
       | https://en.wikipedia.org/wiki/PeerTube ?
        
         | memet_rush wrote:
         | 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 wrote:
           | 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 wrote:
             | 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 wrote:
               | 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 wrote:
           | 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?
        
       | netsharc wrote:
       | 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.
        
       | noman-land wrote:
       | Isn't this what https://webtorrent.io/ is?
        
         | memet_rush wrote:
         | kinda but i think that's for files. I am specifically thinking
         | for live content like twitch
        
           | evbogue wrote:
           | Trystero can do this:
           | https://github.com/dmotz/trystero?tab=readme-ov-
           | file#audio-a...
           | 
           | You'd need to make a UI for it
        
       | jauntywundrkind wrote:
       | Tribler has had video streaming over BitTorrent for a bit less
       | than two decades. https://www.tribler.org/StreamingExperiment/
        
       | reliablereason wrote:
       | The only entities that could use such a thing are major streaming
       | platforms, and projects trying to stream copyrighted content
       | without consent.
       | 
       | 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.
        
       | wmf wrote:
       | 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.
        
       | immibis wrote:
       | What does PeerTube do?
        
       | miohtama wrote:
       | There was Joost in 2008, from Skype founders. Skype was
       | originally P2P until Microsoft acquisition and killing this
       | legally questionable feature - need to feed the big brother (:
       | Joost raised ~$50M.
       | 
       | 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
        
       | Szpadel wrote:
       | I would see that easiest way to bring something like that would
       | be some adaptation of m4u format, just instead of URLs to video
       | it could have URL to torrent/magnet.
       | 
       | 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
        
         | immibis wrote:
         | I would think that the easiest way would be to not use
         | torrents, because torrents have fixed top-level hashes.
         | Instead, create a new protocol like bittorrent but streaming.
        
       | Imustaskforhelp wrote:
       | 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 wrote:
         | 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.
        
       | oldgregg wrote:
       | Build it. Use Go. Maybe nknorg/nnet for P2P. Signed HLS segments.
       | Have Go also serve the web front-end with a WASM web worker.
       | Public nodes can run on a very lightweight VPS/server with an
       | autocert domain. Viewers browser join the swarm with WASM-- this
       | way people can just type in a web address so it's very user
       | friendly but the domain doesn't actually have to serve any data.
       | I would just use a trusted pubkey to sign P2P updates so nodes
       | can block naughty IP addresses. Should get you very friendly user
       | experience, easy node deployment, pretty low latency, and
       | bittorrent level of legal resilience.
        
       | johanvts wrote:
       | Octoshape developed this tech, I believe it was sold to some
       | american tv networks.
        
       | Am4TIfIsER0ppos wrote:
       | > Also i think it wouldnt have to be live, people would
       | definitely not mind some amount of lag.
       | 
       | 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.
        
       | alganet wrote:
       | 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 wrote:
         | It doesn't work for _live_ streaming without modifications
         | though.
        
           | alganet wrote:
           | Fair enough.
           | 
           | For live streaming there is WebRTC. It is also a thing.
        
         | syndeo wrote:
         | I believe Popcorn Time worked this way, but I may be wrong.
         | Never dug too deeply into it.
        
       | greenavocado wrote:
       | I would not be surprised if the rise of CG-NAT put another nail
       | in the proverbial coffin of P2P video streaming and related
       | sharing.
        
       | greenavocado wrote:
       | The only way this will be possible is if there is widespread
       | adoption of an Internet overlay network similar to Tailscale in
       | its design. Fortunately or unfortunately depending on how you
       | look at it Tailscale is limited to Layer 3 so Multicast doesn't
       | work (it depends on IGMP to function correctly).
        
       ___________________________________________________________________
       (page generated 2025-04-14 23:01 UTC)