aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Thumbs/Video.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Thumbs/Video.php')
-rw-r--r--Zotlabs/Thumbs/Video.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/Zotlabs/Thumbs/Video.php b/Zotlabs/Thumbs/Video.php
index 5e09ef9a3..ff4d10a36 100644
--- a/Zotlabs/Thumbs/Video.php
+++ b/Zotlabs/Thumbs/Video.php
@@ -32,12 +32,25 @@ class Video {
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.
+ */
+
+
+ $ffmpeg = trim(shell_exec('which ffmpeg'));
+ if($ffmpeg) {
+ logger('ffmpeg not found in path. Video thumbnails may fail.');
+ }
+
$imagick_path = get_config('system','imagick_convert_path');
if($imagick_path && @file_exists($imagick_path)) {
$cmd = $imagick_path . ' ' . escapeshellarg(PROJECT_BASE . '/' . $tmpfile . '[0]') . ' -thumbnail ' . $width . 'x' . $height . ' ' . escapeshellarg(PROJECT_BASE . '/' . $outfile);
// logger('imagick thumbnail command: ' . $cmd);
- exec($cmd);
+ /** @scrutinizer ignore-unhandled */
+ @exec($cmd);
if(! file_exists($outfile)) {
logger('imagick scale failed.');
@@ -46,7 +59,7 @@ class Video {
@rename($outfile,$file . '.thumb');
}
}
-
+
@unlink($tmpfile);
}
}