0

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.

  • Take a look here: https://stackoverflow.com/questions/28099493/running-ffmpeg-in-browser-options – Ivan Sanchez Apr 04 '19 at 10:04
  • If you are using Javacsript and doing it server side then as Ivan says the browser may simply be running out of horsepower. If you are doing it server side, it would help if you share your code and it may be easier to spot any problems. – Mick Apr 04 '19 at 12:03
  • Show the complete log from the ffmpeg command. Also, your ffmpeg is ancient. Get a new one at https://johnvansickle.com/ffmpeg/ and point your script to it or put it in /usr/local/bin. – llogan Apr 04 '19 at 17:04

0 Answers0