P2P-CDN icon indicating copy to clipboard operation
P2P-CDN copied to clipboard

Can video files stream?

Open branze opened this issue 8 years ago • 8 comments

Hello, first thank you for making this great thing. I'm testing it but video files can't seems to stream they play only when fully loaded. Is that the way it work or im doing something wrong? And if its not possible yet any chance to make it work? Thank you!!

branze avatar Jul 31 '17 03:07 branze

Yeah, sort of.

Real streaming (with dynamic bandwidth/bitrate) requires a dedicated server and video formats. Apache can send multiple chunks of the file using an HTTP range request (206 Partial Content HTTP response code). Byte serving and client side MediaSourceAPI

An older version of the script can refresh the content of the page everytime a chunk arrive... so it's possible to change the update policy, but I have to decide the API to expose this type of "update policy" and configuration.

Obviously it's a particular case: in general the default behaviour should be good: update after download (think about zip files or other file to download, in general).

Right?

I'd like to talk about it here, so we can decide how to configure the "DOM update policy" here.

Thanks!

andreapaiola avatar Jul 31 '17 07:07 andreapaiola

And for Safari iOs (recently they add support for WebRTC) there is this bug (?)

https://github.com/DiegoRBaquero/BTorrent/issues/48 https://github.com/webtorrent/webtorrent/issues/1151

andreapaiola avatar Jul 31 '17 09:07 andreapaiola

See this branch

https://github.com/andreapaiola/P2P-CDN/tree/updatePartial

andreapaiola avatar Aug 01 '17 09:08 andreapaiola

Example here

https://andreapaiola.name/P2P-CDN/examples/partial.php

andreapaiola avatar Aug 01 '17 09:08 andreapaiola

Still not streaming it wait to full load. Also after sometime this overload and script freeze.

branze avatar Aug 02 '17 04:08 branze

Right it's an experiment, sure it requires more work!

andreapaiola avatar Aug 10 '17 06:08 andreapaiola

It's a bit tricky... I think that you have to carefully configure the web server... mod_xsendfile for Apache xsendfile for NGinx https://forum.owncloud.org/viewtopic.php?t=29431

I'm not sure, but it's a working hypothesis https://forum.owncloud.org/viewtopic.php?t=29431

https://stackoverflow.com/questions/22632094/mod-xsendfile-firefox-resume-issue

I have to dig further into it... :+1:

andreapaiola avatar Aug 10 '17 07:08 andreapaiola

Nice, I see you use owncloud @andreapaiola Doing NextCloud stuff the last couple of months is exactly what got me looking for a project like this. At least I think this project is what I'm looking for. I also don't know enough backend to really say if what I'm looking for exists etc.

jcklpe avatar Oct 30 '18 19:10 jcklpe