rename error message

This commit is contained in:
Nicolas Le Goff 2012-06-06 11:12:40 +02:00
commit 067a0de808

View file

@ -231,7 +231,7 @@ class FFMpeg extends Binary
if ($format instanceof Video\Resizable) { if ($format instanceof Video\Resizable) {
if ( ! $this->prober) { if ( ! $this->prober) {
throw new LogicException('You must set a valid prober if you use RESIZEMODE_INSET'); throw new LogicException('You must set a valid prober if you use a resizable format');
} }
$result = json_decode($this->prober->probeStreams($this->pathfile), true); $result = json_decode($this->prober->probeStreams($this->pathfile), true);
@ -269,15 +269,22 @@ class FFMpeg extends Binary
if ($format instanceof Video\Resamplable) { if ($format instanceof Video\Resamplable) {
$cmd_part2 .= ' -r ' . $format->getFrameRate(); $cmd_part2 .= ' -r ' . $format->getFrameRate();
/**
* @see http://sites.google.com/site/linuxencoding/x264-ffmpeg-mapping
*/
if ($format->supportBFrames()) {
$cmd_part2 .= ' -b_strategy 1 -bf 3 -g ' . $format->getGOPSize();
}
} }
if ($format instanceof Video\Transcodable) { if ($format instanceof Video\Transcodable) {
$cmd_part2 .= ' -vcodec ' . $format->getVideoCodec(); $cmd_part2 .= ' -vcodec ' . $format->getVideoCodec();
} }
$cmd_part2 .= ' -b ' . $format->getKiloBitrate() . 'k -g 25 -bf 3' $cmd_part2 .= ' -b ' . $format->getKiloBitrate() . 'k'
. ' -threads ' . $threads . ' -threads ' . $threads
. ' -refs 6 -b_strategy 1 -coder 1 -qmin 10 -qmax 51 ' . ' -refs 6 -coder 1 -qmin 10 -qmax 51 '
. ' -sc_threshold 40 -flags +loop -cmp +chroma' . ' -sc_threshold 40 -flags +loop -cmp +chroma'
. ' -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 ' . ' -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 '
. ' -trellis 1 -qscale 1 ' . ' -trellis 1 -qscale 1 '