aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Thumbs/Video.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-08 14:50:58 -0800
committerzotlabs <mike@macgirvin.com>2018-01-08 14:50:58 -0800
commit75804d7ce57a476c85a486c807ea1f5a75235a0e (patch)
tree13794288d5ffca739248d9ec017ef1a4cef9b93d /Zotlabs/Thumbs/Video.php
parentd4af870bb6500747790e6f196afeb4d75011185d (diff)
parent0600817ef75d19d1ec91ba822f8a6938d442824e (diff)
downloadvolse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.tar.gz
volse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.tar.bz2
volse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Thumbs/Video.php')
-rw-r--r--Zotlabs/Thumbs/Video.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/Zotlabs/Thumbs/Video.php b/Zotlabs/Thumbs/Video.php
index 5e09ef9a3..05127355e 100644
--- a/Zotlabs/Thumbs/Video.php
+++ b/Zotlabs/Thumbs/Video.php
@@ -32,12 +32,24 @@ 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);
+ @exec($cmd);
if(! file_exists($outfile)) {
logger('imagick scale failed.');
@@ -46,7 +58,7 @@ class Video {
@rename($outfile,$file . '.thumb');
}
}
-
+
@unlink($tmpfile);
}
}