This is a tiny wrapper around the scrot and wmctrl utilities.
The purpose of using this tool rather than just calling scrot in a loop, is that it only takes screenshots when specific virtual desktops are active. The timelapse recording will automatically pause when you switch to a non-included virtual desktop. You can even have more than one different timelapse accumulating from different desktops simultanously.
watcher.py will dump timelapse screenshots that you can stitch together later with other tools like mencoder.
For example:
mencoder -oac copy -audiofile music.mp3 -ovc lavc -mf w=640:h=400:fps=12:type=png 'mf://./*.png' -o timelapse.avi
Where *.png are the files generated by watcher.py
For full usage, run:
./watcher.py --help