Add audio formats MP3 and Flac
This commit is contained in:
		
					parent
					
						
							
								94775176c9
							
						
					
				
			
			
				commit
				
					
						5b53381904
					
				
			
		
					 9 changed files with 123 additions and 5 deletions
				
			
		|  | @ -71,6 +71,7 @@ class FFMpegTest extends \PHPUnit_Framework_TestCase | |||
|         $this->object->encode(new Format\Video\WebM(32, 32), './invalid.file'); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * @covers FFMpeg\FFMpeg::encode | ||||
|      * @expectedException \RuntimeException | ||||
|  | @ -87,6 +88,39 @@ class FFMpegTest extends \PHPUnit_Framework_TestCase | |||
| 
 | ||||
|     /** | ||||
|      * @covers FFMpeg\FFMpeg::encode | ||||
|      * @covers FFMpeg\FFMpeg::encodeAudio | ||||
|      */ | ||||
|     public function testEncodeMp3() | ||||
|     { | ||||
|         $dest = __DIR__ . '/../../files/encode_test.mp3'; | ||||
| 
 | ||||
|         $this->object->open(__DIR__ . '/../../files/Audio.mp3'); | ||||
|         $this->object->encode(new Format\Audio\Mp3(), $dest); | ||||
| 
 | ||||
|         $this->probe->probeFormat($dest); | ||||
| 
 | ||||
|         unlink($dest); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * @covers FFMpeg\FFMpeg::encode | ||||
|      * @covers FFMpeg\FFMpeg::encodeAudio | ||||
|      */ | ||||
|     public function testEncodeFlac() | ||||
|     { | ||||
|         $dest = __DIR__ . '/../../files/encode_test.flac'; | ||||
| 
 | ||||
|         $this->object->open(__DIR__ . '/../../files/Audio.mp3'); | ||||
|         $this->object->encode(new Format\Audio\Flac(), $dest); | ||||
| 
 | ||||
|         $this->probe->probeFormat($dest); | ||||
| 
 | ||||
|         unlink($dest); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * @covers FFMpeg\FFMpeg::encode | ||||
|      * @covers FFMpeg\FFMpeg::encodeVideo | ||||
|      */ | ||||
|     public function testEncodeWebm() | ||||
|     { | ||||
|  | @ -102,6 +136,7 @@ class FFMpegTest extends \PHPUnit_Framework_TestCase | |||
| 
 | ||||
|     /** | ||||
|      * @covers FFMpeg\FFMpeg::encode | ||||
|      * @covers FFMpeg\FFMpeg::encodeVideo | ||||
|      */ | ||||
|     public function testEncodeOgg() | ||||
|     { | ||||
|  | @ -117,6 +152,7 @@ class FFMpegTest extends \PHPUnit_Framework_TestCase | |||
| 
 | ||||
|     /** | ||||
|      * @covers FFMpeg\FFMpeg::encode | ||||
|      * @covers FFMpeg\FFMpeg::encodeVideo | ||||
|      */ | ||||
|     public function testEncodeX264() | ||||
|     { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue