My problem is that FFMpeg and Mencoder are extremely resourceful and running even one process of it makes HTTPd slow down but multiple processes of (FFMPEG /Mencoder) just hang it (HTTPd) completely. I would like my conversions to be processed with Beanstalk, for example.
My concrete question is: How to transfer my current jobs to Beanstalk?
I have a simple PHP code that triggers conversion:
RunInBackground('convert.php', array($upload, $video_id), $log_path);
Now what would Beanstalk correct code would look like so these processes would NOT start all at the same time if multiple videos are uploaded?
If you believe that for my needs is better to use something else but Beanstalk and you know how to implement it, I would be still happy to see it!
Thanks in advance,
Ilia
Two possibilities:
– try xuggler for your conversions – runs inline instead of having to spawn jobs
– make a ‘file process queue’ using a db or file.. having your conversion process just query this for ‘outstanding files to process’ but only have one of these running at a time. It would run independantly of your main task but could post its status somewhere that your main job could read. EG “Busy” or “3 files in queue” or “available”