Added ffmpeg support in Flash thumbnails creation

This commit is contained in:
rr- 2015-11-01 11:02:50 +01:00
parent 105a564c7d
commit 28bba097c3

View file

@ -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');
}