public function PHPVideoToolkit::setVideoAspectRatio in Video 7
Same name and namespace in other branches
- 7.2 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::setVideoAspectRatio()
* Sets the video aspect ratio. * IMPORTANT! Setting an aspect ratio will change the width of the video output if the specified dimensions aren't already * in the correct ratio. ie, Setting the aspect ratio to RATIO_STANDARD when you set the output dimensions to 176 x 144 * will in fact output a video with 192 x 144, but the information returned by ffmpeg will give return the size as 176 x 144 * which is obviously invalid. * * @access public *
Parameters
string|integer $ratio Valid values are PHPVideoToolkit::RATIO_STANDARD, PHPVideoToolkit::RATIO_WIDE, PHPVideoToolkit::RATIO_CINEMATIC, or '4:3', '16:9', '1.85' : * @return boolean
File
- libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php, line 1762
Class
Code
public function setVideoAspectRatio($ratio) {
if (!in_array($ratio, array(
self::RATIO_STANDARD,
self::RATIO_WIDE,
self::RATIO_CINEMATIC,
))) {
return $this
->_raiseError('setVideoAspectRatio_valid_ratio', array(
'ratio' => $ratio,
));
}
$this
->addCommand('-aspect', $ratio);
return true;
}