Live data from Hacker News

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

news.ycombinator.com

91–100 of 231 posts

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

#91
post #56
post #14

Earlier quoted context omitted.

Multicast doesn't work on the Internet.

You might have a look at Librecast [0] which is a R&D project funded by Horizons Europe NGI0 programme via NLnet, aiming to the bring multicast to the current unicast internet and smoothen the transition of projects that adopt it. A great intro to multicast and Librecast is given in Brett Sheffield's 2020 LinuxConfAU talk "Privacy and Decentralization with Multicast" that is available on Peertube [1]. > To enable mul…

The protocol seems like an excellent idea, but #3365a3 on black for the website text is one of the worst designs for open-source project websites I've seen yet.

Off-topic but I'm impressed with how many potentially revolutionary projects get funding from NLNet.

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

#94
post #37
post #35

Earlier quoted context omitted.

It doesn't work for live streaming without modifications though.

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

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.

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

#95
post #62

Part of the reason bit torrent works really well is that the file is downloaded in random order. It lets everyone cooperate, while still being robust to bad peers, bad network connections, churn etc. If you want live high quality streaming, a lot of reasons bit torrent works so well goes away. Latency matters. In bit torrent if the peer goes away, no big deal, just try again in 5 minutes with another peer, you are do…

I don't think people are appreciating the nuance of what you're saying. Most of what you are saying isn't accurate for netflix style streaming, which would actually be more aptly called "video on demand", but is very applicable to "live streaming" in the sense of live sporting events or news broadcasts.

Video-on-demand is perfectly implementable on top of BitTorrent. As you say, there are some latency pitfalls you'll have to avoid, but that's nothing you can't hack yourself out of.

Livestreaming is a different beast. As you say, the problem with livestreaming is that everyone needs the same content at the same time. If I spend 200ms downloading the next 500ms worth of content, then there's nobody to share it with, they all spent the 200ms doing the same. BitTorrent relies on the time shift that is allowed between me downloading the content and you requesting it. If you request it before I've got it, well I can't fulfil that request, only the guy I intend to get it from can.

If you wanted to implement something like that, you would probably pick a tree of seeders where the protocol would pick a subset of trusted nodes that it would upload the content to before then allowing them to seed it, and the have them doing the same recursively.

That would obviously introduce a bunch of complexity and latency, and would very much not be BitTorrent anymore.

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

#96
post #76

Earlier quoted context omitted.

This is still just streaming a static file though. Adjusting which segment to get will work, buffering will work, and people don't mind their movie starting a few seconds after they press play. If I'm streaming live, I need the frame immediately, and it doesn't help much to get later frames after the frame I'm missing.

what if everyone agrees on a 10s delay?

Define "live".

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

#97
post #62

Part of the reason bit torrent works really well is that the file is downloaded in random order. It lets everyone cooperate, while still being robust to bad peers, bad network connections, churn etc. If you want live high quality streaming, a lot of reasons bit torrent works so well goes away. Latency matters. In bit torrent if the peer goes away, no big deal, just try again in 5 minutes with another peer, you are do…

I am not convinced about the random order stuff. If most people will stream from the start then the start will be more seeded? So it's all good. And the order is requested by the client, and there are clients that go in the sequential order, like Deluge

If everybody starts at the start then it will be very poorly seeded when everybody wants it, before the being well seeded right when nobody needs it.

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

#98

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.

I worked for a company called Streamroot which sold exactly this, and I can tell your first paragraph is indeed correct but the second isn't: we had major streaming platforms as customers when I was there (not global giants like Netflix or YouTube, but big european players like Canal+ or Eurosport) and we also had plenty of warez websites (streaming sport, animes, porn, etc.). I then left and the company later got ac…

> I then left and the company later got acquired by Level 3 so I don't know exactly how it evolved

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.

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

#99
post #62

Part of the reason bit torrent works really well is that the file is downloaded in random order. It lets everyone cooperate, while still being robust to bad peers, bad network connections, churn etc. If you want live high quality streaming, a lot of reasons bit torrent works so well goes away. Latency matters. In bit torrent if the peer goes away, no big deal, just try again in 5 minutes with another peer, you are do…

This comments on why bittorrent as is isn't used for live streaming, not why P2P shouldn't be used for live streaming

> Latency matters. In bit torrent if the peer goes away, no big deal, just try again in 5 minutes with another peer, you are downloading in random order, who cares if one piecs is delayed 5 minutes. In a live stream your app is broken if it cuts out for 5 minutes.

First of all, BitTorrent clients do not download in random order or wait 5 minutes. They usually download the rarest block first, but can do whatever they want, whenever they want.

Second, standard HLS sets a nominal segment size of 6 seconds (some implementations will go as high as 10 seconds), and a client will usually cache multiple segments before playing (e.g., 3). This mean that you have 18 seconds before a segment becomes critical.

This is not a difficult thing for a P2P network to handle. You'd adapt things to introduce timing information and manage number of hops, but each client can maintain a connection to a number of other clients and have sufficient capacity to fill a segment if a connection fails. Various strategies could be used to distribute load while avoiding latency penalties.

Low-latency HLS uses much smaller segments and would be more demanding, but isn't impossible to manage.

> BitTorrent punishes people who dont contribute

Private communities punish this behavior, BitTorrent clients do not. Most new downloads will appear as freeriders for a long time, and only over long periods far exceeding the download time will enough compatible seeding opportunities arise for them to contribute in any substantial way.

The network does not need everyone to seed, it only needs enough people to seed.

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

#100
post #2

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…

stremio works fine and is quite popular. 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.

I was going to cite stremio too, it's far from perfect but it works fine most of the time.
Post reply on HN