title: browser hang when converting video using ffmpeg
body: <p>I'm using ffmpeg to convert videos in my codeigniter project. I'm facing with a browser related problem, when I run my php script, it basically works - takes the file, uses ffmpeg, starts converting it, but halway through it's finished, the browser hangs, I don't understand why or how to resolve it.</p>
  
  <p>My operating system is ubuntu &amp; version is : 16.04.1 and ffmpeg version is: 2.8.14-0 </p>
  
  <p>ffmpeg video comverting command:</p>
  
  <p>$command = 'ffmpeg -i ' . $input_file . ' -y -codec:v libx264 -profile:v high -b:v 1000k -maxrate 1000k -bufsize 2000k -vf: scale=-2:720 -r 24 -crf 18 -pix_fmt yuv420p ' . $output_file . ' 2>&amp;1';
  exec($command);</p>
  
  <p>I need help regarding the lagging I am facing while converting videos.</p>