You are here

public function PHPVideoToolkit::setAudioSampleFrequency in Video 7.2

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

Sets the audio sample frequency for audio outputs

@access public

Parameters

integer $audio_sample_frequency Valid values are 11025, 22050, 44100:

Return value

boolean FALSE on error encountered, TRUE otherwise

2 calls to PHPVideoToolkit::setAudioSampleFrequency()
PHPVideoToolkit::extractAudio in libraries/phpvideotoolkit/phpvideotoolkit.php5.php
This is an alias for setFormat, but restricts it to audio only formats.
PHPVideoToolkit::setFormatToFLV in libraries/phpvideotoolkit/phpvideotoolkit.php5.php
A shortcut for converting video to FLV.

File

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

Class

PHPVideoToolkit

Code

public function setAudioSampleFrequency($audio_sample_frequency) {

  //			validate input
  if (!in_array(intval($audio_sample_frequency), array(
    11025,
    22050,
    44100,
  ))) {
    return $this
      ->_raiseError('setAudioSampleFrequency_valid_frequency', array(
      'frequency' => $audio_sample_frequency,
    ));

    // <-			exits
  }
  return $this
    ->addCommand('-ar', $audio_sample_frequency);
}