aboutsummaryrefslogtreecommitdiff
path: root/libraries/phpvideotoolkit/examples/example-config.php
diff options
context:
space:
mode:
authorDalyn Cessac <dalyn.cessac@1214036.no-reply.drupal.org>2011-03-16 11:06:40 -0500
committerDalyn Cessac <dalyn.cessac@1214036.no-reply.drupal.org>2011-03-16 11:06:40 -0500
commita435de089da4dd37c3c183f633a49107c720dd95 (patch)
tree5f92decbf2d4bb27f85c49bfc5b4fcaf938b58b4 /libraries/phpvideotoolkit/examples/example-config.php
parenta31b9883849b0a04420ee1d476fbe08c87bc5d53 (diff)
downloadvideo-a435de089da4dd37c3c183f633a49107c720dd95.tar.gz
video-a435de089da4dd37c3c183f633a49107c720dd95.tar.bz2
Added phpvideotoolkit transcoder and updates to the preset ui
Diffstat (limited to 'libraries/phpvideotoolkit/examples/example-config.php')
-rw-r--r--libraries/phpvideotoolkit/examples/example-config.php70
1 files changed, 70 insertions, 0 deletions
diff --git a/libraries/phpvideotoolkit/examples/example-config.php b/libraries/phpvideotoolkit/examples/example-config.php
new file mode 100644
index 0000000..70540b7
--- /dev/null
+++ b/libraries/phpvideotoolkit/examples/example-config.php
@@ -0,0 +1,70 @@
+<?php
+
+ /* SVN FILE: $Id$ */
+
+ ini_set('error_reporting', E_ALL);
+ ini_set('track_errors', '1');
+ ini_set('display_errors', '1');
+ ini_set('display_startup_errors', '1');
+
+// shortcut the DIRECTORY_SEPARATOR value
+ if(!defined('DS'))
+ {
+ define('DS', DIRECTORY_SEPARATOR);
+ }
+
+// define the paths to the required binaries
+// define('PHPVIDEOTOOLKIT_FFMPEG_BINARY', 'ffmpeg');
+ define('PHPVIDEOTOOLKIT_FFMPEG_BINARY', 'c:/ffmpeg/ffmpeg.exe');
+// define('PHPVIDEOTOOLKIT_FFMPEG_BINARY', '/usr/local/bin/ffmpeg');
+ define('PHPVIDEOTOOLKIT_FLVTOOLS_BINARY', '/usr/bin/flvtool2');
+ define('PHPVIDEOTOOLKIT_MENCODER_BINARY', '/usr/local/bin/mencoder'); // only required for video joining
+ define('PHPVIDEOTOOLKIT_FFMPEG_WATERMARK_VHOOK', '/usr/local/lib/vhook/watermark.dylib'); // only required for video wartermarking
+ // define('PHPVIDEOTOOLKIT_FFMPEG_BINARY', 'xxxx');
+// define('PHPVIDEOTOOLKIT_FLVTOOLS_BINARY', 'xxxx');
+// define('PHPVIDEOTOOLKIT_MENCODER_BINARY', 'xxxx'); // only required for video joining
+// define('PHPVIDEOTOOLKIT_FFMPEG_WATERMARK_VHOOK', 'xxxx'); // only required for video wartermarking
+
+// define the absolute path of the example folder so that the examples only have to be edited once
+// REMEMBER the trailing slash
+ define('PHPVIDEOTOOLKIT_EXAMPLE_ABSOLUTE_PATH', dirname(__FILE__).DS);
+
+ if(PHPVIDEOTOOLKIT_FFMPEG_BINARY == 'xxxx' || PHPVIDEOTOOLKIT_FLVTOOLS_BINARY == 'xxxx' || PHPVIDEOTOOLKIT_MENCODER_BINARY == 'xxxx' || PHPVIDEOTOOLKIT_FFMPEG_WATERMARK_VHOOK == 'xxxx' || PHPVIDEOTOOLKIT_EXAMPLE_ABSOLUTE_PATH == 'xxxx')
+ {
+ die('<strong class="alert">Please open examples/example-config.php to set your servers values. Then <a href="?'.time().'">click here</a> to continue.</strong>');
+//<- exits
+ }
+
+// use a particular version for the examples
+ $use_version = 'php5';
+ $has_version_warning = false;
+// check if php5 is ok
+ if($use_version == 'php5' && version_compare(PHP_VERSION, '5.0.0', '<'))
+ {
+ $use_version = 'php4';
+ $has_version_warning = true;
+ }
+// print_r(array($use_version, version_compare('4', PHP_VERSION, '<')));
+// exit;
+ if(!isset($ignore_demo_files) || !$ignore_demo_files)
+ {
+ $is_file = is_file(PHPVIDEOTOOLKIT_EXAMPLE_ABSOLUTE_PATH.'to-be-processed'.DS.'cat.mpeg');
+ if($is_file)
+ {
+ if(!isset($ignore_config_output) || !$ignore_config_output)
+ {
+ echo '<span class="alert">Please note that this example requires demo files. If you have not got these demo files you can download them from <a href="http://www.buggedcom.co.uk/ffmpeg">here</a>.<br /><br />This example will now quit.</span>';
+ exit;
+ }
+ }
+ else
+ {
+ if(!isset($ignore_config_output) || !$ignore_config_output)
+ {
+ echo '<br />';
+ }
+ }
+ }
+
+
+ \ No newline at end of file