Live data from Hacker News

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

news.ycombinator.com

21–30 of 231 posts

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

#21

Earlier quoted context omitted.

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…

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

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

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

#22

Isn't this what https://webtorrent.io/ is?

kinda but i think that's for files. I am specifically thinking for live content like twitch

Trystero can do this: https://github.com/dmotz/trystero?tab=readme-ov-file#audio-a...

You'd need to make a UI for it

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

#23
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

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

#24
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.

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

#25

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 t…

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.

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

#26
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.

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

#27
post #23

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…

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.

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

#29

https://en.wikipedia.org/wiki/PeerTube ?

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

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?

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

#30
> 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.

Post reply on HN