From 7ce571119a192f797d1a0c4071f4391455160258 Mon Sep 17 00:00:00 2001 From: Romain Biard Date: Wed, 16 Nov 2016 12:55:48 -0300 Subject: [PATCH] The waveform filter can only be applied to audio files --- src/FFMpeg/Media/Audio.php | 12 ++++++++++++ src/FFMpeg/Media/Video.php | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/FFMpeg/Media/Audio.php b/src/FFMpeg/Media/Audio.php index 25c8961..19f3478 100644 --- a/src/FFMpeg/Media/Audio.php +++ b/src/FFMpeg/Media/Audio.php @@ -102,4 +102,16 @@ class Audio extends AbstractStreamableMedia return $this; } + + /** + * Gets the waveform of the video. + * + * @param integer $width + * @param integer $height + * @return Waveform + */ + public function waveform($width = 640, $height = 120) + { + return new Waveform($this, $this->driver, $this->ffprobe, $width, $height); + } } diff --git a/src/FFMpeg/Media/Video.php b/src/FFMpeg/Media/Video.php index d6852a2..9200f49 100644 --- a/src/FFMpeg/Media/Video.php +++ b/src/FFMpeg/Media/Video.php @@ -181,16 +181,4 @@ class Video extends Audio { return new Frame($this, $this->driver, $this->ffprobe, $at); } - - /** - * Gets the waveform of the video. - * - * @param integer $width - * @param integer $height - * @return Waveform - */ - public function waveform($width = 640, $height = 120) - { - return new Waveform($this, $this->driver, $this->ffprobe, $width, $height); - } }