From a5e7db0f7cf36296d6b59fdc9deb216b9ea5be5a Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 13 Apr 2017 12:35:14 -0400 Subject: [PATCH] use faster ffmpeg method to generate frame image --- web/includes/Event.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/includes/Event.php b/web/includes/Event.php index 11a8f4faa..a010783c5 100644 --- a/web/includes/Event.php +++ b/web/includes/Event.php @@ -217,7 +217,8 @@ class Event { return ''; } - $command ='ffmpeg -v 0 -i '.$videoPath.' -vf "select=gte(n\\,'.$frame['FrameId'].'),setpts=PTS-STARTPTS" '.$eventPath.'/'.$captImage; + #$command ='ffmpeg -v 0 -i '.$videoPath.' -vf "select=gte(n\\,'.$frame['FrameId'].'),setpts=PTS-STARTPTS" '.$eventPath.'/'.$captImage; + $command ='ffmpeg -ss '. $frame['Delta'] .' -i '.$videoPath.' -frames:v 1 '.$eventPath.'/'.$captImage; Debug( "Running $command" ); $output = array(); $retval = 0;