I’ve been playing with my Raspberry Pi to make a Timelapse movie using a webcam.
Because I used a 2GB SD card, I saved the frames to a NFS share, it is also possible to save the frames to this SD card directly if there is sufficient space.
- Raspberry Pi
- 2GB SD card
- NFS share
- Microsoft LiveCam HD 3000
For the software, a fresh Raspbian is enough. Default user is:
- Usename: pi
- Password: raspberry
sudo apt-get update sudo apt-get install fswebcam
Mounting the NFS share
In the shell:
sudo mount -o nolock nas.lan:/share/Temporary /mnt
Create a configuration file
device /dev/video0 resolution 1280x720 no-banner jpeg 90 loop 5 background save /mnt/last.jpg delay 1 skip 30
Note that the frames can be inconstant due to the time for the sensor to adjust to the conditions. Increasing the number of skipped frame (skip) can solve this problem.
Create a script to rename the frames
#!/bin/sh DATE=`date +%s`.jpg mv /mnt/last.jpg /mnt/$DATE
Make the script executable:
chmod +x /mnt/rename.sh
Run the capture
Start the capture (in background with as specified in the configration file)
fswebcam -c /mnt/fswebcam.conf --exec /mnt/rename.sh
Stop the capture
Assemble the frames into a movie
I use Photolapse to assemble the frames, it’s a simple freeware that gets the job done quickly!