title: How to Merge two videos without re-encoding
body: <p>I am trying to Merge two video without re-encoding them.</p>
  
  <p>Currently i use a approach which is too much time consuming and resource as well. I just want to merge without re-encoding them. Currently i am using</p>
  
  <pre><code>        exec ( "cpulimit -l 90 ffmpeg -i $filename1 -qscale 0  $intermediate1 &amp;&gt; stream1.log" );
          exec ( "cpulimit -l 90 ffmpeg -i $filename2 -qscale 0  $intermediate2 &amp;&gt; stream2.log" );
          $output = '/var/www/html/myserver/merg/'.uniqid().'_merge.'.$ext;
          exec ( "cpulimit -l 90 cat $intermediate1 $intermediate2 | ffmpeg -i - -qscale 0 $output &amp;&gt; stream3.log" );
  </code></pre>
  
  <p>Above takes a lot of time.. I want a quick way to do it.</p>