public function PHPVideoToolkit::validateFormat in Video 7.2
Same name and namespace in other branches
- 7 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::validateFormat()
Checks to see if a given codec can be decoded/encoded by the current ffmpeg binary. @access public
Parameters
$format string The shortcode for the codec to check for.:
$method string 'mux' or 'demux', The method to check against the format:
Return value
boolean True if the format can be used with the given method by ffmpeg, otherwise FALSE.
2 calls to PHPVideoToolkit::validateFormat()
- PHPVideoToolkit::canFormatBeDemuxed in libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php - Checks to see if a given format can be demuxed by the current ffmpeg binary. @access public
- PHPVideoToolkit::canFormatBeMuxed in libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php - Checks to see if a given format can be muxed by the current ffmpeg binary. @access public
File
- libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php, line 2657 - Libary to access FFmpeg
Class
Code
public function validateFormat($format, $method) {
$info = $this
->getFFmpegInfo();
return isset($info['formats'][$format]) === TRUE && isset($info['formats'][$format][$method]) === TRUE ? $info['formats'][$format][$method] : FALSE;
}