Making Time Lapses In Linux

Posted: 2009-06-17 04:32:00
Modified: 2010-07-25 10:29:38

Under construction

Stuff you need

The first thing you need is a computer Linux ( Macs or any other UNIX based OS should work ) and FFmpeg. The next thing you need is the images that you want to convert to a video. I will explain this more in the next section.

Taking the time lapse

The easiest way to make a time lapse is with a webcam running on a webcam server that outputs static jpeg images. You can also get images from others sources such as a digital camera that has an intervalometer or a video camera. I'm only going to discuss how to make a time lapse with a webcam and a webcam server in this how-to.

After you setup your webcam and its server its time to start capturing the images to make the time lapse. Here is the script I use to gather the images for a time lapse.

#!/bin/sh
x="0"
while [ 1 ]
do
    echo $x
    wget -q "http://webcamserver:1234/live.jpg" -O "$x.jpg"
    x="`expr $x '+' 1`"
    sleep 60
done

This script is pretty simple. There is two things you may want to change. http://webcamserver:1234/live.jpg This should be the url for the live jpeg that your webcam server outputs. The next thing is the 60 after sleep. This makes the script wait 60 seconds before capturing another image.

Now you can just run that script and wait for a while.

Now if you left it to wait 60 seconds it will take 30 minutes to make a video 1 second long if your final video is 30 fps. If you change the 60 to 1 then it will take 30 seconds to make a 1 second video.

Rendering

To render I suggest using FFMPEG. You can also use MPlayer but I'm only going to cover using FFMPEG. ...

More soon!