Merge branch 'master' into patch-1
This commit is contained in:
commit
928a908d16
10 changed files with 272 additions and 109 deletions
|
|
@ -98,8 +98,10 @@ class ResizeFilter implements VideoFilterInterface
|
||||||
if (null !== $dimensions) {
|
if (null !== $dimensions) {
|
||||||
$dimensions = $this->getComputedDimensions($dimensions, $format->getModulus());
|
$dimensions = $this->getComputedDimensions($dimensions, $format->getModulus());
|
||||||
|
|
||||||
$commands[] = '-s';
|
// Using Filter to have ordering
|
||||||
$commands[] = $dimensions->getWidth() . 'x' . $dimensions->getHeight();
|
$commands[] = '-vf';
|
||||||
|
$commands[] = '[in]scale=' . $dimensions->getWidth() . ':' . $dimensions->getHeight() . ' [out]';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $commands;
|
return $commands;
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,31 @@ abstract class DefaultAudio extends EventEmitter implements AudioInterface, Prog
|
||||||
return $this->audioCodec;
|
return $this->audioCodec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getAdditionalParameters()
|
||||||
|
{
|
||||||
|
return $this->additionalParameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets additional parameters.
|
||||||
|
*
|
||||||
|
* @param array $additionalParameters
|
||||||
|
* @throws InvalidArgumentException
|
||||||
|
*/
|
||||||
|
public function setAdditionalParameters($additionalParameters)
|
||||||
|
{
|
||||||
|
if (!is_array($additionalParameters)) {
|
||||||
|
throw new InvalidArgumentException('Wrong additionalParamaters value');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->additionalParameters = $additionalParameters;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the audio codec, Should be in the available ones, otherwise an
|
* Sets the audio codec, Should be in the available ones, otherwise an
|
||||||
* exception is thrown.
|
* exception is thrown.
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,13 @@ interface AudioInterface extends FormatInterface
|
||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function getAudioChannels();
|
public function getAudioChannels();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the list of available video codecs for this format.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getAdditionalParameters();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the audio codec.
|
* Returns the audio codec.
|
||||||
|
|
|
||||||
22
src/FFMpeg/Format/Profile.php
Normal file
22
src/FFMpeg/Format/Profile.php
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?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;
|
||||||
|
|
||||||
|
interface Profile {
|
||||||
|
|
||||||
|
const HIGH = 'high';
|
||||||
|
|
||||||
|
const MAIN = 'main';
|
||||||
|
|
||||||
|
const BASELINE = 'baseline';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ use FFMpeg\Exception\InvalidArgumentException;
|
||||||
use FFMpeg\Format\Audio\DefaultAudio;
|
use FFMpeg\Format\Audio\DefaultAudio;
|
||||||
use FFMpeg\Format\VideoInterface;
|
use FFMpeg\Format\VideoInterface;
|
||||||
use FFMpeg\Media\MediaTypeInterface;
|
use FFMpeg\Media\MediaTypeInterface;
|
||||||
|
use FFMpeg\Format\Profile;
|
||||||
use FFMpeg\Format\ProgressListener\VideoProgressListener;
|
use FFMpeg\Format\ProgressListener\VideoProgressListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -32,8 +33,56 @@ abstract class DefaultVideo extends DefaultAudio implements VideoInterface
|
||||||
/** @var Integer */
|
/** @var Integer */
|
||||||
protected $modulus = 16;
|
protected $modulus = 16;
|
||||||
|
|
||||||
/** @var Array */
|
/** @var string */
|
||||||
protected $additionalParamaters;
|
private $profile = Profile::MAIN;
|
||||||
|
|
||||||
|
/** @var float */
|
||||||
|
private $level = 3.1;
|
||||||
|
|
||||||
|
/** @var string[] */
|
||||||
|
protected $additionalParameters;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the profile of this video
|
||||||
|
* @var string $profile must be one of `baseline`, `main` or `high`
|
||||||
|
* @throws \InvalidArgumentException
|
||||||
|
*/
|
||||||
|
public function setProfile(string $profile) {
|
||||||
|
switch($profile) {
|
||||||
|
case Profile::BASELINE:
|
||||||
|
case Profile::MAIN:
|
||||||
|
case Profile::HIGH:
|
||||||
|
// these are fine
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new \InvalidArgumentException('Invalid profile given! Must be one of `baseline`, `main` or `high`!');
|
||||||
|
}
|
||||||
|
$this->profile = $profile;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getProfile() {
|
||||||
|
return $this->profile;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the given level
|
||||||
|
* @param float $level The level(for example: 3.0, 3.1, 4.0, 4.1)
|
||||||
|
*/
|
||||||
|
public function setLevel(float $level) {
|
||||||
|
$this->level = $level;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getLevel() {
|
||||||
|
return $this->level;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
@ -97,31 +146,6 @@ abstract class DefaultVideo extends DefaultAudio implements VideoInterface
|
||||||
return $this->modulus;
|
return $this->modulus;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function getAdditionalParameters()
|
|
||||||
{
|
|
||||||
return $this->additionalParamaters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets additional parameters.
|
|
||||||
*
|
|
||||||
* @param array $additionalParamaters
|
|
||||||
* @throws InvalidArgumentException
|
|
||||||
*/
|
|
||||||
public function setAdditionalParameters($additionalParamaters)
|
|
||||||
{
|
|
||||||
if (!is_array($additionalParamaters)) {
|
|
||||||
throw new InvalidArgumentException('Wrong additionalParamaters value');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->additionalParamaters = $additionalParamaters;
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,14 @@ interface VideoInterface extends AudioInterface
|
||||||
public function getAvailableVideoCodecs();
|
public function getAvailableVideoCodecs();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of available video codecs for this format.
|
* Returns the current profile
|
||||||
*
|
* @return string
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function getAdditionalParameters();
|
public function getProfile();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the level
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
public function getLevel();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,13 @@ class Audio extends AbstractStreamableMedia
|
||||||
$commands[] = '-ac';
|
$commands[] = '-ac';
|
||||||
$commands[] = $format->getAudioChannels();
|
$commands[] = $format->getAudioChannels();
|
||||||
}
|
}
|
||||||
|
// If the user passed some additional parameters
|
||||||
|
if (null !== $format->getAdditionalParameters()) {
|
||||||
|
foreach ($format->getAdditionalParameters() as $additionalParameter) {
|
||||||
|
$commands[] = $additionalParameter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$commands[] = $outputPathfile;
|
$commands[] = $outputPathfile;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,8 @@ class Video extends Audio
|
||||||
if ($format instanceof VideoInterface) {
|
if ($format instanceof VideoInterface) {
|
||||||
if (null !== $format->getVideoCodec()) {
|
if (null !== $format->getVideoCodec()) {
|
||||||
$filters->add(new SimpleFilter(array('-vcodec', $format->getVideoCodec())));
|
$filters->add(new SimpleFilter(array('-vcodec', $format->getVideoCodec())));
|
||||||
|
$filters->add(new SimpleFilter(array('-vprofile', $format->getProfile())));
|
||||||
|
$filters->add(new SimpleFilter(array('-level', $format->getLevel())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($format instanceof AudioInterface) {
|
if ($format instanceof AudioInterface) {
|
||||||
|
|
@ -121,14 +123,62 @@ class Video extends Audio
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the user passed some additional parameters
|
// If the user passed some additional parameters
|
||||||
if ($format instanceof VideoInterface) {
|
if (null !== $format->getAdditionalParameters()) {
|
||||||
if (null !== $format->getAdditionalParameters()) {
|
foreach ($format->getAdditionalParameters() as $additionalParameter) {
|
||||||
foreach ($format->getAdditionalParameters() as $additionalParameter) {
|
$commands[] = $additionalParameter;
|
||||||
$commands[] = $additionalParameter;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Merge Filters into one command
|
||||||
|
$videoFilterVars = $videoFilterProcesses = [];
|
||||||
|
for($i=0;$i<count($commands);$i++) {
|
||||||
|
$command = $commands[$i];
|
||||||
|
if ( $command == '-vf' ) {
|
||||||
|
$commandSplits = explode(";", $commands[$i + 1]);
|
||||||
|
if ( count($commandSplits) == 1 ) {
|
||||||
|
$commandSplit = $commandSplits[0];
|
||||||
|
$command = trim($commandSplit);
|
||||||
|
if ( preg_match("/^\[in\](.*?)\[out\]$/is", $command, $match) ) {
|
||||||
|
$videoFilterProcesses[] = $match[1];
|
||||||
|
} else {
|
||||||
|
$videoFilterProcesses[] = $command;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
foreach($commandSplits as $commandSplit) {
|
||||||
|
$command = trim($commandSplit);
|
||||||
|
if ( preg_match("/^\[[^\]]+\](.*?)\[[^\]]+\]$/is", $command, $match) ) {
|
||||||
|
$videoFilterProcesses[] = $match[1];
|
||||||
|
} else {
|
||||||
|
$videoFilterVars[] = $command;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($commands[$i]);
|
||||||
|
unset($commands[$i + 1]);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$videoFilterCommands = $videoFilterVars;
|
||||||
|
$lastInput = 'in';
|
||||||
|
foreach($videoFilterProcesses as $i => $process) {
|
||||||
|
$command = '[' . $lastInput .']';
|
||||||
|
$command .= $process;
|
||||||
|
$lastInput = 'p' . $i;
|
||||||
|
if ( $i == count($videoFilterProcesses) - 1 ) {
|
||||||
|
$command .= '[out]';
|
||||||
|
} else {
|
||||||
|
$command .= '[' . $lastInput . ']';
|
||||||
|
}
|
||||||
|
|
||||||
|
$videoFilterCommands[] = $command;
|
||||||
|
}
|
||||||
|
$videoFilterCommand = implode(";", $videoFilterCommands);
|
||||||
|
|
||||||
|
if ( $videoFilterCommand ) {
|
||||||
|
$commands[] = '-vf';
|
||||||
|
$commands[] = $videoFilterCommand;
|
||||||
|
}
|
||||||
|
|
||||||
$fs = FsManager::create();
|
$fs = FsManager::create();
|
||||||
$fsId = uniqid('ffmpeg-passes');
|
$fsId = uniqid('ffmpeg-passes');
|
||||||
$passPrefix = $fs->createTemporaryDirectory(0777, 50, $fsId) . '/' . uniqid('pass-');
|
$passPrefix = $fs->createTemporaryDirectory(0777, 50, $fsId) . '/' . uniqid('pass-');
|
||||||
|
|
|
||||||
|
|
@ -42,34 +42,34 @@ class ResizeFilterTest extends TestCase
|
||||||
public function provideDimensions()
|
public function provideDimensions()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array(new Dimension(320, 240), ResizeFilter::RESIZEMODE_FIT, 640, 480, 2, array('-s', '320x240')),
|
array(new Dimension(320, 240), ResizeFilter::RESIZEMODE_FIT, 640, 480, 2, array('-vf', '[in]scale=320:240 [out]')),
|
||||||
array(new Dimension(320, 240), ResizeFilter::RESIZEMODE_INSET, 640, 480, 2, array('-s', '320x240')),
|
array(new Dimension(320, 240), ResizeFilter::RESIZEMODE_INSET, 640, 480, 2, array('-vf', '[in]scale=320:240 [out]')),
|
||||||
array(new Dimension(320, 240), ResizeFilter::RESIZEMODE_SCALE_HEIGHT, 640, 480, 2, array('-s', '320x240')),
|
array(new Dimension(320, 240), ResizeFilter::RESIZEMODE_SCALE_HEIGHT, 640, 480, 2, array('-vf', '[in]scale=320:240 [out]')),
|
||||||
array(new Dimension(320, 240), ResizeFilter::RESIZEMODE_SCALE_WIDTH, 640, 480, 2, array('-s', '320x240')),
|
array(new Dimension(320, 240), ResizeFilter::RESIZEMODE_SCALE_WIDTH, 640, 480, 2, array('-vf', '[in]scale=320:240 [out]')),
|
||||||
|
|
||||||
array(new Dimension(640, 480), ResizeFilter::RESIZEMODE_FIT, 320, 240, 2, array('-s', '640x480')),
|
array(new Dimension(640, 480), ResizeFilter::RESIZEMODE_FIT, 320, 240, 2, array('-vf', '[in]scale=640:480 [out]')),
|
||||||
array(new Dimension(640, 480), ResizeFilter::RESIZEMODE_INSET, 320, 240, 2, array('-s', '640x480')),
|
array(new Dimension(640, 480), ResizeFilter::RESIZEMODE_INSET, 320, 240, 2, array('-vf', '[in]scale=640:480 [out]')),
|
||||||
array(new Dimension(640, 480), ResizeFilter::RESIZEMODE_SCALE_HEIGHT, 320, 240, 2, array('-s', '640x480')),
|
array(new Dimension(640, 480), ResizeFilter::RESIZEMODE_SCALE_HEIGHT, 320, 240, 2, array('-vf', '[in]scale=640:480 [out]')),
|
||||||
array(new Dimension(640, 480), ResizeFilter::RESIZEMODE_SCALE_WIDTH, 320, 240, 2, array('-s', '640x480')),
|
array(new Dimension(640, 480), ResizeFilter::RESIZEMODE_SCALE_WIDTH, 320, 240, 2, array('-vf', '[in]scale=640:480 [out]')),
|
||||||
|
|
||||||
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_FIT, 1280, 720, 2, array('-s', '640x360')),
|
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_FIT, 1280, 720, 2, array('-vf', '[in]scale=640:360 [out]')),
|
||||||
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_INSET, 1280, 720, 2, array('-s', '640x360')),
|
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_INSET, 1280, 720, 2, array('-vf', '[in]scale=640:360 [out]')),
|
||||||
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_SCALE_HEIGHT, 1280, 720, 2, array('-s', '640x360')),
|
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_SCALE_HEIGHT, 1280, 720, 2, array('-vf', '[in]scale=640:360 [out]')),
|
||||||
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_SCALE_WIDTH, 1280, 720, 2, array('-s', '640x360')),
|
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_SCALE_WIDTH, 1280, 720, 2, array('-vf', '[in]scale=640:360 [out]')),
|
||||||
|
|
||||||
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_FIT, 1280, 720, 2, array('-s', '640x360')),
|
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_FIT, 1280, 720, 2, array('-vf', '[in]scale=640:360 [out]')),
|
||||||
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_INSET, 1280, 720, 2, array('-s', '640x360')),
|
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_INSET, 1280, 720, 2, array('-vf', '[in]scale=640:360 [out]')),
|
||||||
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_SCALE_HEIGHT, 1280, 720, 2, array('-s', '640x360')),
|
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_SCALE_HEIGHT, 1280, 720, 2, array('-vf', '[in]scale=640:360 [out]')),
|
||||||
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_SCALE_WIDTH, 1280, 720, 2, array('-s', '640x360')),
|
array(new Dimension(640, 360), ResizeFilter::RESIZEMODE_SCALE_WIDTH, 1280, 720, 2, array('-vf', '[in]scale=640:360 [out]')),
|
||||||
|
|
||||||
// test non standard dimension
|
// test non standard dimension
|
||||||
array(new Dimension(700, 150), ResizeFilter::RESIZEMODE_INSET, 123, 456, 2, array('-s', '62x150'), true),
|
array(new Dimension(700, 150), ResizeFilter::RESIZEMODE_INSET, 123, 456, 2, array('-vf', '[in]scale=62:150 [out]'), true),
|
||||||
array(new Dimension(700, 150), ResizeFilter::RESIZEMODE_INSET, 123, 456, 2, array('-s', '40x150'), false),
|
array(new Dimension(700, 150), ResizeFilter::RESIZEMODE_INSET, 123, 456, 2, array('-vf', '[in]scale=40:150 [out]'), false),
|
||||||
|
|
||||||
array(new Dimension(320, 320), ResizeFilter::RESIZEMODE_FIT, 640, 480, 2, array('-s', '320x320')),
|
array(new Dimension(320, 320), ResizeFilter::RESIZEMODE_FIT, 640, 480, 2, array('-vf', '[in]scale=320:320 [out]')),
|
||||||
array(new Dimension(320, 320), ResizeFilter::RESIZEMODE_INSET, 640, 480, 2, array('-s', '320x240')),
|
array(new Dimension(320, 320), ResizeFilter::RESIZEMODE_INSET, 640, 480, 2, array('-vf', '[in]scale=320:240 [out]')),
|
||||||
array(new Dimension(320, 320), ResizeFilter::RESIZEMODE_SCALE_HEIGHT, 640, 480, 2, array('-s', '320x240')),
|
array(new Dimension(320, 320), ResizeFilter::RESIZEMODE_SCALE_HEIGHT, 640, 480, 2, array('-vf', '[in]scale=320:240 [out]')),
|
||||||
array(new Dimension(320, 320), ResizeFilter::RESIZEMODE_SCALE_WIDTH, 640, 480, 2, array('-s', '426x320')),
|
array(new Dimension(320, 320), ResizeFilter::RESIZEMODE_SCALE_WIDTH, 640, 480, 2, array('-vf', '[in]scale=426:320 [out]')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -449,60 +449,81 @@ class VideoTest extends AbstractStreamableTestCase
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
array(false, array(array(
|
array(false, array(array(
|
||||||
'-y', '-i', __FILE__, '-b:v', '663k',
|
'-y',
|
||||||
'-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop',
|
'-i', __FILE__,
|
||||||
'-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6',
|
|
||||||
'-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', 2, 'foo', 'bar', '-pass', 1, '-passlogfile',
|
|
||||||
'/target/file',
|
|
||||||
), array(
|
|
||||||
'-y', '-i', __FILE__,
|
|
||||||
'-b:v', '663k',
|
'-b:v', '663k',
|
||||||
'-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop',
|
'-refs', '6',
|
||||||
'-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6',
|
'-coder', '1',
|
||||||
'-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', 2, 'foo', 'bar', '-pass', 2, '-passlogfile',
|
'-sc_threshold', '40',
|
||||||
'/target/file',
|
'-flags', '+loop',
|
||||||
|
'-me_range', '16',
|
||||||
|
'-subq', '7',
|
||||||
|
'-i_qfactor', '0.71',
|
||||||
|
'-qcomp', '0.6',
|
||||||
|
'-qdiff', '4',
|
||||||
|
'-trellis', '1',
|
||||||
|
'-b:a', '92k',
|
||||||
|
'-ac', 2,
|
||||||
|
'foo', 'bar',
|
||||||
|
'-pass', 1,
|
||||||
|
'-passlogfile', '/target/file',
|
||||||
|
), array(
|
||||||
|
'-y',
|
||||||
|
'-i', __FILE__,
|
||||||
|
'-b:v', '663k',
|
||||||
|
'-refs', '6',
|
||||||
|
'-coder', '1',
|
||||||
|
'-sc_threshold', '40',
|
||||||
|
'-flags', '+loop',
|
||||||
|
'-me_range', '16',
|
||||||
|
'-subq', '7',
|
||||||
|
'-i_qfactor', '0.71',
|
||||||
|
'-qcomp', '0.6',
|
||||||
|
'-qdiff', '4',
|
||||||
|
'-trellis', '1',
|
||||||
|
'-b:a', '92k',
|
||||||
|
'-ac', 2,
|
||||||
|
'foo', 'bar',
|
||||||
|
'-pass', 2,
|
||||||
|
'-passlogfile', '/target/file'
|
||||||
)), null, $format),
|
)), null, $format),
|
||||||
array(false, array(array(
|
array(false, array(array(
|
||||||
'-y', '-i', __FILE__,
|
'-y',
|
||||||
'-vcodec', 'gloubi-boulga-video',
|
'-i', __FILE__,
|
||||||
'-acodec', 'patati-patata-audio', '-b:v', '664k',
|
'extra', 'param',
|
||||||
'-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop',
|
'-b:v', '665k',
|
||||||
'-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6',
|
'-refs', '6',
|
||||||
'-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '1', '-passlogfile',
|
'-coder', '1',
|
||||||
'/target/file',
|
'-sc_threshold', '40',
|
||||||
|
'-flags', '+loop',
|
||||||
|
'-me_range', '16',
|
||||||
|
'-subq', '7',
|
||||||
|
'-i_qfactor', '0.71',
|
||||||
|
'-qcomp', '0.6',
|
||||||
|
'-qdiff', '4',
|
||||||
|
'-trellis', '1',
|
||||||
|
'-b:a', '92k',
|
||||||
|
'-ac', '2',
|
||||||
|
'-pass', '1',
|
||||||
|
'-passlogfile', '/target/file',
|
||||||
), array(
|
), array(
|
||||||
'-y', '-i', __FILE__,
|
'-y', '-i', __FILE__,
|
||||||
'-vcodec', 'gloubi-boulga-video',
|
'extra', 'param',
|
||||||
'-acodec', 'patati-patata-audio',
|
'-b:v', '665k',
|
||||||
'-b:v', '664k',
|
'-refs', '6',
|
||||||
'-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop',
|
'-coder', '1',
|
||||||
'-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6',
|
'-sc_threshold', '40',
|
||||||
'-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '2', '-passlogfile',
|
'-flags', '+loop',
|
||||||
'/target/file',
|
'-me_range', '16',
|
||||||
)), null, $audioVideoFormat),
|
'-subq', '7',
|
||||||
array(false, array(array(
|
'-i_qfactor', '0.71',
|
||||||
'-y', '-i', __FILE__,
|
'-qcomp', '0.6',
|
||||||
'-vcodec', 'gloubi-boulga-video',
|
'-qdiff', '4',
|
||||||
'-acodec', 'patati-patata-audio', '-b:v', '664k',
|
'-trellis', '1',
|
||||||
'-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop',
|
'-b:a', '92k',
|
||||||
'-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6',
|
'-ac', '2',
|
||||||
'-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2',
|
'-pass', '2',
|
||||||
'/target/file',
|
'-passlogfile', '/target/file',
|
||||||
)), null, $audioVideoFormatSinglePass),
|
|
||||||
array(false, array(array(
|
|
||||||
'-y', '-i', __FILE__,
|
|
||||||
'extra', 'param','-b:v', '665k',
|
|
||||||
'-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop',
|
|
||||||
'-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6',
|
|
||||||
'-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '1', '-passlogfile',
|
|
||||||
'/target/file',
|
|
||||||
), array(
|
|
||||||
'-y', '-i', __FILE__,
|
|
||||||
'extra', 'param', '-b:v', '665k',
|
|
||||||
'-refs', '6', '-coder', '1', '-sc_threshold', '40', '-flags', '+loop',
|
|
||||||
'-me_range', '16', '-subq', '7', '-i_qfactor', '0.71', '-qcomp', '0.6',
|
|
||||||
'-qdiff', '4', '-trellis', '1', '-b:a', '92k', '-ac', '2', '-pass', '2', '-passlogfile',
|
|
||||||
'/target/file',
|
|
||||||
)), null, $formatExtra),
|
)), null, $formatExtra),
|
||||||
array(true, array(array(
|
array(true, array(array(
|
||||||
'-y', '-i', __FILE__,
|
'-y', '-i', __FILE__,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue