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.
My operating system is ubuntu & version is : 16.04.1 and ffmpeg version is: 2.8.14-0
ffmpeg video comverting command:
$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>&1'; exec($command);
I need help regarding the lagging I am facing while converting videos.