Scale thumbnails in ffmpeg to avoid excessive memory use on UHD videos
This commit is contained in:
parent
6a248a0a5c
commit
891c69d94d
1 changed files with 3 additions and 1 deletions
|
@ -335,7 +335,7 @@ class Media extends Extension
|
|||
$args = [
|
||||
escapeshellarg($ffmpeg),
|
||||
"-y", "-i", escapeshellarg($inname),
|
||||
"-vf", "thumbnail",
|
||||
"-vf", "scale=$scaled_size[0]:$scaled_size[1],thumbnail",
|
||||
"-f", "image2",
|
||||
"-vframes", "1",
|
||||
"-c:v", "png",
|
||||
|
@ -344,6 +344,8 @@ class Media extends Extension
|
|||
|
||||
$cmd = escapeshellcmd(implode(" ", $args));
|
||||
|
||||
log_debug('media', "Generating thumbnail with command `$cmd`...");
|
||||
|
||||
exec($cmd, $output, $ret);
|
||||
|
||||
if ((int)$ret === (int)0) {
|
||||
|
|
Reference in a new issue