start a video recording whenever motion is detected.
Have the camera on all the time, monitoring the image with an algorithm. When motion is detected over a certain threshold, begin a video recording and save it once either: 1.) the video time out is reached, or 2.) the motion has stopped.