WorldDrknss Posted November 21, 2007 Share Posted November 21, 2007 I am currently working on a video upload and conversion script and this is what I would like to do. Instead of the user upload the file and wait for about 20 or so minutes for the video to encode. I would like to achieve the following: User uploads video file, File information get inserted into a video query database, (the following is what I am trying to figure out) Database: id auto filename varchar title varchar description text in_progress int, date timestamp A script that continuously monitors the video query database for new videos and videos that have not been encoded. The video file that is being encoded will have a "1" inserted into the in_progress field. After a video has been encoded it will then be deleted from the video query database and moved into the main video database. Then the script will determine the next highest id, set it in_progress to 1, and begin encoding that file. BTW on a Windows machine. This way a user does not have to wait around and watch the browser loading symbol for 20 minutes or so waiting on their file to convert. Using FFMPEG for video conversions. Opened for other suggestions TIA Quote Link to comment Share on other sites More sharing options...
noidtluom Posted November 21, 2007 Share Posted November 21, 2007 This is to .flv right? Well, I would setup a cron job. Probably not the best answer, but it might be something you'd be looking into. Quote Link to comment Share on other sites More sharing options...
pkSML Posted November 21, 2007 Share Posted November 21, 2007 I'm speaking outside of my Windows-only world, so I don't know if this is a possibility for you. Could you fork a PHP script that will start encoding immediately when a user uploads a file to you? http://pksml.net/search/php+fork Quote Link to comment Share on other sites More sharing options...
WorldDrknss Posted November 22, 2007 Author Share Posted November 22, 2007 I was thinking about forking it, but I do not want a lot of encoding processes to running in the background. Since encoding does use a lot of resources. Quote Link to comment Share on other sites More sharing options...
WorldDrknss Posted November 22, 2007 Author Share Posted November 22, 2007 If I were to do this as a cron job, how would I go about doing that. Quote Link to comment Share on other sites More sharing options...
pkSML Posted November 22, 2007 Share Posted November 22, 2007 In Windows --> http://drupal.org/node/31506 More links: http://pksml.net/search/windows+cron+job In Linux --> http://www.adminschoice.com/docs/crontab.htm More links: http://pksml.net/search/setting+up+cron+job Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.