I have a web page that (among other things) should extract a specific frame from a user uploaded video. The user searches for a specific part of .mp4 in the player, then presses the button, and the ajax call is launched on a php script that takes .mp4 and the exact time from the video, and uses this to extract the โsketchโ frame.
My current solution uses the php exec command:
exec("ffmpeg -i $videoPath -ss $timeOffset -vframes 1 $jpgOutputPath");
... which works just fine, except that it is as slow as molasses. I assume that ffmpeg is too much to work with, and I could do better using basic libraries or something like that ... however, I have no idea how to do this.
Ideally, I do not want to install anything that requires a real "installation process" ... i.e. deleting the executable in the folder with my web application is fine, but I would not have to actually run the installer. In addition, the solution should be able to run on Mac, Linux, and Windows (although Linux is a top priority).
What can I do to speed up this process?
Thank.
php ffmpeg video mp4 video-processing
DanM Aug 30 '13 at 14:02 2013-08-30 14:02
source share