From 8f1f6e3d94558ca076b3d93f2a36e262f9dbd8ae Mon Sep 17 00:00:00 2001 From: glen201 Date: Fri, 24 Jul 2009 22:03:46 +0000 Subject: Fixed no timestamp on ffmpeg converted videos Removed duplicative defines at top of files #522148 by captix: fixed (Commit #242492 improperly marked): video_image updated to default promote of Image node to false if video_image Promote and Image Project module Promote settings not configured --- plugins/video_ffmpeg_helper/README.txt | 2 +- plugins/video_ffmpeg_helper/video_render.php | 11 +++++------ plugins/video_ffmpeg_helper/video_scheduler.php | 7 ------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/plugins/video_ffmpeg_helper/README.txt b/plugins/video_ffmpeg_helper/README.txt index 73716b7..fb63547 100644 --- a/plugins/video_ffmpeg_helper/README.txt +++ b/plugins/video_ffmpeg_helper/README.txt @@ -15,7 +15,7 @@ Install instructions 1. Activate the video_ffmpeg_helper module 2. Setup it's advanced options to meet your needs 3. Move (or symlink) video_render.php and video_scheduler.php into your Drupal root -4. Edit the first line of those files to meet your needs +4. Edit the first "Configuration" code lines of those files to meet your needs (IMPORTANT: path to ffmpeg executable on your server) 5. Check permissions of the files and folders (/tmp/video and files/* must be writable by the webserver or the user executling the cron job) 6. You now have two options to execute the video_scheduler.php script: diff --git a/plugins/video_ffmpeg_helper/video_render.php b/plugins/video_ffmpeg_helper/video_render.php index e4a6b6d..a6b1fbe 100644 --- a/plugins/video_ffmpeg_helper/video_render.php +++ b/plugins/video_ffmpeg_helper/video_render.php @@ -12,6 +12,7 @@ * @author Fabio Varesano * porting to Drupal 6 * @author Heshan Wanigasooriya + * @author Glen Marianko Twitter@demoforum * @todo */ @@ -19,16 +20,13 @@ /** * video_scheduler.php configuration */ -// set to the ffmpeg executable -define('VIDEO_RENDERING_FFMPEG_PATH', '/home2/heidisof/bin/./ffmpeg'); +// set path to the ffmpeg executable +define('VIDEO_RENDERING_FFMPEG_PATH', '/usr/bin/ffmpeg'); // set to the temp file path. //IMPORTANT: the user who runs this script must have permissions to create files there. If this is not the case the default php temporary folder will be used. define('VIDEO_RENDERING_TEMP_PATH', '/tmp/video'); -// number of conversion jobs active at the same time -define('VIDEO_RENDERING_FFMPEG_INSTANCES', 5); - // nice value to append at the beginning of the command define('VIDEO_RENDERING_NICE', 'nice -n 19'); @@ -133,7 +131,8 @@ function video_render_main() { if (file_copy($file, $dest_dir)) { //$file->fid = db_next_id('{files}_fid'); //print_r($file); - db_query("INSERT INTO {files} (fid, uid, filename, filepath, filemime, filesize, status) VALUES (%d, %d, '%s', '%s', '%s', %d, %d)", $file->fid, $job->uid, $file->filename, $file->filepath, $file->filemime, $file->filesize, 1); + //GMM: fixed added timestamp column for completeness (otherwise 0), D6 FILE_STATUS + db_query("INSERT INTO {files} (fid, uid, filename, filepath, filemime, filesize, status, timestamp) VALUES (%d, %d, '%s', '%s', '%s', %d, %d, %d)", $file->fid, $job->uid, $file->filename, $file->filepath, $file->filemime, $file->filesize, FILE_STATUS_PERMANENT, time()); // to know other modules of fid $file->fid = db_last_insert_id('files', 'fid'); diff --git a/plugins/video_ffmpeg_helper/video_scheduler.php b/plugins/video_ffmpeg_helper/video_scheduler.php index 8c2d6ce..6ee08df 100644 --- a/plugins/video_ffmpeg_helper/video_scheduler.php +++ b/plugins/video_ffmpeg_helper/video_scheduler.php @@ -19,13 +19,6 @@ * video_scheduler.php configuration */ -// set to the ffmpeg executable -define('VIDEO_RENDERING_FFMPEG_PATH', '/home2/heidisof/bin/./ffmpeg'); - -// set to the temp file path. -//IMPORTANT: the user who runs this script must have permissions to create files there. If this is not the case the default php temporary folder will be used. -define('VIDEO_RENDERING_TEMP_PATH', '/tmp/video'); - // number of conversion jobs active at the same time define('VIDEO_RENDERING_FFMPEG_INSTANCES', 5); -- cgit v1.2.3