Merge branch 'master' into addAudioMetadata

This commit is contained in:
Romain Biard 2017-01-13 12:12:26 -03:00 committed by GitHub
commit 31629f7162
6 changed files with 155 additions and 1 deletions

View file

@ -217,12 +217,28 @@ Resizes a video to a given size.
$video->filters()->resize($dimension, $mode, $useStandards);
```
The resize filter takes three parameters :
The resize filter takes three parameters:
- `$dimension`, an instance of `FFMpeg\Coordinate\Dimension`
- `$mode`, one of the constants `FFMpeg\Filters\Video\ResizeFilter::RESIZEMODE_*` constants
- `$useStandards`, a boolean to force the use of the nearest aspect ratio standard.
If you want a video in a non-standard ratio, you can use the padding filter to resize your video in the desired size, and wrap it into black bars.
```php
$video->filters()->pad($dimension);
```
The pad filter takes one parameter:
- `$dimension`, an instance of `FFMpeg\Coordinate\Dimension`
Don't forget to save it afterwards.
```php
$video->save(new FFMpeg\Format\Video\X264(), $new_file);
```
###### Watermark
Watermark a video with a given image.