Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inline <video> large file with buffer

I'm trying to build a site using HTML5's video tag so that I can share some movies I have made. Their sizes are pretty big (>500 MB), and when I watch them from outside my network, it seems like it's trying to download the whole thing before showing it. I'm wondering how I can make it so that they can be downloaded and watched at the same time.

I'm using php and javascript to build the site, although if there are libraries or techniques available in other languages, I'm more than happy to hear about them.

like image 276
Raen Herron Avatar asked Oct 19 '25 14:10

Raen Herron


1 Answers

Video files on the web sometimes need to be encoded in a special way in order for them to be played while downloading. In order for flash based videos to work, data called "moov" must be moved from the end of the stream to the start. A program called mp4 FastStart can do this for you.

Programs like HandBrake have a "web" option that also does this when encoding. The data basically contains the length of the video, etc. Typically this was at the end of the file. However when the web came along that meant downloading the entire thing before being able to play.

Can you tell us what format the video is?

like image 70
mrtsherman Avatar answered Oct 22 '25 05:10

mrtsherman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!