So I’ve got a Canon 400D (aka rebel & XIi) camera and love to tinker with it.

I wanted to take a series of photo’s over the course of a few hours in order to allow me to create a time-lapse video. Unfortunately the camera had no in built functionality to do this. My next idea was that the remote shutter release could be hacked up using an arduino in order to fire off shutter, this has been done before but being a software guy I thought it would make sense to do a bit of research first.

I stumbled onto this site here; 400plus! It’s a hacked up firmware for specifically this model of camera that introduce plenty of new functionality:

Configurable AutoISO and Safety Shift for creative modes.
RAW file format output for auto modes.
Extended long-exposure BULB mode: up to 100 minutes.
Extended AEB capabilities: up to 9 bracketed shots and 32 minute long exposures, with configurable direction.
Also, flash-based and ISO-based AEB scripts.
Up to 9 presets (complete snapshots of all settings and parameters) quickly accessible.
Scripting support: an intervalometer, a self-timer, and a touch-less trigger.
Other usefult utilities, like a depth-of-field and hyperfocal calculator, or a time-lapse calculator.
View and change the ISO while looking through the viewfinder.
Ability to reconfigure some buttons.
Extended AF patterns.

Bingo, time lapse is supported!

Installation requires the latest Canon firmware and modification of the headers of the Compact flash card.

As each time you format the card you loose the hack so I decided to make a little block of code that would re modify the headers for me:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
phillips321@KubuntuDesktop:~$ cat cardheaders.sh
#!/bin/bash
if [ `echo -n $USER` != "root" ]
then
        echo "MESSAGE: `basename ${0}`"
        echo "MESSAGE: ERROR: Please run as root!"
        exit 1
fi
if [ -z ${1} ]
then
        echo "MESSAGE: Usage: `basename ${0}` [device]"
        echo "MESSAGE: # `basename ${0}` /dev/sdg1"
        exit 1
fi
dev=${1}
echo EOS_DEVELOP | dd of="$dev" bs=1 seek=71 count=11
echo BOOTDISK | dd of="$dev" bs=1 seek=92 count=8
exit 0

After following the hack instructions I decided to have a go.

I set the camera to take a series of shots every 5 seconds for as long as it would go on before the battery died. Remember to set the camera to fixed focus and fixed aperture, also drop the image size to Small as it doesn’t need to be bigger than 1920×1080 as that’s what our video output will be.

Wait for hours until you’ve captured the desired amount of time.

Once finished import the photo’s onto your PC and step in mencoder; this powerful tool can be used with one short and simple line:

1
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=3 -vf scale=1920:1080 -mf type=jpeg:fps=30 mf://*.JPG -o output.avi

or to do it in ffmpeg:

1
ffmpeg -f image2 -r 24 -start_number 3575 -s 1920x1080 -i IMG_%04d.JPG out.mp4

Here are my results (view on YouTube for thier full 1080p glory!):

Wonder what I can time-lapse next?

P.s. If anyone knows how to prevent the camera from changing the exposure too much between each shot that would be great to know… it causes the video the almost ‘flash’ a little.

Leave a Reply