document that imagick calls/execs ffmpeg for mp4 video thumbnails

This commit is contained in:
zotlabs 2017-12-25 16:06:24 -08:00
parent b507ac1f98
commit 32dfa4e868

View File

@ -32,12 +32,18 @@ class Video {
fclose($ostream); fclose($ostream);
} }
/*
* Note: imagick convert may try to call 'ffmpeg' (or other conversion utilities) under
* the covers for this particular operation. If this is not installed or not in the path
* for the web server user, errors may be reported in the web server logs.
*/
$imagick_path = get_config('system','imagick_convert_path'); $imagick_path = get_config('system','imagick_convert_path');
if($imagick_path && @file_exists($imagick_path)) { if($imagick_path && @file_exists($imagick_path)) {
$cmd = $imagick_path . ' ' . escapeshellarg(PROJECT_BASE . '/' . $tmpfile . '[0]') . ' -thumbnail ' . $width . 'x' . $height . ' ' . escapeshellarg(PROJECT_BASE . '/' . $outfile); $cmd = $imagick_path . ' ' . escapeshellarg(PROJECT_BASE . '/' . $tmpfile . '[0]') . ' -thumbnail ' . $width . 'x' . $height . ' ' . escapeshellarg(PROJECT_BASE . '/' . $outfile);
// logger('imagick thumbnail command: ' . $cmd); // logger('imagick thumbnail command: ' . $cmd);
exec($cmd); @exec($cmd);
if(! file_exists($outfile)) { if(! file_exists($outfile)) {
logger('imagick scale failed.'); logger('imagick scale failed.');