From 23bffdfd5fbf75cba0eb39d412ce7b1f2dd9d758 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 7 Feb 2013 12:40:11 +0100 Subject: [PATCH] Enhance options for better output --- src/FFMpeg/FFMpeg.php | 19 +++++++++++-------- tests/src/FFMpeg/FFMpegTest.php | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/FFMpeg/FFMpeg.php b/src/FFMpeg/FFMpeg.php index 0e9159d..df5ac9a 100644 --- a/src/FFMpeg/FFMpeg.php +++ b/src/FFMpeg/FFMpeg.php @@ -361,16 +361,19 @@ class FFMpeg extends Binary $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('-refs')->add('6')->add('-coder')->add('1')->add('-qmin') - ->add('10')->add('-qmax')->add('51') - ->add('-sc_threshold')->add('40')->add('-flags')->add('+loop') - ->add('-me_range')->add('16')->add('-subq')->add('7') - ->add('-i_qfactor')->add('0.71')->add('-qcomp')->add('0.6') + ->add('-refs')->add('6') + ->add('-coder')->add('1') + ->add('-sc_threshold')->add('40') + ->add('-flags')->add('+loop') + ->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('-trellis')->add('1')->add('-qscale')->add('1') - ->add('-ab')->add('92k'); + ->add('-trellis')->add('1') + ->add('-b:a')->add('92k'); if ($format instanceof AudioTranscodable) { $builder->add('-acodec')->add($format->getAudioCodec()); diff --git a/tests/src/FFMpeg/FFMpegTest.php b/tests/src/FFMpeg/FFMpegTest.php index 477f773..1597e5f 100644 --- a/tests/src/FFMpeg/FFMpegTest.php +++ b/tests/src/FFMpeg/FFMpegTest.php @@ -203,7 +203,7 @@ class FFMpegTest extends \PHPUnit_Framework_TestCase $format = new Format\Video\X264(); $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->probe->probeFormat($dest);