As part of a larger project involving timelapse video, I developed a technique that uses motion detection to identify frames for capture, and skips over frames where nothing is happening.
The video on the left implements this technique. You can see how it works, by skipping the stops at the stations in the video. The video on the right is original source video, sped up to match the duration of the video on the left. You can see that it does not skip the stops at the station.
I implemented this in Max/MSP/Jitter. The basic algorithm keeps track of the last frame written, and constantly compares the incoming video feed with that frame, calculating a constant difference score that tracks not only the number of differing pixels, but also the amount of difference. When this difference exceeds a defined threshold, then it captures that frame.
Comparing against the last frame captured, instead of simply the previous frame, ensures that even gradual changes will be recorded.