public function PHPVideoToolkit::setConstantQuality in Video 7
Same name and namespace in other branches
- 7.2 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::setConstantQuality()
* Sets a constant quality value to the encoding. (but a variable bitrate) * *
Parameters
integer $quality The quality to adhere to. 100 is highest quality, 1 is the lowest quality:
File
- libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php, line 2374
Class
Code
public function setConstantQuality($quality) {
// interpret quality into ffmpeg value
$quality = 31 - round($quality / 100 * 31);
if ($quality > 31) {
$quality = 31;
}
else {
if ($quality < 1) {
$quality = 1;
}
}
$this
->addCommand('-qscale', $quality);
}