From 2f380f5d591c10779e7ecd61ac698b84c1550df4 Mon Sep 17 00:00:00 2001 From: jgen Date: Fri, 18 Apr 2014 02:06:12 -0400 Subject: [PATCH] Video thumbs are working for webm files now. --- ext/handle_video/main.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ext/handle_video/main.php b/ext/handle_video/main.php index 122e9930..7766a30b 100644 --- a/ext/handle_video/main.php +++ b/ext/handle_video/main.php @@ -2,6 +2,7 @@ /* * Name: Handle Video * Author: velocity37 + * Modified By: Shish , jgen * License: GPLv2 * Description: Handle FLV, MP4, OGV and WEBM video files. * Documentation: @@ -44,8 +45,8 @@ class VideoFileHandler extends DataHandlerExtension { protected function create_thumb($hash) { global $config; - $w = $config->get_int("thumb_width"); - $h = $config->get_int("thumb_height"); + $w = (int)$config->get_int("thumb_width"); + $h = (int)$config->get_int("thumb_height"); // this is never used... //$q = $config->get_int("thumb_quality"); @@ -65,11 +66,9 @@ class VideoFileHandler extends DataHandlerExtension { $outname = escapeshellarg($outname); $cmd = "{$ffmpeg} -i {$inname} -s {$w}x{$h} -ss 00:00:00.0 -f image2 -vframes 1 {$outname}"; - exec($cmd, $output, $ret); log_debug('handle_video', "Generating thumbnail with command `$cmd`, returns $ret"); - break; } }