From 52d32ec70b9671558fd600c8264e7398683a024a Mon Sep 17 00:00:00 2001 From: Romain Biard Date: Wed, 21 Dec 2016 10:30:52 -0300 Subject: [PATCH] Update of the README --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f7cc1f..94196dc 100644 --- a/README.md +++ b/README.md @@ -221,12 +221,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.