PHP HTML5 Video Streaming Demo:

This demo is built on the tutorial for video streaming with PHP. The file link below doesn't exist on the same physical location. It is read and sent to browser via PHP. By chaning the mime types, you should be able to stream audio media as well. The tutorial also shows example on streaming media directly from AWS S3 as well.

This Demo may not be played on Firefox browser as firefox doesn't have mp4 format support natively. But should work fine on chrome and safari.

Visit The Complete PHP HTML5 Video Streaming Tutorial


HTML5 Code For Video:
    <video controls preload="auto" src="http://demo.codesamplez.com/html5/video/sample" width="100%"></video>'
Here you should change this 'src' url to your own(may be a .php file url) Inside the PHP file, you should keep the below code which includes the PHP Streaming class and will stream the video content:
    include "./libraries/VideoStream.php";
    $stream = new VideoStream("./video/sample.mp4");
    $stream->start();exit;