title: Play mp4 file through php in HTML5 Video Tag in Chrome?
body: <p>I have a problem with mp4 files. Html5 Video Tag can play it with direct link, but not with PHP Header (Mp3 is worked fine with PHP Header). I have tried almost of solution in Stack but still not resolve my problem :(</p>
  
  <p>Hear is my code:</p>
  
  <p><strong>PHP</strong>   mp4.php</p>
  
  <pre><code>    error_reporting(0);
  
      $local_file = 'z.mp4';//'b.mp3';
      $download_file = 'out.mp4';
      // send headers
      header('Cache-control: private');
      header('Content-Type: video/mp4');
      header('Content-Length: '.filesize($local_file));
      header('Content-Disposition: filename='.$download_file);
      header('Accept-Ranges: bytes');
      header("Content-Transfer-Encoding: binary");
      readfile($local_file);
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>     &lt;video controls="" autoplay="" name="media"&gt;
            &lt;source src="http://localhost/videos/mp4.php" type="video/mp4"&gt;
       &lt;/video&gt;
  </code></pre>
  
  <p>I don't know why :( Please help me.</p>
  
  <p>Thanks,</p>