Support resize and watermark in ordering. (#343)
* Support multiple -vf commands Marge Filters into one command * Ordering Scale Using -vf to scale instead of -s to have ordering * Correct the ResizeFilterTest * Remove useless comments * Fixed filter bug Add checking on filters if only one process. * Fixed typo error
This commit is contained in:
parent
30d5250376
commit
4cfcabd7b5
3 changed files with 76 additions and 24 deletions
|
|
@ -98,8 +98,10 @@ class ResizeFilter implements VideoFilterInterface
|
|||
if (null !== $dimensions) {
|
||||
$dimensions = $this->getComputedDimensions($dimensions, $format->getModulus());
|
||||
|
||||
$commands[] = '-s';
|
||||
$commands[] = $dimensions->getWidth() . 'x' . $dimensions->getHeight();
|
||||
// Using Filter to have ordering
|
||||
$commands[] = '-vf';
|
||||
$commands[] = '[in]scale=' . $dimensions->getWidth() . ':' . $dimensions->getHeight() . ' [out]';
|
||||
|
||||
}
|
||||
|
||||
return $commands;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue