aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-12-30 23:24:24 -0800
committerMario <mario@mariovavti.com>2018-01-03 12:15:46 +0100
commit66d0b4d0d57d98540e36e3a9f6fa5ccd84ea5ff9 (patch)
tree5460ba4dd16c579a4725be587d20d78f98f4b5db
parent94212766cc913f318d7a39cbaa6726da24609207 (diff)
downloadvolse-hubzilla-66d0b4d0d57d98540e36e3a9f6fa5ccd84ea5ff9.tar.gz
volse-hubzilla-66d0b4d0d57d98540e36e3a9f6fa5ccd84ea5ff9.tar.bz2
volse-hubzilla-66d0b4d0d57d98540e36e3a9f6fa5ccd84ea5ff9.zip
provide warning if ffmpeg not found and video thumbnail is requested
-rw-r--r--Zotlabs/Thumbs/Video.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/Zotlabs/Thumbs/Video.php b/Zotlabs/Thumbs/Video.php
index d0f72bcdd..05127355e 100644
--- a/Zotlabs/Thumbs/Video.php
+++ b/Zotlabs/Thumbs/Video.php
@@ -38,6 +38,12 @@ class Video {
* 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);
@@ -52,7 +58,7 @@ class Video {
@rename($outfile,$file . '.thumb');
}
}
-
+
@unlink($tmpfile);
}
}