I am trying to output a mp4 video file via PHP. When used through a flash player (e.g. flowplayer), it works great. But when I try to use it as a source in the html5 video tag or directly access the php file, it does not work.
The code I use is as follows:
$filesize = filesize($file); header("Content-Type: video/mp4"); if ( empty($_SERVER['HTTP_RANGE']) ) { header("Content-Length: $filesize"); readfile($file); } else //violes rfc2616, which requires ignoring the header if it invalid { rangeDownload($file); }
and rangeDownload from http://mobiforge.com/developing/story/content-delivery-mobile-devices Appendix A.
Even when I use the Content-Range header ( Content-Range:bytes 0-31596111/31596112 ), it starts when 30.13 MB of video is uploaded.
php mp4 flowplayer
GRaecuS Dec 01 2018-11-12T00: 00Z
source share