0

I have developed a html5 app, which one record video around 20 sec in a function. I need to convert this video to image sequences. Then I will display this sequences to my app for further processing. I have a server to upload the videos. I am using php as server scripting language.

Is there any way to convert video to image (any type jpg, gif, png etc...) sequences using php?

1 Answers1

0

I can't test it now, but try to use ffmpeg to convert a video to image sequences: How to extract images from a Video using FFmpeg

You'd do something like this:

$command = 'ffmpeg -i '
           . escapeshellarg($videoFilePath)
           . ' -r 1 -f image2 '
           . escapeshellarg($dstDirPath)
           . '/image-%3d.jpeg';
exec($command, $output, $return);
Pedro Amaral Couto
  • 2,056
  • 1
  • 13
  • 15