aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Thumbs/Video.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-12-30 23:24:24 -0800
committerzotlabs <mike@macgirvin.com>2017-12-30 23:24:24 -0800
commit45923f408fcbb10f469c6cd654c696d1b7da70a1 (patch)
treed3f994025dc13c05b42bfee386f09754539fcc70 /Zotlabs/Thumbs/Video.php
parent94e92bb4bf40d84c79777f0791670bf05a971f7c (diff)
downloadvolse-hubzilla-45923f408fcbb10f469c6cd654c696d1b7da70a1.tar.gz
volse-hubzilla-45923f408fcbb10f469c6cd654c696d1b7da70a1.tar.bz2
volse-hubzilla-45923f408fcbb10f469c6cd654c696d1b7da70a1.zip
provide warning if ffmpeg not found and video thumbnail is requested
Diffstat (limited to 'Zotlabs/Thumbs/Video.php')
-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);
}
}