Enhance options for better output

This commit is contained in:
Romain Neutron 2013-02-07 12:40:11 +01:00
commit 23bffdfd5f
2 changed files with 12 additions and 9 deletions

View file

@ -361,16 +361,19 @@ class FFMpeg extends Binary
$builder->add('-vcodec')->add($format->getVideoCodec()); $builder->add('-vcodec')->add($format->getVideoCodec());
} }
$builder->add('-b')->add($format->getKiloBitrate() . 'k') $builder->add('-b:v')->add($format->getKiloBitrate() . 'k')
->add('-threads')->add($this->threads) ->add('-threads')->add($this->threads)
->add('-refs')->add('6')->add('-coder')->add('1')->add('-qmin') ->add('-refs')->add('6')
->add('10')->add('-qmax')->add('51') ->add('-coder')->add('1')
->add('-sc_threshold')->add('40')->add('-flags')->add('+loop') ->add('-sc_threshold')->add('40')
->add('-me_range')->add('16')->add('-subq')->add('7') ->add('-flags')->add('+loop')
->add('-i_qfactor')->add('0.71')->add('-qcomp')->add('0.6') ->add('-me_range')->add('16')
->add('-subq')->add('7')
->add('-i_qfactor')->add('0.71')
->add('-qcomp')->add('0.6')
->add('-qdiff')->add('4') ->add('-qdiff')->add('4')
->add('-trellis')->add('1')->add('-qscale')->add('1') ->add('-trellis')->add('1')
->add('-ab')->add('92k'); ->add('-b:a')->add('92k');
if ($format instanceof AudioTranscodable) { if ($format instanceof AudioTranscodable) {
$builder->add('-acodec')->add($format->getAudioCodec()); $builder->add('-acodec')->add($format->getAudioCodec());

View file

@ -203,7 +203,7 @@ class FFMpegTest extends \PHPUnit_Framework_TestCase
$format = new Format\Video\X264(); $format = new Format\Video\X264();
$format-> setDimensions(32, 32); $format-> setDimensions(32, 32);
$this->object->open(__DIR__ . '/../../files/Test.ogv'); $this->object->open(__DIR__ . '/../../files/EmpireStateofMind-Jay-Z.mov');
$this->object->encode($format, $dest); $this->object->encode($format, $dest);
$this->probe->probeFormat($dest); $this->probe->probeFormat($dest);