Merge branch 'master' of github.com:SimonSimCity/PHP-FFMpeg into SimonSimCity-master
* 'master' of github.com:SimonSimCity/PHP-FFMpeg: checkstyle by php-cs-fixer Added configuration for audio channels
This commit is contained in:
		
				commit
				
					
						c1993b6b92
					
				
			
		
					 10 changed files with 131 additions and 20 deletions
				
			
		|  | @ -122,6 +122,7 @@ $format->on('progress', function ($video, $format, $percentage) { | ||||||
| 
 | 
 | ||||||
| $format | $format | ||||||
|     -> setKiloBitrate(1000) |     -> setKiloBitrate(1000) | ||||||
|  |     -> setAudioChannels(2) | ||||||
|     -> setAudioKiloBitrate(256); |     -> setAudioKiloBitrate(256); | ||||||
| 
 | 
 | ||||||
| $video->save($format, 'video.avi'); | $video->save($format, 'video.avi'); | ||||||
|  | @ -246,6 +247,7 @@ $format->on('progress', function ($$audio, $format, $percentage) { | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| $format | $format | ||||||
|  |     -> setAudioChannels(2) | ||||||
|     -> setAudioKiloBitrate(256); |     -> setAudioKiloBitrate(256); | ||||||
| 
 | 
 | ||||||
| $audio->save($format, 'track.flac'); | $audio->save($format, 'track.flac'); | ||||||
|  |  | ||||||
|  | @ -27,6 +27,9 @@ abstract class DefaultAudio extends EventEmitter implements AudioInterface, Prog | ||||||
|     /** @var integer */ |     /** @var integer */ | ||||||
|     protected $audioKiloBitrate = 128; |     protected $audioKiloBitrate = 128; | ||||||
| 
 | 
 | ||||||
|  |     /** @var integer */ | ||||||
|  |     protected $audioChannels = null; | ||||||
|  | 
 | ||||||
|     /** |     /** | ||||||
|      * {@inheritdoc} |      * {@inheritdoc} | ||||||
|      */ |      */ | ||||||
|  | @ -90,6 +93,31 @@ abstract class DefaultAudio extends EventEmitter implements AudioInterface, Prog | ||||||
|         return $this; |         return $this; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  | 	 * {@inheritdoc} | ||||||
|  | 	 */ | ||||||
|  |     public function getAudioChannels() | ||||||
|  |     { | ||||||
|  |         return $this->audioChannels; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * Sets the channels value. | ||||||
|  |      * | ||||||
|  |      * @param  integer                  $channels | ||||||
|  |      * @throws InvalidArgumentException | ||||||
|  |      */ | ||||||
|  |     public function setAudioChannels($channels) | ||||||
|  |     { | ||||||
|  |         if ($channels < 1) { | ||||||
|  |             throw new InvalidArgumentException('Wrong channels value'); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         $this->audioChannels = (int) $channels; | ||||||
|  | 
 | ||||||
|  |         return $this; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     /** |     /** | ||||||
|      * {@inheritdoc} |      * {@inheritdoc} | ||||||
|      */ |      */ | ||||||
|  |  | ||||||
|  | @ -19,6 +19,13 @@ interface AudioInterface extends FormatInterface | ||||||
|      */ |      */ | ||||||
|     public function getAudioKiloBitrate(); |     public function getAudioKiloBitrate(); | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * Gets the audio channels value. | ||||||
|  |      * | ||||||
|  |      * @return integer | ||||||
|  |      */ | ||||||
|  |     public function getAudioChannels(); | ||||||
|  | 
 | ||||||
|     /** |     /** | ||||||
|      * Returns the audio codec. |      * Returns the audio codec. | ||||||
|      * |      * | ||||||
|  |  | ||||||
|  | @ -87,6 +87,10 @@ class Audio extends AbstractStreamableMedia | ||||||
|             $commands[] = '-b:a'; |             $commands[] = '-b:a'; | ||||||
|             $commands[] = $format->getAudioKiloBitrate() . 'k'; |             $commands[] = $format->getAudioKiloBitrate() . 'k'; | ||||||
|         } |         } | ||||||
|  |         if (null !== $format->getAudioChannels()) { | ||||||
|  |             $commands[] = '-ac'; | ||||||
|  |             $commands[] = $format->getAudioChannels(); | ||||||
|  |         } | ||||||
|         $commands[] = $outputPathfile; |         $commands[] = $outputPathfile; | ||||||
| 
 | 
 | ||||||
|         try { |         try { | ||||||
|  |  | ||||||
|  | @ -113,6 +113,10 @@ class Video extends Audio | ||||||
|                 $commands[] = '-b:a'; |                 $commands[] = '-b:a'; | ||||||
|                 $commands[] = $format->getAudioKiloBitrate() . 'k'; |                 $commands[] = $format->getAudioKiloBitrate() . 'k'; | ||||||
|             } |             } | ||||||
|  |             if (null !== $format->getAudioChannels()) { | ||||||
|  |                 $commands[] = '-ac'; | ||||||
|  |                 $commands[] = $format->getAudioChannels(); | ||||||
|  |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         $fs = FsManager::create(); |         $fs = FsManager::create(); | ||||||
|  |  | ||||||
|  | @ -3,11 +3,10 @@ | ||||||
| namespace FFMpeg\Tests; | namespace FFMpeg\Tests; | ||||||
| 
 | 
 | ||||||
| use FFMpeg\FFMpeg; | use FFMpeg\FFMpeg; | ||||||
| use FFMpeg\Tests\TestCase; |  | ||||||
| use FFMpeg\FFProbe\DataMapping\StreamCollection; | use FFMpeg\FFProbe\DataMapping\StreamCollection; | ||||||
| use FFMpeg\FFProbe\DataMapping\Stream; | use FFMpeg\FFProbe\DataMapping\Stream; | ||||||
| 
 | 
 | ||||||
| class FFMpegTest Extends TestCase | class FFMpegTest extends TestCase | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * @expectedException \FFMpeg\Exception\RuntimeException |      * @expectedException \FFMpeg\Exception\RuntimeException | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
| 
 | 
 | ||||||
| namespace FFMpeg\Tests; | namespace FFMpeg\Tests; | ||||||
| 
 | 
 | ||||||
| use FFMpeg\Tests\TestCase; |  | ||||||
| use FFMpeg\FFProbe; | use FFMpeg\FFProbe; | ||||||
| use Symfony\Component\Process\ExecutableFinder; | use Symfony\Component\Process\ExecutableFinder; | ||||||
| use Alchemy\BinaryDriver\ConfigurationInterface; | use Alchemy\BinaryDriver\ConfigurationInterface; | ||||||
|  |  | ||||||
|  | @ -71,6 +71,34 @@ abstract class AudioTestCase extends TestCase | ||||||
|         $this->getFormat()->setAudioKiloBitrate(-10); |         $this->getFormat()->setAudioKiloBitrate(-10); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     public function testGetAudioChannels() | ||||||
|  |     { | ||||||
|  |         $this->assertInternalType('null', $this->getFormat()->getAudioChannels()); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function testSetAudioChannels() | ||||||
|  |     { | ||||||
|  |         $format = $this->getFormat(); | ||||||
|  |         $format->setAudioChannels(2); | ||||||
|  |         $this->assertEquals(2, $format->getAudioChannels()); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @expectedException FFMpeg\Exception\InvalidArgumentException | ||||||
|  |      */ | ||||||
|  |     public function testSetInvalidChannels() | ||||||
|  |     { | ||||||
|  |         $this->getFormat()->setAudioChannels(0); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @expectedException FFMpeg\Exception\InvalidArgumentException | ||||||
|  |      */ | ||||||
|  |     public function testSetNegativeChannels() | ||||||
|  |     { | ||||||
|  |         $this->getFormat()->setAudioChannels(-10); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     public function testCreateProgressListener() |     public function testCreateProgressListener() | ||||||
|     { |     { | ||||||
|         $media = $this->getMock('FFMpeg\Media\MediaTypeInterface'); |         $media = $this->getMock('FFMpeg\Media\MediaTypeInterface'); | ||||||
|  |  | ||||||
|  | @ -187,6 +187,9 @@ class AudioTest extends AbstractStreamableTestCase | ||||||
|         $format->expects($this->any()) |         $format->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(663)); |             ->will($this->returnValue(663)); | ||||||
|  |         $format->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(5)); | ||||||
| 
 | 
 | ||||||
|         $audioFormat = $this->getMock('FFMpeg\Format\AudioInterface'); |         $audioFormat = $this->getMock('FFMpeg\Format\AudioInterface'); | ||||||
|         $audioFormat->expects($this->any()) |         $audioFormat->expects($this->any()) | ||||||
|  | @ -195,6 +198,9 @@ class AudioTest extends AbstractStreamableTestCase | ||||||
|         $audioFormat->expects($this->any()) |         $audioFormat->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(664)); |             ->will($this->returnValue(664)); | ||||||
|  |         $audioFormat->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(5)); | ||||||
|         $audioFormat->expects($this->any()) |         $audioFormat->expects($this->any()) | ||||||
|             ->method('getAudioCodec') |             ->method('getAudioCodec') | ||||||
|             ->will($this->returnValue('patati-patata-audio')); |             ->will($this->returnValue('patati-patata-audio')); | ||||||
|  | @ -206,6 +212,9 @@ class AudioTest extends AbstractStreamableTestCase | ||||||
|         $formatExtra->expects($this->any()) |         $formatExtra->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(665)); |             ->will($this->returnValue(665)); | ||||||
|  |         $formatExtra->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(5)); | ||||||
| 
 | 
 | ||||||
|         $listeners = array($this->getMock('Alchemy\BinaryDriver\Listeners\ListenerInterface')); |         $listeners = array($this->getMock('Alchemy\BinaryDriver\Listeners\ListenerInterface')); | ||||||
| 
 | 
 | ||||||
|  | @ -220,29 +229,36 @@ class AudioTest extends AbstractStreamableTestCase | ||||||
|         $progressableFormat->expects($this->any()) |         $progressableFormat->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(666)); |             ->will($this->returnValue(666)); | ||||||
|  |         $progressableFormat->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(5)); | ||||||
| 
 | 
 | ||||||
|         return array( |         return array( | ||||||
|             array(false, array( |             array(false, array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     '-b:a', '663k', |                     '-b:a', '663k', | ||||||
|  |                     '-ac', '5', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), null, $format), |                 ), null, $format), | ||||||
|             array(false, array( |             array(false, array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     '-acodec', 'patati-patata-audio', |                     '-acodec', 'patati-patata-audio', | ||||||
|                     '-b:a', '664k', |                     '-b:a', '664k', | ||||||
|  |                     '-ac', '5', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), null, $audioFormat), |                 ), null, $audioFormat), | ||||||
|             array(false, array( |             array(false, array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     'extra', 'param', |                     'extra', 'param', | ||||||
|                     '-b:a', '665k', |                     '-b:a', '665k', | ||||||
|  |                     '-ac', '5', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), null, $formatExtra), |                 ), null, $formatExtra), | ||||||
|             array(true, array( |             array(true, array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     '-threads', 24, |                     '-threads', 24, | ||||||
|                     '-b:a', '663k', |                     '-b:a', '663k', | ||||||
|  |                     '-ac', '5', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), null, $format), |                 ), null, $format), | ||||||
|             array(true, array( |             array(true, array( | ||||||
|  | @ -250,17 +266,20 @@ class AudioTest extends AbstractStreamableTestCase | ||||||
|                     'extra', 'param', |                     'extra', 'param', | ||||||
|                     '-threads', 24, |                     '-threads', 24, | ||||||
|                     '-b:a', '665k', |                     '-b:a', '665k', | ||||||
|  |                     '-ac', '5', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), null, $formatExtra), |                 ), null, $formatExtra), | ||||||
|             array(false, array( |             array(false, array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     '-b:a', '666k', |                     '-b:a', '666k', | ||||||
|  |                     '-ac', '5', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), $listeners, $progressableFormat), |                 ), $listeners, $progressableFormat), | ||||||
|             array(true, array( |             array(true, array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     '-threads', 24, |                     '-threads', 24, | ||||||
|                     '-b:a', '666k', |                     '-b:a', '666k', | ||||||
|  |                     '-ac', '5', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), $listeners, $progressableFormat), |                 ), $listeners, $progressableFormat), | ||||||
|         ); |         ); | ||||||
|  |  | ||||||
|  | @ -243,6 +243,9 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|         $format->expects($this->any()) |         $format->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(92)); |             ->will($this->returnValue(92)); | ||||||
|  |         $format->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(2)); | ||||||
|         $format->expects($this->any()) |         $format->expects($this->any()) | ||||||
|             ->method('getPasses') |             ->method('getPasses') | ||||||
|             ->will($this->returnValue(2)); |             ->will($this->returnValue(2)); | ||||||
|  | @ -257,6 +260,9 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|         $audioFormat->expects($this->any()) |         $audioFormat->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(92)); |             ->will($this->returnValue(92)); | ||||||
|  |         $audioFormat->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(2)); | ||||||
|         $audioFormat->expects($this->any()) |         $audioFormat->expects($this->any()) | ||||||
|             ->method('getPasses') |             ->method('getPasses') | ||||||
|             ->will($this->returnValue(1)); |             ->will($this->returnValue(1)); | ||||||
|  | @ -277,6 +283,9 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|         $audioVideoFormat->expects($this->any()) |         $audioVideoFormat->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(92)); |             ->will($this->returnValue(92)); | ||||||
|  |         $audioVideoFormat->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(2)); | ||||||
|         $audioVideoFormat->expects($this->any()) |         $audioVideoFormat->expects($this->any()) | ||||||
|             ->method('getPasses') |             ->method('getPasses') | ||||||
|             ->will($this->returnValue(2)); |             ->will($this->returnValue(2)); | ||||||
|  | @ -297,6 +306,9 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|         $audioVideoFormatSinglePass->expects($this->any()) |         $audioVideoFormatSinglePass->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(92)); |             ->will($this->returnValue(92)); | ||||||
|  |         $audioVideoFormatSinglePass->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(2)); | ||||||
|         $audioVideoFormatSinglePass->expects($this->any()) |         $audioVideoFormatSinglePass->expects($this->any()) | ||||||
|             ->method('getPasses') |             ->method('getPasses') | ||||||
|             ->will($this->returnValue(1)); |             ->will($this->returnValue(1)); | ||||||
|  | @ -311,6 +323,9 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|         $formatExtra->expects($this->any()) |         $formatExtra->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(92)); |             ->will($this->returnValue(92)); | ||||||
|  |         $formatExtra->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(2)); | ||||||
|         $formatExtra->expects($this->any()) |         $formatExtra->expects($this->any()) | ||||||
|             ->method('getPasses') |             ->method('getPasses') | ||||||
|             ->will($this->returnValue(2)); |             ->will($this->returnValue(2)); | ||||||
|  | @ -331,6 +346,9 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|         $progressableFormat->expects($this->any()) |         $progressableFormat->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(92)); |             ->will($this->returnValue(92)); | ||||||
|  |         $progressableFormat->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(2)); | ||||||
|         $progressableFormat->expects($this->any()) |         $progressableFormat->expects($this->any()) | ||||||
|             ->method('getPasses') |             ->method('getPasses') | ||||||
|             ->will($this->returnValue(2)); |             ->will($this->returnValue(2)); | ||||||
|  | @ -349,6 +367,9 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|         $progressableAudioFormat->expects($this->any()) |         $progressableAudioFormat->expects($this->any()) | ||||||
|             ->method('getAudioKiloBitrate') |             ->method('getAudioKiloBitrate') | ||||||
|             ->will($this->returnValue(92)); |             ->will($this->returnValue(92)); | ||||||
|  |         $progressableAudioFormat->expects($this->any()) | ||||||
|  |             ->method('getAudioChannels') | ||||||
|  |             ->will($this->returnValue(2)); | ||||||
|         $progressableAudioFormat->expects($this->any()) |         $progressableAudioFormat->expects($this->any()) | ||||||
|             ->method('getPasses') |             ->method('getPasses') | ||||||
|             ->will($this->returnValue(1)); |             ->will($this->returnValue(1)); | ||||||
|  | @ -358,14 +379,14 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|                     '-y', '-i', __FILE__, '-b:v', '663k', |                     '-y', '-i', __FILE__, '-b:v', '663k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '1', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '1', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), array( |                 ), array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     '-b:v', '663k', |                     '-b:v', '663k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '2', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '2', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 )), null, $format), |                 )), null, $format), | ||||||
|             array(false, array(array( |             array(false, array(array( | ||||||
|  | @ -374,7 +395,7 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|                     '-acodec', 'patati-patata-audio', '-b:v', '664k', |                     '-acodec', 'patati-patata-audio', '-b:v', '664k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '1', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '1', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), array( |                 ), array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|  | @ -383,7 +404,7 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|                     '-b:v', '664k', |                     '-b:v', '664k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '2', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '2', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 )), null, $audioVideoFormat), |                 )), null, $audioVideoFormat), | ||||||
|             array(false, array(array( |             array(false, array(array( | ||||||
|  | @ -392,7 +413,7 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|                     '-acodec', 'patati-patata-audio', '-b:v', '664k', |                     '-acodec', 'patati-patata-audio', '-b:v', '664k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 )), null, $audioVideoFormatSinglePass), |                 )), null, $audioVideoFormatSinglePass), | ||||||
|             array(false, array(array( |             array(false, array(array( | ||||||
|  | @ -400,14 +421,14 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|                     'extra', 'param','-b:v', '665k', |                     'extra', 'param','-b:v', '665k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '1', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '1', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), array( |                 ), array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     'extra', 'param', '-b:v', '665k', |                     'extra', 'param', '-b:v', '665k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '2', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '2', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 )), null, $formatExtra), |                 )), null, $formatExtra), | ||||||
|             array(true, array(array( |             array(true, array(array( | ||||||
|  | @ -415,7 +436,7 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|                     '-threads', 24, '-b:v', '663k', |                     '-threads', 24, '-b:v', '663k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '1', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '1', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), array( |                 ), array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|  | @ -423,7 +444,7 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|                     '-b:v', '663k', |                     '-b:v', '663k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '2', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '2', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 )), null, $format), |                 )), null, $format), | ||||||
|             array(true, array(array( |             array(true, array(array( | ||||||
|  | @ -431,28 +452,28 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|                     'extra', 'param', '-threads', 24, '-b:v', '665k', |                     'extra', 'param', '-threads', 24, '-b:v', '665k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '1', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '1', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), array( |                 ), array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     'extra', 'param', '-threads', 24, '-b:v', '665k', |                     'extra', 'param', '-threads', 24, '-b:v', '665k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '2', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '2', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 )), null, $formatExtra), |                 )), null, $formatExtra), | ||||||
|             array(false, array(array( |             array(false, array(array( | ||||||
|                     '-y', '-i', __FILE__, '-b:v', '666k', |                     '-y', '-i', __FILE__, '-b:v', '666k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '1', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '1', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), array( |                 ), array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     '-b:v', '666k', |                     '-b:v', '666k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '2', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '2', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 )), $listeners, $progressableFormat), |                 )), $listeners, $progressableFormat), | ||||||
|             array(true, array(array( |             array(true, array(array( | ||||||
|  | @ -460,7 +481,7 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|                     '-threads', 24, '-b:v', '666k', |                     '-threads', 24, '-b:v', '666k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '1', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '1', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 ), array( |                 ), array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|  | @ -468,19 +489,19 @@ class VideoTest extends AbstractStreamableTestCase | ||||||
|                     '-b:v', '666k', |                     '-b:v', '666k', | ||||||
|                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', |                     '-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop', | ||||||
|                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', |                     '-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6', | ||||||
|                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-pass', '2', '-passlogfile', |                     '-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '2', '-passlogfile', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 )), $listeners, $progressableFormat), |                 )), $listeners, $progressableFormat), | ||||||
|             array(true, array(array( |             array(true, array(array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     '-threads', 24, '-acodec', 'patati-patata-audio', |                     '-threads', 24, '-acodec', 'patati-patata-audio', | ||||||
|                     '-b:a', '92k', |                     '-b:a', '92k', '-ac', '2', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 )), null, $audioFormat), |                 )), null, $audioFormat), | ||||||
|             array(true, array(array( |             array(true, array(array( | ||||||
|                     '-y', '-i', __FILE__, |                     '-y', '-i', __FILE__, | ||||||
|                     '-threads', 24, '-acodec', 'patati-patata-audio', |                     '-threads', 24, '-acodec', 'patati-patata-audio', | ||||||
|                     '-b:a', '92k', |                     '-b:a', '92k', '-ac', '2', | ||||||
|                     '/target/file', |                     '/target/file', | ||||||
|                 )), $listeners, $progressableAudioFormat), |                 )), $listeners, $progressableAudioFormat), | ||||||
|         ); |         ); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue