Ejemplo n.º 1
0
echo '<strong>This example shows you how to access the information about your ffmpeg installation.</strong><br /><br />';
$ignore_demo_files = true;
// 	load the examples configuration
require_once 'example-config.php';
// 	require the library
require_once '../phpvideotoolkit.' . $use_version . '.php';
// 	temp directory
$tmp_dir = PHPVIDEOTOOLKIT_EXAMPLE_ABSOLUTE_BATH . 'tmp/';
// 	start ffmpeg class
$toolkit = new PHPVideoToolkit($tmp_dir);
// 	get the ffmpeg info
$info = $toolkit->getFFmpegInfo();
// 	determine the type of support for ffmpeg-php
echo '<strong>FFmpeg-PHP Support</strong><br />';
// 	determine if ffmpeg-php is supported
$has_ffmpeg_php_support = $toolkit->hasFFmpegPHPSupport();
// 	you can also determine if it has ffmpeg php support with below
// 	$has_ffmpeg_php_support = $info['ffmpeg-php-support'];
switch ($has_ffmpeg_php_support) {
    case 'module':
        echo 'Congratulations you have the FFmpeg-PHP module installed.';
        break;
    case 'emulated':
        echo 'You haven\'t got the FFmpeg-PHP module installed, however you can use the PHPVideoToolkit\'s adapter\'s to emulate FFmpeg-PHP.<br /><strong>Note:</strong> It is recommended that if you heavily use FFmpeg-PHP that you install the module.';
        break;
    case false:
        echo 'You have no support at all for FFmpeg-PHP.';
        break;
}
echo '<br /><br /><strong>This is the information that is accessible about your install of FFmpeg.</strong><br />';
echo '<pre>';