(this post is automatically translated from the original Italian version for your convenience. Sorry in advance for errors)

how to make a time lapse video with a webcam

The time lapse is a cinematographic technique that results in a video playback time is "compressed", so for example, in a single second of that movie, there are 60 seconds of the actual scene.
Clouds running, plants that germinate in a few seconds, complex jobs that are progressing rapidly all the time lapse video that we usually see.
How does a time lapse video?


The technique is quite simple and consists in reproducing the frames that make up the image at a higher frequency with which they were taken.
Because you have a webcam and a computer could be this simple recipe:
first taken from a webcam every few frames to be stored in a directory (each frame has a unique name based on the time stamp or the date and time of acquisition), this is enough to make a crontab script that champions the 'image from your webcam or use a program that already does this: Linux for example camstream or camorama .

Secondly we need a program that takes these images and turn them into a video.
That is the irreplaceable mencoder .
To tell mencoder to create a video on a list of images to give the command is this:

 mencoder mf: / / @ lista.txt-ovc lavc-lavcopts vcodec = mpeg4: mbd = 1: vbitrate = 1800-o output.avi

Where to file "lista.txt" there are files that need to compose the scene, one per line.
Codec and bitrate should be selected based on the output format and quality that you want.
The file list can be created very simply:

 cd-image directory
 ls *. jpg | tail-n 960 | sort> lista.txt

The command simply is list the files in the directory, take the last 960, sorts them by name and creates the file list.
The naming of image files must be such that once ordered the former are older:
format could be: YYYYMMDDHHMMSS.jpg where YYYY is the year, MM month, DD the day, HH the hour, MM the minute and SS the seconds.
20090901123812.jpg example identifies that this image was acquired at the September 1, 2009 12:38:12.

Similar Items