diff --git a/src/Services/ImageConverter.php b/src/Services/ImageConverter.php index 242baeea..3c9ed261 100644 --- a/src/Services/ImageConverter.php +++ b/src/Services/ImageConverter.php @@ -82,6 +82,18 @@ class ImageConverter ]); } + if (!file_exists($targetPath) && ProgramExecutor::isProgramAvailable(self::PROGRAM_NAME_FFMPEG)) + { + ProgramExecutor::run( + self::PROGRAM_NAME_FFMPEG, + [ + '-i', + $sourcePath, + '-vframes', '1', + $targetPath, + ]); + } + if (!file_exists($targetPath)) throw new \Exception('Error while converting Flash file to image'); }