Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upClient-side only video solution? #1808
Comments
This comment has been minimized.
This comment has been minimized.
|
what is the max size of your video? |
This comment has been minimized.
This comment has been minimized.
|
Probably pretty big. There will be practical limitations of storage space and max bitrates, but I'd say at least 4 hours at ~20Mbps. Obviously with HLS the effective streaming bitrate could be a lot lower. |
This comment has been minimized.
This comment has been minimized.
|
then there is an existing issue: Implement storage in browser clients #86 |
This comment has been minimized.
This comment has been minimized.
|
But that's only if you try to download the entire video at once right? Would it be possible to have clients download/seed chunks within say 100MB of where that client is in the video? |
This comment has been minimized.
This comment has been minimized.
|
any progress? from my research so far, it appears that webtorrent needs the whole file in order to seed due to the limit of underlying bittorrent protocol. there are some discussions else where for the chunks torrenting, but stream playing those chunks is another matter that needs to be solved as well |
This comment has been minimized.
This comment has been minimized.
|
i tried to solve #86, and was able to use pouchdb to replace memory-chunk-store. so webtorrent saves chunks to indexeddb directly. but i faced unexpected memory and callback issues with immediate-chunk-store and chunk-store-stream. |
This comment has been minimized.
This comment has been minimized.
|
@ibinti I haven't been working on it. Probably still at least a few months before I'll seriously dig into solving this. Using HLS videos might mitigate this somewhat, but using a separate torrent for each chunk. Not sure if that would work very well or not. Might be too much overhead. |
I read through several similar issues, but didn't find a conclusive answer to my question. Sorry if I missed it somewhere.
My goal is to host my own videos on my HTTP server. Most of the time I don't expect many people to be viewing them, but I would expect large spikes once in a while, and I want to handle those with p2p. If possible, I don't want to implement any special logic on the server.
The ideal client-side algorithm would go something like this:
Start streaming the video over HTTP immediately upon connection.
Connect webtorrent and check if there is a torrent for this video.
If there is a torrent, check if there are any peers.
To the extent possibly, start pulling chunks from peers instead of HTTP.
Start seeding.
The final solution will need to work with both single-file mp4/h264/aac videos, and HLS (including fmp4).
Is there anything that currently does this? If not, I'd be interested in building it. Are there technical limitations I'm missing that would make it impossible?