I’ve just put the finishing touches on the first working release of Enigmamachine. It’s a RESTful video encoder written in Ruby. It uses the thin webserver, eventmachine event framework, sinatra web framework, and datamapper ORM.

There’s a lot more info in the README, but basically it’s a standalone HTTP service which accepts a POST request triggering a video encode on the local filesystem. In short, your web app gets a video uploaded to it, and once it’s saved on your filesystem, you’d do something like:
wget http://username:password@localhost:2002/videos --post-data 'video[file]=/path/to/your/video.mp4&encoder_id=1'
This would apply whatever ffmpeg tasks you define to the uploaded video. Advantages for you? You don’t need to worry about process daemonization, threading issues, or maintaining a processing queue, you just fire off a POST request and enigmamachine does the rest.
There aren’t any callbacks yet, and I can see that this is probably the next thing to do (as well as slugging the encoder_id). That’ll wait, though. Basically it’s ready for first use, after a long long time messing with the idiosyncracies of combining ffmpeg (which logs to stderr), thin, a gem binary, and eventmachine’s multi-threaded mode. This was an interesting process all on its own, and I’ll do a write-up about Thin daemonization soon, as I think it’s a really great way to make low-ceremony services in Ruby.
