Using IPFS for Live Streaming Video?

I’ve been think about this for quite awhile but have not really done anything with it. I did watch a video from a team who actually implemented (hacked) a live video stream using IPFS distribution. I think it was Yurko?

My question is do you think this is doable in the long run or am I wasting time thinking about this?

Disclaimer: I am a live steamer enthusiast from the context of the infrastructure and distribution.
Using CDN for distribution would be cost prohibitive for me right now.

Thanks in advance,

Ray

2 Likes

Welcome to IPFS rayj001!

I think CDN (Content Delivery Networks) are a centralized mechanism which goes against the distributed philosophy of IPFS. Also, CDNs can be used as a single point of failure for a large part of the internet and be a tool to censor.

I think IPFS might be able to work around this with live streaming, if the stream is buffered and chunked into files which could later be stitched together into a sort of play list. Such viewing is already possible in applications like VLC, which lets you seemlessly watch video files in succession.

For such a system to work, there would be a time delay between the actual event, the saving of the buffer and the distribution from that saved file to the other nodes where it would be stored/watched.

I hope you receive some good answers to your question.

1 Like

Thanks Yeehi,

This is a project I’m looking to dive into once I retire, hopefully in one more year.

Ray

2 Likes

You could also try looking at this problem from the other end, by contacting the OBS (Open Broadcast Studio) community, for example, and asking them if they support IPFS or would like to do so.

2 Likes

I guess this one? :

A related thread :):

This one can be interesting too:

It is possible. I guess one way to do that is to use pubsub with one common topic for your platform with the available streams, etc., and then a topic per stream, that users can join. You can use the peerID of the streamer as a topic name, to save a time for your users (not having to ask around who knows which peers to contact to watch the stream). The app itself or the website can be decentralized via IPFS.

I wouldn’t be surprised if DTube worked similarly. (The difference is that the content on DTube is decentralized, not the platform itself IIRC. It allows them to do the coordination centrally, not via a broader topic.)

On top of that for the actual streaming you will probably plug the logic of Yurko, I guess.

5 Likes

Any updates on this? Very interesting… And I wonder how one could load balance when the live stream starts between one’s own server and the IPFS network.

2 Likes

One of the difficulties that has been discovered is the time it takes for the chunks of the video stream to have their CID propagate through the IPFS network sufficiently quickly for the stream to be “live”.

If I remember, it was taking over 3 minutes for the CID to propagate, and the chunks were less than 3 minutes in duration. A workaround was to write the CIDs of each chunk to an HTML site (which can happen very quickly), and then have the people watching the stream pull the CIDs from that continually updated list into their own IPFS node. There is a great talk on this. I will try and find it later.

To provide a quality experience for viewers, I think it might be a good idea to have a staggered start, with 2 or 3 people volunteering to have the stream going before it is announced to the wider public.

I think publishing the CIDs on the list to various IPFS gateways might help too.

I already built a prototype that works. Check it out → github.com/sionois/dit

You are right it take time to propagate on the DHT but that is why I used PubSub, it’s fast enough for live streaming.

2 Likes

Thanks! Since you have put in the hard work for this, and also because its purpose is to show a video stream, I hope you will use your tool to include an ipfs link to a a video “How to…”, by making video yourself using the tool to explain the tool

That’s the goal! It already work I just didn’t made the tutorial video yet. My website (defluencer.eth) will be explanation and tutorials about how itself works, pretty meta!

@SionoiS Thanks for all your work on this.

A picture says a thousand words. In this case, a video could inspire many.

By the end of this year you’ll have a fully fonctional social media website on IPFS. Be patient my friend!

:heartpulse:

This will be incredible. If you have it ready in an installer like an appimage or something, I will be happy to try and test it and provide some early feedback.

1 Like