Added ffmpeg support in Flash thumbnails creation
This commit is contained in:
parent
105a564c7d
commit
28bba097c3
1 changed files with 12 additions and 0 deletions
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue