From b1778f0764f2066a70dfeeeda54d60c7a21d9153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Can=20Geli=C5=9F?= Date: Sun, 16 Nov 2014 21:28:05 +0200 Subject: [PATCH] update stream parameters --- src/FFMpeg/Filters/Video/CropFilter.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/FFMpeg/Filters/Video/CropFilter.php b/src/FFMpeg/Filters/Video/CropFilter.php index 70e3067..06b2b9c 100644 --- a/src/FFMpeg/Filters/Video/CropFilter.php +++ b/src/FFMpeg/Filters/Video/CropFilter.php @@ -44,6 +44,13 @@ class CropFilter implements VideoFilterInterface */ public function apply(Video $video, VideoInterface $format) { + foreach ($video->getStreams()->videos() as $stream) { + if ($stream->has('width') && $stream->has('height')) { + $stream->set('width', $this->dimension->getWidth()); + $stream->set('height', $this->dimension->getHeight()); + } + } + return array( '-filter:v', 'crop=' .