Merge pull request #553 from HungryFeline/patch-2
Set ffmpeg's "overwrite output files" switch (-y)
This commit is contained in:
commit
1b53ecceb7
@ -85,12 +85,12 @@ class VideoFileHandler extends DataHandlerExtension {
|
|||||||
|
|
||||||
if ($config->get_bool("video_thumb_ignore_aspect_ratio") == true)
|
if ($config->get_bool("video_thumb_ignore_aspect_ratio") == true)
|
||||||
{
|
{
|
||||||
$cmd = escapeshellcmd("{$ffmpeg} -i {$inname} -ss 00:00:00.0 -f image2 -vframes 1 {$outname}");
|
$cmd = escapeshellcmd("{$ffmpeg} -y -i {$inname} -ss 00:00:00.0 -f image2 -vframes 1 {$outname}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$scale = 'scale="' . escapeshellarg("if(gt(a,{$w}/{$h}),{$w},-1)") . ':' . escapeshellarg("if(gt(a,{$w}/{$h}),-1,{$h})") . '"';
|
$scale = 'scale="' . escapeshellarg("if(gt(a,{$w}/{$h}),{$w},-1)") . ':' . escapeshellarg("if(gt(a,{$w}/{$h}),-1,{$h})") . '"';
|
||||||
$cmd = "{$ffmpeg} -i {$inname} -vf {$scale} -ss 00:00:00.0 -f image2 -vframes 1 {$outname}";
|
$cmd = "{$ffmpeg} -y -i {$inname} -vf {$scale} -ss 00:00:00.0 -f image2 -vframes 1 {$outname}";
|
||||||
}
|
}
|
||||||
|
|
||||||
exec($cmd, $output, $returnValue);
|
exec($cmd, $output, $returnValue);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user