Index: plugins/video_ffmpeg_helper/video_render.php
===================================================================
RCS file: /cvs/drupal/contributions/modules/video/plugins/video_ffmpeg_helper/video_render.php,v
retrieving revision 1.7.2.1
diff -u -p -r1.7.2.1 video_render.php
--- plugins/video_ffmpeg_helper/video_render.php	19 Feb 2007 00:18:43 -0000	1.7.2.1
+++ plugins/video_ffmpeg_helper/video_render.php	31 Aug 2007 18:09:35 -0000
@@ -5,6 +5,10 @@
  * @file
  * Renders a video. This script is called concurrently by video_scheduler.php
  * This script has to be launched with "php video_render.php nid vid"
+ * If you are not using sites/default/settings.php as your settings file, 
+ * add an optional parameter for the drupal site url:
+ * "php video_render.php nid vid http://example.com/" or
+ * "php video_render.php nid vid http://example.org/drupal/"
  *
  * @author Fabio Varesano <fvaresano at yahoo dot it>
  */
@@ -40,6 +44,11 @@ define('VIDEO_RENDERING_PENDING', 0);
 define('VIDEO_RENDERING_ACTIVE', 5);
 define('VIDEO_RENDERING_COMPLETE', 10);
 
+if (isset($_SERVER['argv'][3])) {
+  $url = parse_url($_SERVER['argv'][3]);
+  $_SERVER['SCRIPT_NAME'] = $url['path'];
+  $_SERVER['HTTP_HOST'] = $url['host'];
+}
 
 include_once './includes/bootstrap.inc';
 // disable error reporting for bootstrap process
@@ -52,7 +61,7 @@ error_reporting(E_ALL);
 
 // allow execution only from the command line!
 if(empty($_SERVER['REQUEST_METHOD'])) {
-  if($_SERVER['argc'] != 3) { // check for command line arguments
+  if($_SERVER['argc'] < 3) { // check for command line arguments
     watchdog('video_render', t('Incorrect parameters to the video_render.php script.', WATCHDOG_ERROR));
     print t('Incorrect parameters');
   }
Index: plugins/video_ffmpeg_helper/video_scheduler.php
===================================================================
RCS file: /cvs/drupal/contributions/modules/video/plugins/video_ffmpeg_helper/video_scheduler.php,v
retrieving revision 1.4
diff -u -p -r1.4 video_scheduler.php
--- plugins/video_ffmpeg_helper/video_scheduler.php	18 Feb 2007 13:31:29 -0000	1.4
+++ plugins/video_ffmpeg_helper/video_scheduler.php	31 Aug 2007 18:09:35 -0000
@@ -4,6 +4,10 @@
 /**
  * @file
  * Implement video rendering scheduling.
+ * If you are not using sites/default/settings.php as your settings file,  
+ * add an optional parameter for the drupal site url:
+ * "php video_scheduler.php http://example.com/" or
+ * "php video_scheduler.php http://example.org/drupal/"
  *
  * @author Fabio Varesano <fvaresano at yahoo dot it>
  */
@@ -35,6 +39,11 @@ define('VIDEO_RENDERING_PENDING', 0);
 define('VIDEO_RENDERING_ACTIVE', 5);
 define('VIDEO_RENDERING_COMPLETE', 10);
 
+if (isset($_SERVER['argv'][1])) {
+  $url = parse_url($_SERVER['argv'][1]);
+  $_SERVER['SCRIPT_NAME'] = $url['path'];
+  $_SERVER['HTTP_HOST'] = $url['host'];
+}
 
 include_once './includes/bootstrap.inc';
 // disable error reporting for bootstrap process
@@ -76,7 +85,8 @@ function video_scheduler_main() {
  * Starts rendering for a job
 */
 function video_scheduler_start($job) {
-  exec("php video_render.php $job->nid $job->vid > /dev/null &");
+  $url = (isset($_SERVER['argv'][1])) ? escapeshellarg($_SERVER['argv'][1]) : '';
+  exec("php video_render.php $job->nid $job->vid $url > /dev/null &");
 }
 
 
