Creation of a waveform method in FFMpeg\Media\Video

This commit is contained in:
Romain Biard 2016-11-16 12:29:56 -03:00
commit 9f970c5d5a
4 changed files with 16 additions and 6 deletions

View file

@ -3,7 +3,7 @@
/*
* This file is part of PHP-FFmpeg.
*
* (c) Alchemy <dev.team@alchemy.fr>
* (c) Strime <contact@strime.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View file

@ -3,7 +3,7 @@
/*
* This file is part of PHP-FFmpeg.
*
* (c) Alchemy <dev.team@alchemy.fr>
* (c) Strime <contact@strime.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@ -23,16 +23,16 @@ class WaveformFilters
}
/**
* Fixes the display ratio of the output frame.
* Fixes the display ratio of the output waveform.
*
* 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
* @return WaveformFilters
*/
public function fixDisplayRatio()
{
$this->frame->addFilter(new DisplayRatioFixerFilter());
$this->waveform->addFilter(new DisplayRatioFixerFilter());
return $this;
}

View file

@ -3,7 +3,7 @@
/*
* This file is part of PHP-FFmpeg.
*
* (c) Alchemy <dev.team@alchemy.fr>
* (c) Strime <contact@strime.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View file

@ -181,4 +181,14 @@ class Video extends Audio
{
return new Frame($this, $this->driver, $this->ffprobe, $at);
}
/**
* Gets the waveform of the video.
*
* @return Waveform
*/
public function waveform()
{
return new Waveform($this, $this->driver, $this->ffprobe);
}
}