Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Video player with js-ipfs #128

Closed
daviddias opened this issue Apr 5, 2016 · 19 comments
Closed

Video player with js-ipfs #128

daviddias opened this issue Apr 5, 2016 · 19 comments
Labels
example exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue

Comments

@daviddias
Copy link
Member

daviddias commented Apr 5, 2016

Similar to #127, but that loads a video from IPFS (with seeks and everything)

@daviddias daviddias added exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue example labels Apr 5, 2016
@daviddias daviddias added this to the milestone 1 - js-ipfs on the browser milestone Apr 5, 2016
@daviddias daviddias changed the title Load a video using js-ipfs on a webpage load a video using js-ipfs on a webpage May 9, 2016
@daviddias daviddias changed the title load a video using js-ipfs on a webpage Load a video using js-ipfs May 17, 2016
@daviddias daviddias removed this from the milestone 1 - js-ipfs on the browser milestone Jul 27, 2016
@daviddias daviddias changed the title Load a video using js-ipfs Video player with js-ipfs Nov 21, 2016
@daviddias daviddias added status/deferred Conscious decision to pause or backlog status/ready Ready to be worked and removed js-ipfs-ready status/deferred Conscious decision to pause or backlog labels Dec 5, 2016
@daviddias daviddias added status/deferred Conscious decision to pause or backlog and removed status/ready Ready to be worked labels Jan 29, 2017
@daviddias daviddias changed the title Video player with js-ipfs example: Video player with js-ipfs Feb 1, 2017
@daviddias
Copy link
Member Author

@moshisushi is paving the path by taking the lead and implementing hls over IPFS with js-ipfs \o/

image

Demo on: https://ipfs.io/ipfs/QmPJB4FyoM8CMGt9PdsTwUsiaNho6TGnL1NyPkoFVjtZgH/examples/index.html

Code at: https://github.com/moshisushi/hlsjs-ipfs-loader

This is is pretty cool stuff @moshisushi ! Let me know how we can help :)

@daviddias daviddias changed the title example: Video player with js-ipfs Video player with js-ipfs Aug 16, 2017
@daviddias daviddias added status/in-progress In progress and removed status/deferred Conscious decision to pause or backlog labels Aug 16, 2017
@pgc-13
Copy link
Contributor

pgc-13 commented Aug 16, 2017

@diasdavid The media I've used for this example is audio only actually. Video works as well (yes, a Big Buck Bunny test flight was carried out 😄) but due to the higher bandwidth requirements I run into some performance issues with libp2p (well, that's the theory), which makes the buffering of segments a bit slow (see also: https://github.com/moshisushi/ipfs-lab/tree/master/secio-test)

@dignifiedquire
Copy link
Member

I spoke too soon, the above profile is from when the content is already stored in cache

@pgc-13
Copy link
Contributor

pgc-13 commented Aug 18, 2017

@diasdavid Added a README to the PR now (0% proof reading at this point): https://github.com/moshisushi/js-ipfs/tree/master/examples/browser-video-streaming

Wasn't sure if you still wanted a discussion about performance in there (so I mostly left it out for now), or if that could go elsewhere.

@Beanow
Copy link

Beanow commented Sep 11, 2017

I'm working on a very similar project, it's inspired by the old Grooveshark broadcasts feature.
With https://github.com/ipfs-shipyard/ipfs-pubsub-room/ I send coordination messages for leader election, syncing playlists and playback position. And straight IPFS files for data transport. (Though HLS looks very interesting to do chunking, I'm currently fetching the whole mp3/ogg file and turn them into blobs as a proof of concept.)

Even with recent performance boosts, secio still appears to be the greatest performance offender. However I might have my topology wrong and be getting excessive chatter between peers. Having 1 host and 1 listener generally works well enough on a desktop. A phone will struggle with either of those though. It's when I add more listeners, say 4, that it starts crashing chrome tabs and makes firefox freeze within a minute or 2.

There's a lot more moving parts in my proof of concept code, so it might be tricky to profile. Perhaps it can make for a good stress test though? A recent build: https://ipfs.io/ipfs/QmYHgYysnGmiEc7f8CSzoNiJYyJoXS15eP9kaQNdZKReSs/

  1. Wait for leader election to select a host.
  2. If the host is you, you'll have a red "ON AIR".
  3. Use the file picker to add an mp3/ogg to the playlist.
  4. Open another instance to listen, it should mirror what the host does and fetch files in the playlist.

@mitra42
Copy link

mitra42 commented Jan 12, 2018

One performance issue I'm seeing is inability to seek, but I see references to seeking above, so I'm wondering how people are doing it in a browser - the other libraries I've used see the Video tag calling back to a createReadStream(opts) where opts passes start and end vaues, but despite it being a Node ReadableStream there doesn't appear to be a way to get to this "createReadStream" on IPFS ?

@daviddias daviddias added status/deferred Conscious decision to pause or backlog and removed status/in-progress In progress labels Jan 25, 2018
@daviddias
Copy link
Member Author

daviddias commented Feb 21, 2018

Update here:

@ghost ghost removed the status/deferred Conscious decision to pause or backlog label Mar 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
example exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue
Projects
None yet
Development

No branches or pull requests

6 participants