At some point, I wanted to be able to have my laptop record video segments after it detected motion.
I couldn't seem to get any video recording library for Ruby or C working, so I hacked together a ridiculous solution using Mplayer/FFmpeg, PPM conversion, and a little bash glue.
It ended up working really well, but I can't say I'd do it again, given how easy it'd be to make using JavaScript or Python nowadays.