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 is still not ported to CHDK. So, until the G10 has CHDK support, use an older canon camera.
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.
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.
Get the DIYP greatness via RSS, newsletter and Twitter
Connect with the community: Facebook Page, Discussions
Share Ideas, Setups, Images and Projects on DIYP's Flickr, visit Readers Photos











Comments
Alternative - intervalometer
Just as an alternative to an intervalometer you can connect your Canon to a laptop and use either the EOS Utility or Breezesys DSLR Remote
If a laptop is not available I got myself a 5 meter USB cable. Worked a treat around my desktop.
ffmpeg -f image2 -i img_%04d.jpg my_new_video.mpg.
where do you type this command ffmpeg -f image2 -i img_%04d.jpg my_new_video.mpg. ? when i click on the dos like window and type- nothing happens.
re: location
You need to "cd" to the dicrectory where the binary is located or type something like
c:\downloads\ffmpeg\ffmpeg -f image2 -i img_%04d.jpg my_new_video.mpg
ffmpeg error
Im getting the following error when using ffmpeg 'incompatible pixel format 'yuvj422p' for codec 'mpeg1video''
Im a total noob at this but my father is a bit of a pro and even he was struggling. Any ideas?
re: alternative
Hi Laddie,
Thanks for pointing out the USB option. We are so hooked on wireless those days that we sometimes forget that electricity do run in wires :)
I know thereĀ there is a cheap iPhone app for that and also some freeware if yo'd like to use an alternative to Canon/Nikon software.
cool.
I'll be using this, I just bought a dedicated timer remote for my DSLR. I'm hoping to do a HDR time lapse. Thanks for the info.
Sweet!
Thanks for the detailed post. Good stuff.
your new flat seems recognizable
Israel ? ... natanya ? .. new projects ? ...
Kiryat - ha sharon ?
sorry if all those world mean nothing to you ...
nice effort
My old Canon G5 has build-in intervalometer, so if delay in 1min. is enough, it can be used. I did some research on this, delay can be decreased to approx. 10sec. in tethered mode (with PC).
Many DSLR (such as Nikon D200,D300) has built-in time lapse function, so no tricks with CHDK are necessary. I played a bit with it:
http://www.youtube.com/watch?v=fyOEdLw-qMg&feature=player_embedded
I used mencoder for stitching shots.
for streaming video you can
for streaming video you can also use Jpeg video http://www.snapfiles.com/get/jpgvideo.html
re: location, freewares and
@greg - HDR timelapse - sounds like a riot. guess you'll be using a huge flash card. I'd be grateful if you dropped a note once you tried it.
@dima - old: Givataim, New: Givat Brener - guess it does sound like gibberish :)
@lonelyhome - built in intervalometer is coolness. loved your vid and thanks for the mencoder tip.
@Surfcanarias - thanks for the jpegfiles tip. it may be anice option for those who don't like to play with dos commands (then again anybody who toyed around with CHDK would probably not mind a few dos lines)
Did something Similar
I just did something similar in the past few days. I made a time lapse with my rebel t1i. There were a lot more steps in making my video though because I was making an HDR version. I shot my photos in RAW using canon's regular remote. (This is a great way to shoot time lapse since the camera will fire off a burst of 8 frames and then while the buffer is full it will wait 1 second between images.)
So I wound up with tons of RAW's to work with. Here's how it all went:
Convert RAW's to HDR's in photomatix
Tone map HDR's to jpegs in photomatix
Batch crop the jpegs to 16:9 using Canon Digital Photo Professional
Reduce the resolution to 1920x1080 using picasa
Create a time lapse AVI file using Quicktime.
-----I could stop here and have a time lapse video in 1080p--------
In order to make my video smoother:
The quicktime video used 12 frames per second.
I used after effects to smooth this outto 24 frames per second
Then I converted the video to an AVI at 720p using adobe media encoder
http://www.youtube.com/watch?v=hl-NjD3JKIs
re: HDR Time Lapse
This is nice, bringing the vividness of HDR to life with some movement. I wonder how big was the mem card to create this 16 seconds vid?
re: memory card
Because of each RAW being 20MB on the t1i, the files for this vid took up about 4GB. This vid used 189 images. I had shot over 800 images on the 16gb card I was using, but I was getting impatient with the processing and just used the first 189 images.
If I had used a lower resolution camera (like my rebel xs) I could have gotten about 1600 RAW's on the 16gb card and made a 2min 15 sec video.
how do I set up the T1i for Time Lapse
I just purchased a Canon T1i and I do not see any settings for time lapse and I do not see any mention of this in the user manual.
Can you expain how I need to set up the Canon T1i camera to do this?
Canon G10 Not Supported by CHDK
I just want to note that the Canon G10 you mention in the article is not supported by CHDK at this time.
http://chdk.wikia.com/wiki/G10
re: G10
Thanks for the catch.
I used a G9 for this and assumed that the G10 has support from CHDK. will update in the post.
Thank
This is really good. I had this blog in my favorite. I will read it more carefully at home. Thanks for the post !
Beware killing your shutter
If you're using a digital still camera to capture frames for time lapse, keep in mind that these things have a much shorter per-frame lifespan than a traditional video camera. For example, the Canon xxD-series DSLRs have shutters rated for about 100,000 frames or less, before you have to send them in for repair (at your expense). At 25 frames per second on a time lapse movie, this is just over an hour's worth of time-lapse output. Looking at it another way, if you used your Canon 40D to "film" an event that generated a 2-minute time lapse, you just chewed up 3% of your shutter's lifespan.
I wasn't able to dig up any shutter life data on the point-and-shoots. I suspect they're probably longer, due to the simpler mechanical action involved - but they're also likely not "built as tough" as their DSLR bigger brothers.
I would suggest that if your real-time event is going to be 2-3 hours or less, it would be a much better idea to shoot the thing in video, then use your favorite video editor (e.g. Windows Movie Maker, which is free) to speed the playback up the appropriate percent. Even if you have to swap tapes in the camcorder a couple times, you don't really notice this in the time-lapse playback, especially if you set a timer during the real-time event, so you can be ready to swap tapes quickly.
I've done time lapse both ways, and the workflow doing it via video was smoother for me.
If your real-time event is something much longer - flowers growing, building construction, etc. then obviously you're in the realm of the traditional camera - in addition to an external power source with UPS protection and a good intervalometer.
timelapse
try Virtualdub it is easier to find and down load and use ... and it has a lot of plug-ins to fix various things that may happen... it works for me ... and it is free as well...
kd7
If you want a bash script to format with FFmpeg, I wrote one
Hey,
I recently did something similar only with star movements.
I wrote the bash script that is needed to format stuff for FFmpeg. Note through that since you used over 1000 photos, that you might need to change a '3' there to a '4', so you wile get 0001 etc.
Anyway, Here is a link, scroll down for the bash script
re: bash script
haha! we are taking over the world :) I knew this post has a potential for scripts comments. Thanks for sharing it.
Timelapse
My canon S80 has a built in intervalometer, it's a bit limited though.
I put together the movies in Picasa, dead easy. select images, click create movie, in transition type select time lapse, set duration, Done.
here's one of my efforts,
http://www.youtube.com/watch?v=edl6pAGC_ms
My Attempt
Thanks for the great steps. I also found that JPGVideo is a better choice than ffmpeg. It has some good options, requires no command line, is light and easy, and doesn't require file renaming. Let me know what you think of my first attempt. Should have let it run longer into the night since I like the end quite a bit:
Madison Valley Time Lapse
Time-Lapse
Great post! I've been wondering about "In-Camera TL" for sometime now, and this CHDK stuff looks real cool! I started out in photochemical, (S8mm & 16mm). My first intervelometer was a modified intermittent windshield wiper delay I bought at an auto supply place in the 1970s for US$10 or so. My "cable release" was a mini-phone jack so it was a simple process to rig up this unit. Ran for weeks on a single 9v battery! Intervals however were limited between 2 and 20 seconds. Shot Mt. St. Helens erupting in 1980, (the "warm ups," not main event on 5/18).
Now that I'm fully digital, I make use of the Canon RemoteCapture application that came with my cameras. Also limited in range from basically 5 seconds up, (in bright light). I've already burned through an A60 and A70, and after reading about "Total Shutter Snaps" (above) I wonder if that was the cause. Although I have friends with the same and similar models that died in a similar way, and they were not used for time-lapse.
The nice thing about Canon's RC app is it also allows for time-lapse time exposures. I have shot several sequences like this: Mars at opposition, Lunar Eclipse, night-time traffic scenes, etc. And of course, I've done a number of HD TL too. I have HD frame cropping actions preconfigured for PhotoShop.
For shorter intervals, (1 to 5 seconds) I use a shareware app called "RBCapture" that for $29.00 allows for interval image capture with any Windows-recognized web cam. I use a 640x480 Intel Webcam with great results. Works great for crowds - Parades, events, etc.
Examples on my Website's "YouTube Demo Reel."
Gus Frederick
Silverton, OR
HDR Time-lapse
This a great article. Especially the HDR idea.
I'd like to try out HDR time-lapse. Is there any way of automating the HDR workflow?
I mean, if you want a 10 second time-lapse sequence, you need 250 frames (at 25 fps). Let's, for the sake of simplicity, assume that the HDR will be made from 3 bracketed shots. We'll need 750 frames. The first 3 bracketed frames will make the first HDR frame of the sequence and this process will need to be repeated 250 times. So, do you do this manually, or is there a way of automating the process?
Regards
Behzad
Stormwarnings
I've arrived here after browsing and searching for lapsed time. Back in 2004 I started researching a timelapse project which was planned to last a year of daylight. Initially I used a Canon A95 usb'd to a stripped down Powermac 8600. Once I'd worked out the pitfalls and problems I started for real on 21st Dec 2004 with a Canon D60 hooked to 8600 running Canon's Remote Capture. One shot/minute continuously at hiRez jpg. Every evening I download the 1400 or so shots and burn them to CD. I used Final Cut to make my movies. Around March I broke my first DSLR. I replaced it only to have that break in July. I had no more cash and an unmendable gap in my movie. At this point I had to give up.
I recently posted 'one day' on YouTube after using some of the stills for a graphics project. - I thought you might be interested.
http://www.youtube.com/watch?v=xyRGOYmsrI8
re: Stormwarnings
Hmm..
first let me say I love the video, so calming.
Second, your story verifies the fears of some on the group regarding how the shutter would react to extreme clicking, thanks for sharing this.
Thanks so much!
Just wanted to say thanks so much for this amazing post! I finally finished a time-lapse video for our residential solar installation and I never would have been able to do it without the information in here. Here's the link to the movie:
http://www.youtube.com/watch?v=EgioTgNZvlg
It was shot with a Canon Power Shot SD1100 and I used Picasa (free and easy!) to actually piece all the pics together. I added the few stills at the beginning at the end and the music in iMovie, although Picasa does have an option to load an audio file in there as well. I plan to make a longer version that includes some of the still images we took with our DSLR when I have a chance.
Anyway, thanks again!!
Rachel
advice
Thanks for the post. I was all pysched to finally get some time-lapse software; I've been meaning to do this for a while but was always put off by how difficult it was to obtain the software. I've looked through the CHDK websites, downloaded the right program for my camera and skimmed through the instructions but it all still seems ultra confusing and difficult to me. I consider myself fairly adept with computers, software and all that but I'm no guru. Still, I haven't been able to make any headway. Can you or anyone else recommend time lapse software that is super quick and easy to download. I don't care if I have to pay for it at this point. Thanks!
Battery Life
How many times did you have to swap the batteries? I'm guessing the delay caused by doing that isn't noticable in the end?
Andy
re: Battery
Actully, the nonly battery change I did was while we were driving :) so it was one bat for the packing and one bat for the unpacking
Time-lapse
If you have an older Olympus camera you may be able to use this one sebectec.com The software can also do the time-lapse on a sequence of saved images using a front end to mencoder.
Great time lapse
Hello
Great time lapse but they can really burn the shutter of your DSLR. Do you know any software out there that you can create a time lapse from using an AVI file?
I have this very cheap camcorder that is better than burning up my very expensive dslr.
Really geek toy
I wrote a little utility in python for manipulating images from a timelapse sequence: http://sites.google.com/site/timelapsepy/home
Ideas: give it a number of frames, tell it how many you want out. It'll calculate all the intermediate frames at regular intervals, interpolating between images given where need be. More interesting, it allows you to attach values for blurriness, gamma tweaks and mask images at various times (or to specific frames) throughout the stream, and to apply a given colour-mapping transformation (like Photoshop's curves control) across the whole lot...
re: timelapse ans python
Hi Tim,
This looks awesome. I am a a TCL/TK peson myself :) i looked at the site and could not find any visual samples, are there any? It looks too good not to have those
udi
tcl/tk? Crumbs. Notably no
tcl/tk? Crumbs.
Notably no GUI in my world. And I owe the site and codebase a bit of an update, too - I've added image-stacking to the list of utilities (took less time to write that than to boil the potatoes for dinner).
There's an examples page though: http://sites.google.com/site/timelapsepy/examples and any of the timelapse videos on my site have been generated via the script.
#!/bin/bash #This is a shell
#!/bin/bash
#This is a shell script to take in all *.JPG files and
# rename them to be IMG_0001.JPG, IMG_0002.JPG...
# And also run the ffmpeg command after the rename
#set count to 0
count=0
# for each *.JPG file
for file in *.JPG
do
#count +1
count=`expr $count + 1`
#set the variable temp to have the format 0001,0002,0003
printf -v temp "%04d" "$count"
#echo the move command
echo mv $file IMG_$temp.JPG
#execute the move command
mv $file IMG_$temp.JPG
done
# create an ffmpeg vid
ffmpeg -r 1 -f image2 -i IMG_%04d.JPG -r 20 new-vid1.mpg
Right, I'm an idiot. I
Right, I'm an idiot. I managed to get the CHDK onto my SD card and I'm now attempting to alter the script to run on my Canon G9. I would like to take 1 photo every 30 seconds but after altering the script and putting it in the correct folder on my SD I do not know where to go from there. What setting should my camera be on?? I can't find any mention of an intervalometer in the menus?? Please help this idiot out
Cheers
Hi! I'm sorry but I am really
Hi!
I'm sorry but I am really not good in this type of things. Could you please help me?
I am looking for some sort of programme which I can install on my laptop. Because I am doing an experiment and I have to make photographs of it. I want one picture every 15 minutes. And this one weekend long (whithout any interuption). I thought I could download a programme on my computer and maby make the pictures with a webcame? or is this a really stupid idea? and wich programme is the best?
I really really really hope you can help me! thanks!
Is it possible to use this
Is it possible to use this software on samsung or olympus cameras?
Making a video from real-time frames
Hi,
I am trying to make a video from fixed number of frames.
But these are called randomly depending upon my input.
Example: i have a fixed set of images. i have to create a video from these images (video length = 3hr) and the sequence in which images will be called is decided by my input. (i.e. continous random input for 3 hrs).
Post new comment