Webcam timelapse with Ubuntu Cheese
I found a simple way to take time lapse photos with Ubuntu’s webcam utility Cheese.
I created a macro using Xmacro. Very helpful info I found on A Search For Truth. The key bits I learned was a trick for installing. Instead of the add/remove utility for Ubuntu, the Synaptic Package utility will install xmacro for you. (click on Systems > Administration > Synaptic).
Once installed, I created a text file called timelapse.macro that contained:
Repeated as many times as I wanted to take photos. At 30 frames per second, 1800 photos will take one minute. The file will be 3600 lines long.
I put the text file in my desktop directory. Opened a terminal, went to that directory, then entered:
cat timelapse.macro | xmacroplay -d 5000 :0
This clicked on the mouse in workspace 0 every 5 seconds (5000 milliseconds) and released every 5 seconds. Thus, a picture was taken every 10 seconds once I placed the mouse pointer on the take a photo button (Cheese was already up and running) on workspace 0. I think the workspace setting might only be set once, as I manually switched workspaces and the mouse clicks then were still automated wherever I worked.
One downside, I haven’t yet figured out how to stop the macro early. cntl-alt-backspace did it the hard way, but I’m sure there is an easier way I haven’t found yet. Still, with Linux, this warm reset gets you back to your desktop in less than 10 seconds, so it is far less cumbersome than rebooting Windows.- the Muse