You are here

public function PHPVideoToolkit::setFormatToFLV in Video 7.2

Same name and namespace in other branches
  1. 7 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::setFormatToFLV()

A shortcut for converting video to FLV.

@access public

Parameters

integer $audio_sample_frequency:

integer $audio_bitrate:

boolean $validate_codecs:

Return value

mixed

File

libraries/phpvideotoolkit/phpvideotoolkit.php5.php, line 1194
Libary to access FFmpeg

Class

PHPVideoToolkit

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;
}