I was growing some ground cherry plants in pots and it seemed like their growth was exploding so I wanted to make a timelapse video like I had seen on youtube to get a sense of their growth rate.
I decided to make my timelapse using fswebcam to take the frames, imagemagick to add a nice timestamp, and avconv (fork of ffmpeg) to combine them into one video. There are simpler tools to capture the frames with but fswebcam has some very useful options which some people might need depending on their webcam, I’ll get into this later down in the code.
I have used these exact instructions on fresh installations of Ubuntu and Mint Linux on my laptop, and have also used them with my Raspberry Pi and it worked just the same.
If you use an original Raspberry Pi you may need an externally powered USB hub to actually use any decent webcam because it can draw too much power, if you’re using a Raspberry Pi B+ or a Raspberry Pi 2 then you can adjust a config file setting to allow your RPI B+/RPI 2 to allow higher power consumption on USB ports.
I am not an expert on this sort of stuff but you can read more about it here, the website gives instructions for the B+ but they also work for the Raspberry Pi 2.