Running the motion library on the Yun

I have streaming working fairly well with mjpeg_streamer. There is some glitchiness but it is pretty good, and seems stable. I've had it streaming for days.

I'd like to be able to detect motion in the image and start recording or taking snapshots, which is why I've been tinkering with motion. It seems like motion tries to do too much. Unfortunately I don't have the hours it would take to create something purpose-built to what I want.