From b3155f9622764b5f85c210985960ac4dda7d0213 Mon Sep 17 00:00:00 2001 From: Romain Biard Date: Wed, 11 Jan 2017 10:06:17 -0300 Subject: [PATCH] Creation of the method to add the filter --- src/FFMpeg/Filters/Frame/FrameFilters.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/FFMpeg/Filters/Frame/FrameFilters.php b/src/FFMpeg/Filters/Frame/FrameFilters.php index e4b9614..f599ba6 100644 --- a/src/FFMpeg/Filters/Frame/FrameFilters.php +++ b/src/FFMpeg/Filters/Frame/FrameFilters.php @@ -36,4 +36,19 @@ class FrameFilters return $this; } + + /** + * Fixes the display ratio of the output frame. + * + * In case the sample ratio and display ratio are different, image may be + * anamorphozed. This filter fixes this by specifying the output size. + * + * @return FrameFilters + */ + public function extractMultipleFrames($frameRate = ExtractMultipleFramesFilter::FRAMERATE_EVERY_2SEC, $destinationFolder = __DIR__) + { + $this->frame->addFilter(new ExtractMultipleFramesFilter($frameRate, $destinationFolder)); + + return $this; + } }