Video thumbs are working for webm files now.
This commit is contained in:
parent
273d386d22
commit
2f380f5d59
@ -2,6 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* Name: Handle Video
|
* Name: Handle Video
|
||||||
* Author: velocity37 <velocity37@gmail.com>
|
* Author: velocity37 <velocity37@gmail.com>
|
||||||
|
* Modified By: Shish <webmaster@shishnet.org>, jgen <jeffgenovy@gmail.com>
|
||||||
* License: GPLv2
|
* License: GPLv2
|
||||||
* Description: Handle FLV, MP4, OGV and WEBM video files.
|
* Description: Handle FLV, MP4, OGV and WEBM video files.
|
||||||
* Documentation:
|
* Documentation:
|
||||||
@ -44,8 +45,8 @@ class VideoFileHandler extends DataHandlerExtension {
|
|||||||
protected function create_thumb($hash) {
|
protected function create_thumb($hash) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$w = $config->get_int("thumb_width");
|
$w = (int)$config->get_int("thumb_width");
|
||||||
$h = $config->get_int("thumb_height");
|
$h = (int)$config->get_int("thumb_height");
|
||||||
// this is never used...
|
// this is never used...
|
||||||
//$q = $config->get_int("thumb_quality");
|
//$q = $config->get_int("thumb_quality");
|
||||||
|
|
||||||
@ -65,11 +66,9 @@ class VideoFileHandler extends DataHandlerExtension {
|
|||||||
$outname = escapeshellarg($outname);
|
$outname = escapeshellarg($outname);
|
||||||
|
|
||||||
$cmd = "{$ffmpeg} -i {$inname} -s {$w}x{$h} -ss 00:00:00.0 -f image2 -vframes 1 {$outname}";
|
$cmd = "{$ffmpeg} -i {$inname} -s {$w}x{$h} -ss 00:00:00.0 -f image2 -vframes 1 {$outname}";
|
||||||
|
|
||||||
exec($cmd, $output, $ret);
|
exec($cmd, $output, $ret);
|
||||||
|
|
||||||
log_debug('handle_video', "Generating thumbnail with command `$cmd`, returns $ret");
|
log_debug('handle_video', "Generating thumbnail with command `$cmd`, returns $ret");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user