How To Use BackgrounDRb

I’m trying to use BackgrounDRb to take care of video encoding using
ffmpeg. I would love it if this tutorial (
2007/8/26/video-conversion) was more complete, however the code links
are all broken.

I have run the following commands:
$ script/plugin install svn://
$ rake backgroundrb:setup
$ script/generate worker transcode_video

Then in lib/workers/transcode_video_worker.rb I’ve added my code to
call ffmpeg in do_work(args).
Ultimately, I’m having trouble calling MiddleMan… where can I call
it from? What includes do I need? Must I use MiddleMan? Basically:
How to I execute do_work? I’d prefer to call it from the video model
(app/models/video.rb) in the after_save callback. Can I do that?

Basically I need a quick little how-to because the README for
BackgrounDRb is confusing and frustrating with it’s lack of details in
some places, and too many in others. Not to mention my generated code
doesn’t look like the files they show… sigh I’ve spent most of my
work day trying to understand this:
and it’s not helping.

Thank you in advance for your help in getting me squared away with
this popular plugin.

Hey there,

You might try a tutorial-ish type thing I wrote a long while ago:

Good luck getting going with backgroundrb! I’ve found the bigger pain
point is ffmpeg and the ridiculous build requirements/methods to get
fully functional video encoding working :slight_smile:

  • Kyle