How To Create Time Lapse Movies With Lots Of Open Source Software

Time Lapse movies are really cool. Really. I got a nice shot of creating a time lapse movie when I moved to a new place. Here is how I did it.

WARNING: This is going to be a geeky post with lots of software downloads, hacks, and tweaks.

WARNING 2: Once you time-lapse, you can never go back (only fast forward).

UPDATE: the G10 has a CHDK build here.

1. Get Your Stuff Together

  • Get a Canon Point & Shoot (Like the excellent Canon G10) that works with CHDK (or get an intervalometer (either dedicated or general) for whatever camera you want); If you don’t use Canon/CHDK just skip the boring tech loaded section about loading your Canon with a new firmware.
  • Get a nice tripod or better yet a NastyClamp
  • Big memory card is a good choice for this project

Get Some Out Of This World Software:

  • CHDK – a wonderful piece of alternate Canon firmware that allows you to so some camera magic
  • OMNI Intervalometer 3 – a script that will run an intervalometer scripts on your camera
  • CardTricks – I am so glad someone came up with this one – it automates the process of loading your Canon with the CHDK firmware
  • StereoData Maker – A great utility if your SD card has more than 4 Gigs on it (well, it actually does a whole lot more, but we are just going to use it to switch partitions on the 8 Gigs card). Download here.
  • FFmpeg – The utility I used to stitch all the stills into one single movie (almost an entire day squeezed into one minute)
  • Irfanview – FFmpeg needs to accept the single image files in a certain format, I used irfanview to rename the files, but any other renaming utility (even batch scripting) will also do.

2. Plan

Location

One of the nice things about a time lapse video is the contrast between static moving objects. This is why camera position has to be planned.

Try to select a spot (and framing) that will show some static objects and some moving ones. If you can combine between fast moving objects and slow moving objects, it is even better.

Of course all the “regular compositional rules” still apply here, so framing, thirds, foreground and background all play a part.

Size and time gap – Next thing to plan is how to take the images. Remember, you are limited both in battery life and in memory card size. Try using the smallest file you can live with pixel-wise.

As a thumb rule, it is better to take a medium sized image at best quality than a bigger sized medium quality image.

Size and Intervals

Now some math – How long do you want your final time lapse movie to be? Regular movies run at 25 frames a second. That means that every 25 pictures you take will make one second on your final movie.

Now, how long is the event that you are shooting and how long do you want the movie to be? Those parameters will define the interval between the pictures you want to take. The thumb rule is to divide the duration of the event in minutes in the duration of the final film in seconds and multiply by 2.4 – this is the interval in seconds that you want to set your intervalometer to.

For example, to record a 3.5 hours event as a minute and a half movie, we will do the following math: 3.5 hours is 210 minutes, and 1.5 minutes are 90 seconds. So 210/90*2.4 = 5.6 seconds. So set your CHDK script/intervalometer to 5.6 seconds. This also tells you that you need 2250 frames (210 minutes * 60 seconds a minute / 5.6 seconds interval). If each image is 1 meg, you’ll need approximately 2.5 Gigs if flash card to store the event.

3. Take The Shots

Mount your camera

After planning where you want the camera to be, you’ll need to place it. A tripod is a good option, however for my setup a NastyClamp worked better, I needed something that will not stand in that and that I can tack high at the corner of the room.

Camera Settings

I recommend setting your camera on aperture priority, this will take care of changing light and adjust shutter speed if light is falling to low.

Setting & Running the CHDK script – (skip this if you use a dedicated intervalometer)

1. Load the interleacometer3 script and make the following settings:

2. Make sure you mark CHDK not to save RAW files – space is definitely an issue with long movies.

3. Set the time interval to whatever your calculations tell you (setting the interval takes a bit of getting used to, just like in second grade you do s1/10s of seconds, seconds and 10s of second separately. Now you are almost ready to start recording.


Battery Saving

This is a big issue – if you want to run for a long time, you’ll need every bit of battery you can master. For this I switched of the “live view” of the G9 screen and the postview after each shot. The screen is one of the major battery consumers. Luckily CHDK also let you know the status of your battery, so you know to replace it if you see that it is too low.

Shoot Away

Now it is time to shoot. I like to keep the artificial shutter-click sound. Firstly, it gives some museum/art feeling to the whole production. More importantly, it provides constant feedback that your camera is working – battery is not depleted and memory card is not full.

4. Prepare For Video

This part is easy – all you need to do is rename the images so FFmpeg can accept them. FFmpeg needs your pictures to be named with names like my_image_0001, my_image_0002, my_image_0003 and so on. I used irfanview’s great batch name conversion for this (see download links at the top of the post):

Open the first image and press B to enter batch mode. Select “Batch Rename” and on the “name pattern” box type “img_####”. Make sure you designate a new folder for the output. Then select all the images in the shootout folder and click “Start Batch” – after a few seconds, you’ll have a new folder with your images named in the correct sequence.

ifranview renam settings

5. Create The Video

I used a freeware called FFmpeg – it takes a bit of geeky black window typing dos command magic, but it is super fast, has tons of options and is very simple to operate on the basic level.

Once you have the images named correctly, use the following command: ffmpeg -f image2 -i img_%04d.jpg my_new_video.mpg.

See above what I got from combining all the images from the moving day. (There are several “interesting” frames planted on the video, see if you can spot them.

I am the dude with the green T who looks like he doesn’t have a clue.

  • lImbus

    by now, you can drop the IrfanView renaming-step: ffmpeg allows the %* wildcard in the filename, so that you can specify your files with IMG_%*.JPG and it will take all of them. I think that’s the easiest way to go.

    There is another option, that would be to keep doing it with %04d still, but specify with which index you want to start the procedure:
    -start_number 1234 so then it would start with IMG_1234.JPG, but I still like the %*, it’s easier.

    ~manuel