You are here

public function PHPVideoToolkit::hasCodecSupport in Video 7

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

* Determines if your ffmpeg has particular codec support for encode or decode. * * @access public *

Parameters

string $codec The name of the codec you are checking for. : * @param const $support PHPVideoToolkit::ENCODE or PHPVideoToolkit::DECODE, depending on which functionality is desired. * @return mixed. Boolean false if there is no support, true if there is support.

File

libraries/phpvideotoolkit/phpvideotoolkit.php5.php, line 809

Class

PHPVideoToolkit

Code

public function hasCodecSupport($codec, $support = PHPVideoToolkit::ENCODE) {
  $codec = strtolower($codec);
  $data = $this
    ->getFFmpegInfo(true);
  return isset($data['formats'][$codec]) === true ? $data['formats'][$codec][$support] : false;
}