public function PHPVideoToolkit::setFormatToFLV in Video 7
Same name and namespace in other branches
- 7.2 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::setFormatToFLV()
* A shortcut for converting video to FLV. * * @access public *
Parameters
integer $audio_sample_frequency: * @param integer $audio_bitrate * @param boolean $validate_codecs * @return mixed
File
- libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php, line 1180
Class
Code
public function setFormatToFLV($audio_sample_frequency = 44100, $audio_bitrate = 64, $validate_codecs = true) {
$this
->addCommand('-sameq');
$audio_able = $this
->setAudioFormat(self::FORMAT_MP3, $validate_codecs);
// adjust the audio rates
$this
->setAudioBitRate($audio_bitrate);
$this
->setAudioSampleFrequency($audio_sample_frequency);
// set the video format
$flv_able = $this
->setFormat(self::FORMAT_FLV, $validate_codecs);
// flag that the flv has to have meta data added after the excecution of this command
// register the post tidy process
$this
->registerPostProcess('_addMetaToFLV', $this);
return $audio_able !== false && $flv_able !== false;
}