diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cabf96..512d779 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ CHANGELOG * 0.4.0 (xx-xx-xxxx) +* 0.3.5 (xx-xx-2013) + + * Add vorbis audio format (@jacobbudin). + * 0.3.4 (05-09-2013) * Fix Invalid ratio computing. diff --git a/README.md b/README.md index 6ace127..9ef5e31 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,14 @@ An Object Oriented library to convert video/audio files with FFmpeg / AVConv. Check another amazing repo : [PHP FFMpeg extras](https://github.com/alchemy-fr/PHP-FFMpeg-Extras), you will find lots of Audio/Video formats there. +## Your attention please + +This library requires a working FFMpeg install. You will need both FFMpeg and FFProbe binaries to use it. +Be sure that these binaries can be located with system PATH to get the benefit of the binary detection, +otherwise you should have to explicitely give the binaries path on load. + +For Windows users : Please find the binaries at http://ffmpeg.zeranoe.com/builds/. + ## Installation The recommended way to install PHP-FFMpeg is through [Composer](https://getcomposer.org). diff --git a/src/FFMpeg/Format/Audio/Vorbis.php b/src/FFMpeg/Format/Audio/Vorbis.php new file mode 100644 index 0000000..fd241fd --- /dev/null +++ b/src/FFMpeg/Format/Audio/Vorbis.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace FFMpeg\Format\Audio; + +/** + * The Vorbis audio format + */ +class Vorbis extends DefaultAudio +{ + public function __construct() + { + $this->audioCodec = 'vorbis'; + } + + /** + * {@inheritdoc} + */ + public function getExtraParams() + { + return array('-strict', '-2'); + } + + /** + * {@inheritDoc} + */ + public function getAvailableAudioCodecs() + { + return array('vorbis'); + } +} diff --git a/tests/FFMpeg/Tests/Format/Audio/VorbisTest.php b/tests/FFMpeg/Tests/Format/Audio/VorbisTest.php new file mode 100644 index 0000000..7aba0b7 --- /dev/null +++ b/tests/FFMpeg/Tests/Format/Audio/VorbisTest.php @@ -0,0 +1,13 @@ +