Support for Wav and Aac audio encoding
This commit is contained in:
parent
62763adae5
commit
5211e58dc9
4 changed files with 88 additions and 0 deletions
31
src/FFMpeg/Format/Audio/Aac.php
Normal file
31
src/FFMpeg/Format/Audio/Aac.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of PHP-FFmpeg.
|
||||
*
|
||||
* (c) Alchemy <info@alchemy.fr>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace FFMpeg\Format\Audio;
|
||||
|
||||
/**
|
||||
* The AAC audio format
|
||||
*/
|
||||
class Aac extends DefaultAudio
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->audioCodec = 'libfdk_aac';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getAvailableAudioCodecs()
|
||||
{
|
||||
return array('libfdk_aac');
|
||||
}
|
||||
}
|
||||
31
src/FFMpeg/Format/Audio/Wav.php
Normal file
31
src/FFMpeg/Format/Audio/Wav.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of PHP-FFmpeg.
|
||||
*
|
||||
* (c) Alchemy <info@alchemy.fr>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace FFMpeg\Format\Audio;
|
||||
|
||||
/**
|
||||
* The WAV audio format
|
||||
*/
|
||||
class Wav extends DefaultAudio
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->audioCodec = 'pcm_s16le';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getAvailableAudioCodecs()
|
||||
{
|
||||
return array('pcm_s16le');
|
||||
}
|
||||
}
|
||||
13
tests/FFMpeg/Tests/Format/Audio/AacTest.php
Normal file
13
tests/FFMpeg/Tests/Format/Audio/AacTest.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace FFMpeg\Tests\Format\Audio;
|
||||
|
||||
use FFMpeg\Format\Audio\Aac;
|
||||
|
||||
class AacTest extends AudioTestCase
|
||||
{
|
||||
public function getFormat()
|
||||
{
|
||||
return new Aac();
|
||||
}
|
||||
}
|
||||
13
tests/FFMpeg/Tests/Format/Audio/WavTest.php
Normal file
13
tests/FFMpeg/Tests/Format/Audio/WavTest.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace FFMpeg\Tests\Format\Audio;
|
||||
|
||||
use FFMpeg\Format\Audio\Wav;
|
||||
|
||||
class WavTest extends AudioTestCase
|
||||
{
|
||||
public function getFormat()
|
||||
{
|
||||
return new Wav();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue