From e9f87eee94288b7aadd909b217925fb101cb3e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lavoie?= Date: Mon, 2 May 2016 13:24:08 -0400 Subject: [PATCH] Added documentation for the watermark filter (#221) Added documentation for the watermark filter --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 967ee3a..a8a0f12 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,35 @@ The resize filter takes three parameters : - `$mode`, one of the constants `FFMpeg\Filters\Video\ResizeFilter::RESIZEMODE_*` constants - `$useStandards`, a boolean to force the use of the nearest aspect ratio standard. +###### Watermark + +Watermark a video with a given image. + +```php +$video + ->filters() + ->watermark($watermarkPath, array( + 'position' => 'relative', + 'bottom' => 50, + 'right' => 50, + )); +``` + +The watermark filter takes two parameters: + +`$watermarkPath`, the path to your watermark file. +`$coordinates`, an array defining how you want your watermark positioned. You can use relative positioning as demonstrated above or absolute as such: + +```php +$video + ->filters() + ->watermark($watermarkPath, array( + 'position' => 'absolute', + 'x' => 1180, + 'y' => 620, + )); +``` + ###### Framerate Changes the frame rate of the video.