title: how to encode video in php and save that encoded video in a file and then decode and save it in a database
body: <p>I had encode a video in Php using html and now i want to decode and save it in php .
  But I do not know how to save encoded video and how to get it for decoding.
  Do help me , I am attaching my code here </p>
  
  <pre><code>&lt;html&gt;
    &lt;video controls&gt;
      &lt;source type="video/mp4" src="&lt;?php echo getEncodedVideoString('mp4','add.mp4');?&gt;"&gt;
    &lt;/video&gt;
  &lt;/html&gt; 
  &lt;?php
    include("connect.php");
    function getEncodedVideoString($type, $file) {
      $filename= 'data:video/' . $type . ';base64,' . base64_encode(file_get_contents($file));
      echo $filename;
  ?&gt;
  </code></pre>