Resman says hi.

Timelapse with CHDK and Avisynth

Table of contents

A timelapse is an animation technique that consists in shooting frames at a certain speed and playing them back much faster, giving a greatly accelerated video effect. This allows to see happen in a few seconds phenomenon that normaly take hours, days, or months. It's great fun to watch, and with a little equipment and some patience, it can be quite easy to make your own.

I wanted to use only my point and shoot camera to take the shoots and free software to do the processing on the computer. I used a Canon Digital IXUS 750 (also known as SD550) camera with the CHDK firmware.

Setting up the camera

Timelapse script

You need a camera capable of taking shots at periodic, programmable intervals to take the pictures. Most newer, higher-end cameras have the feature built-in, but you can do it too with a low-end Canon camera provided you install the CHDK firmware. It doesn't actually modify the firmware of the camera, so there is no risk to "brick" your camera and you can go back to the original firmware at any time.

A great feature of CHDK is that it can interpret BASIC or LUA script directly, which allows to completely automate the camera and add features normally only available on the higher-end models. I made a simple LUA script to take pictures at regular intervals. You can copy it below, and save it as timelapse.lua on your memory card (put it in the /CHDK/SCRIPTS/ directory). I only tested it with my Canon IXUS 750, and some features are not available, or behave differently on different cameras, so some tweaking may be in order. However for the most part it should be the same :

@title Time Lapse
@param n Number of frames
@default n 0
@param m Number of frames x100
@default m 1
@param i Interval in seconds
@default i 5
@param d Delay before start
@default d 3
@param r Refocus each frame (1=yes)
@default r 0
totalFrames = (n > 0 and n or 0) + (m > 0 and m or 0) * 100
interval = i > 0 and i*1000 or 1000;
delay = d > 0 and d*1000 or 0;
refocus = r == 1 and true or false
print( "Shooting "..totalFrames.." frames every "..(interval/1000).."s for "..(totalFrames*interval/1000).."s." )
if delay > 0 then
  print( "Starting in "..(delay/1000).."s" );
  sleep( delay )
if not refocus then
  press( "shoot_half" )
  sleep( 2000 ) -- Allow a little time to focus
nextTick = get_tick_count() + interval
for i = 1, totalFrames do
  print( "Frame "..i.."/"..totalFrames )
  if refocus then
    press( "shoot_half" )
    sleep( 2000 )
  click( "shoot_full" )
  if refocus then
    release( "shoot_half" )
  sleep( nextTick - get_tick_count() )
  nextTick = nextTick + interval
if not refocus then
  release( "shoot_half" )

The script parameters are :

Launching the script

Example configuration :

Sample configuration
Take 10 000 shots (in other words, take pictures until the memory card is full, or until I decide to stop) at 2s intervals, wait 5s before start, don't refocus each frame.

You can then start the script :

Starting the script
You'll get a quick estimate of the total time and the shooting will start.

Image processing

Once the script ends, you'll hopefuly end up with a few thousand pictures. Now you need to process them into a movie. First copy everything in a temporary folder on your hard drive.

Writing the Avisynth script

Avistynth is a very nice piece of software with allows to process videos through text scripts. It's extremely powerful, but the particular feature we're interested in is that it can use images as a video source.

If you've got a Canon camera like me you should have a directory structure with each directory containing a couple thousand pictures. Assuming you put the pictures in "e:/tmp/lapse/images/", here's what the Avisynth script could look like :

ImageSource(file = "e:/tmp/lapse/images/123CANON/IMG_%04d.jpg", start = 2001, end = 4000, fps = 30) +\
ImageSource(file = "e:/tmp/lapse/images/124CANON/IMG_%04d.jpg", start = 4001, end = 6000, fps = 30) +\
ImageSource(file = "e:/tmp/lapse/images/125CANON/IMG_%04d.jpg", start = 6001, end = 7000, fps = 30)
# If you wish, you can also resize the images at this step.
LanczosResize(800, 600)
# You can crop too. Make sure the final dimensions are multiples of 8.
# This last step is needed to make sure the image data is in a format friendly to the encoder.

Since I'm lazy I made a small Python script to create the ImageSource part of the Avisynth script for me. It's pretty much a hack and works only if the images are named IMG_1234.jpg like on my camera. I'm not quite fluent in Python either, but it works. Change the path as needed :
import os
base = "e:/tmp/lapse/images"
folders = sorted(os.listdir(base))
for f in range(len(folders)):
   images = sorted(os.listdir(base+"/"+folders[f]))
   start = images[0][4:8]
   end = images[-1][4:8]
   print( "ImageSource(file = \""+base+"/"+folders[f]+"/"+"IMG_%04d.jpg\", start = "+start+", end = "+end+", fps = 30)", f!=len(folders)-1 and "+\\" or "" );

Video encoding with MeGUI

Avisynth does the frame processing, but not the actual encoding. The last tool we'll need for this last step is MeGUI. It's a very complete x264 encoding suite, and is intended to work with Avisynth scripts. Launch the tool and load our script :

MeGUI main window

Choose encoding settings suitable to your source images and the final video quality. There are many presets built-in but you can make your own if you want. Next click the "Enqueue" Button, and click on the "Queue" tab :

MeGUI jobs

I chose a 2-pass encoding so there are 2 jobs. Now click start to launch the jobs. A progress window will pop up and after a while the final video will be generated.

Troubleshooting : if the job ends immediately with an error check the following :

Final results

Here is a sample video I made. Number of frames : 5000 (2s interval). Speedup factor : 60 (30 fps). Location : Paris, over the Parc Montsouris. Shoot date : 2009-06-11.

You can download the video files directly below :


Comment left by dabona on 2021-01-16 09:08:35 :
Mayweather vs. Paul will be the first fight promoted, produced and distributed exclusively on Fanmio Boxing. How do You Stream Logan Paul Fight
Comment left by John on 2021-01-14 12:37:11 :
I'm really amazed by how you make simple gadget extra-ordinary. Let me try this soon since I have the same exact old camera that you have on your post. Thank you for sharing this info. Also, if you're a resident of El Paso, TX, searching for a technician to fix your broken appliances, I'd recommend you check this affordable, most efficient appliance repair service.
Comment left by Lesly Jacks on 2021-01-14 07:05:13 :
Terrific post, I’ve bookmarked this site so hopefully I will discover much more on this topic in the foreseeable future. Anyways, looking for dry wall repair? Contact Drywall bend and also visit their website to know more of their services.
Comment left by Dubai Escorts on 2021-01-11 07:35:44 :
I love to read this post it is really amazing here is good information for me thanks for this.

Dubai Escorts
Comment left by MUNEER on 2021-01-09 12:07:51 :
Extremely intriguing online journal. A lot of web journals I see nowadays don't generally give anything that I'm keen on, however I'm most definitely inspired by this one. Recently felt that I would post and let you know.
Comment left by asdasd on 2021-01-05 13:05:38 :
Much appreciated such a great amount for this data. I need to tell you I agree on a few of the focuses you make here and others might require some further survey, however I can see your perspective. Disposable nitrile gloves
Comment left by Carmie on 2021-01-02 20:25:52 :
You are a life savior!

Residential Plumbing
Comment left by Julio Cortes on 2021-01-02 17:50:04 :
Mes cigares à 12 balles maintenant.
Ces ignobles pourris n'ont même pas honte.
Comment left by Robert Dixon on 2020-12-30 11:56:05 :
I never thought that an old digital camera can do a time-lapse like what you have shown here. Let me try this one of these days. I just have to look for the old canon camera that I have which I forgot where I hid it. Anyway, thank you for sharing this, and also feel free to visit if you need the best carpet cleaning service in El Paso, TX.
Comment left by thomas on 2020-12-28 18:32:02 :
International economics drops under the sounding macroeconomics and is the term coined to specify the economic relationship between two or more states; that impression the global GDP (Gross Domestic Product) and also GNP (Gross National Product) produced annually.
By: College Economics Homework Help
Comment left by Caitlyn on 2020-12-28 16:45:20 :
My head instantly aches when I see codes.

Large Dumpster Rental
Comment left by Johnny on 2020-12-28 16:40:32 :
What is that at the top of your post? It says Error was encountered.

Junk Removal in St Louis
Comment left by Audrey on 2020-12-28 16:31:51 :
This is amazing! I never thought of this before.

Moving Company
Comment left by JOHNNY on 2020-12-25 20:04:04 :
I know that shooting some frames is always difficult without the assistance of best professional resume writers because they can help you in hiring a good technical or video making specialist, who will be able to make a good timelapse.
Comment left by HVAC repair companies on 2020-12-25 11:27:35 :
I am really happy to say it’s an interesting post to read. I learn new information from your article, you are doing a great job. Keep it up
HVAC repair companies
Comment left by DCOX AMUSEMENTS on 2020-12-25 11:14:06 :
Really very happy to say, your post is very interesting to read. I never stop myself to say something about it.You’re doing a great job.Keep it up
Comment left by commercial property on 2020-12-25 09:07:36 :
Commenting on a blog is an art. Good comments create relations. You’re doing great work. Keep it up.
commercial property
Comment left by how to break the too busy cycle on 2020-12-25 08:56:16 :
very interesting, good job and thanks for sharing such a good blog.
how to break the too busy cycle
Comment left by asdasd on 2020-12-24 08:48:19 :
Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing Medical Mask
Comment left by roos moens on 2020-12-17 15:51:30 :
That’s a nice article, thank you for a great article. It helped me a lot. Keep it up Must Visit netflix klantendienst
Comment left by muneer on 2020-12-17 09:55:25 :
Extraordinary things you've generally imparted to us. Simply continue written work this sort of posts.The time which was squandered in going for educational cost now it can be utilized for studies.Thanks study organization tips
Comment left by garry harrell on 2020-12-15 13:08:07 :
Awesome post, thank you very much for taking the time to do this.
Comment left by netflix support netherland on 2020-12-11 18:21:39 :
Thanks for sharing it is important for me. I also searched for that from here. Visit our site google bellen
Comment left by Contacto Bullguard on 2020-12-10 19:46:30 :
That’s a nice article, thank you for a great article. It helped me a lot. Keep it up Must Visit Contacto Bullguard Espana
Comment left by manny on 2020-12-10 15:12:58 :
learned alot :D
Comment left by manny on 2020-12-10 15:12:21 :
learned alot :D
Comment left by raf on 2020-12-10 12:54:04 :
thanks for this
Comment left by kim on 2020-12-10 12:11:25 :
any recent updates?
Comment left by Sara Fritz on 2020-12-06 23:41:49 :
You completed a few fine points there. I did a search on the matter and found nearly all persons will consent with your blog.
Comment left by netflix support netherland on 2020-12-06 05:49:28 :
hi, your post is very helpful for me. Finally, I found exactly what i want. If you need information regarding Netflix then you can visit our site netflix ondersteuningsnummer
Comment left by roman davis on 2020-12-05 09:00:46 :
This is very useful news about setting the camera but I do not want to more information about setting because I am writing the assignments for the students of buy dissertation online
Comment left by Hammond on 2020-12-03 17:45:02 : I love it!!!
Comment left by Gabriela E. Hammond on 2020-12-03 17:42:23 : Awesome!!!
Comment left by Gabriela E. Hammond on 2020-12-03 16:14:06 : I love it!!!
Comment left by Hammond on 2020-12-03 15:29:43 : Very nice!!!
Comment left by DouglasMRafferty on 2020-11-30 06:37:54 :
I am going to bookmark this website for future updates.
Comment left by Mark MacAndrews on 2020-11-28 09:34:19 :
Finalement, j'aimais bien mon squelette de Renescure.
C'était encore le bon temps de rouler en microjupe noire, même pour aller acheter des cigares à 9 balles cinquante.
Comment left by Lesly Jacks on 2020-11-26 02:15:43 :
Simply, admirable what you have done here. Thanks for sharing..

Lesly Jacks
Comment left by Hanny Meens on 2020-11-25 12:13:38 :
Your blog is very informative and interesting to read, finally, I found exactly what I searching for. There are lots of users of Macfee antivirus in the world because of its features and easy interface. If you want to explore more interesting facts about Mcafee antivirus or want to resolve your technical issues then must visit Mcafee nummer.
Comment left by Jaclyn Tibben on 2020-11-25 10:34:51 :
Your blog is very informative, finally, I found exactly what I want. Paypal is an excellent service for online payments but lots of its users confront issues while they access Paypal. If you want to resolve your problems then must visit Paypal klantenservice.
Comment left by Thalia on 2020-11-25 08:04:11 :
I've recently installed CHDK on my old Canon PowerShot A530 and the first thing I did was to make a time-lapse video of the scene outside the window next to my computer, using the default intervalometer. I tried different intervals and found that 10 sec (6 fps) was optimal to catch cloud movement. In the resulting video I made, using AviSynth, a frame rate of 6 fps was too slow but 12 fps was to my liking. The video was choppy so I learned how to smooth it out. I found just the right plug-in for the job, AviSynth MSU Frame Rate Conversion Filter . There are others but none of them is as easy-to-use or as flexible as this one. Kitchens Auckland
Comment left by liam john on 2020-11-23 15:24:39 :
Winters seem even cozier with the idea of a Shearling Jacket. The warm material that they are made of and the softest fur that they have given the wearer a super-chic appearance even when they are covered up in multiple layers.
Comment left by lawrence romero on 2020-11-23 15:22:34 :
There is no better option to pay tributes to your favorite superheroes than to gear up in the Super Heroes Jackets. J4Jacket has collected a wide variety of jackets from different worlds of superheroes and compiled them in a collection for all the real-world superheroes.
Comment left by William Simons on 2020-11-19 08:57:47 :
What a great set-up. The outcome of the timelapse is so amazing. Why I haven't tried this one before. Anyway, thank you for sharing, and please drop by at in case you have fencing requirements in Avondale, Arizona.
Comment left by hyman barnes on 2020-11-18 08:28:36 :
I feel like I know the basics of python very well but I don't know how to progress from here.
Comment left by applications in electrical on 2020-11-18 03:07:05 :
Similar applications used in
Comment left by emad ahmed on 2020-11-16 23:25:32 :
very good post.
لعبة من سيربح المليون
لعبة جاتا
صب واي سيرفرس
العاب كلاش
Comment left by mariya on 2020-11-10 12:01:40 :
thanks good to know this.
Comment left by alisha on 2020-11-08 18:24:32 :
Hi your post is really appreciatable.I really thankful for this post. Here i would llike to share some information about facebook. As we know that facebook is a social trap where we connect with people in all over world. So if you are using facebook and face any technical issue that time so just visit our website. We can resolve the smallest problem on same time. For further information please visit on our website- facebook bellen belgie
Comment left by Annelous on 2020-11-08 11:37:35 :
Hi thankyou for this great helpful information.this information is really useful at today's had easily explained whole information in a short note. Now i would like to share some information about PayPal.So If you are a Paypal user and you are facing any problem regarding to PayPal. No need to worry just simply visit on our site- paypal klantenservice belgie
Comment left by charlly korpa on 2020-11-06 16:44:46 :
This is a nice forum from which I am getting precious coding advice. This one is also very useful and I tried it and worked for me. I am so happy when I run a code of yours.
Comment left by ji on 2020-11-06 14:18:06 :
[create debates!](
Comment left by Michel Gerfaut on 2020-11-01 17:55:09 :
V'là ti pas qu'il faut se cacher pour promener en microjupe maintenant.
Comment left by samantha on 2020-10-29 13:30:54 :
had fun reading your articles. I will recommend this to my friends.
Comment left by muneer ahmed on 2020-10-29 12:25:35 :
Excellent article plus its information and I positively bookmark to this site because here accident attorney car virginia west I always get an amazing knowledge as I expect. Thanks for this to share with us
Comment left by Looney Hans on 2020-10-27 08:27:10 :
glad i found this site!! i learned alot. will recommend it to my friends
Comment left by Morel on 2020-10-24 17:32:18 :
Je suis Monsieur Morel, l'homme au chapeau d'acier.
J'ai un stock impressionnant de microjupes Kaiki, ces articles ont été peu portés, mais sont bien aérés.
Faire offre, différentes couleurs disponibles.
Comment left by Ned Diamond on 2020-10-23 11:55:31 :
Vive les microjupes.
Comment left by Sophie Miller on 2020-10-20 18:51:29 :
Comment left by Sophie Miller on 2020-10-20 18:51:00 :
Je vous remercie de l'information! Je cherchais et ne pouvait pas trouver. Vous me aidé! [URL=]convert currency[/URL]
Comment left by Sophie Miller on 2020-10-20 18:50:29 :
Je vous remercie de l'information! Je cherchais et ne pouvait pas trouver. Vous me aidé! convert currency
Comment left by David Winget on 2020-10-19 12:53:22 :
I have gone through this article named 'Timelapse with CHDK and Avisynth'. The article was informative and interesting. The author explained by using examples so we can easily follow it. Thank you so much for sharing this article. CBD Edibles
Comment left by Hunter on 2020-10-07 12:25:20 :
designed to remove luminosity flicker in time lapse photography. Unlike most other flicker removal filters, utilizes cumulative distribution function in addition to average frame luminosity. kitchen renovations manukau
Comment left by Wayne Ogilvie on 2020-10-07 07:49:28 :
What version of CHDK firmware did you used in this timelapse? offers the most durable fence for you residential area
Comment left by malkov on 2020-09-25 10:31:21 :
Your post has been so helpful because it was clear and concise writing made it easy to understand. Thank you! jiofi.local.html
Comment left by Greg on 2020-09-21 21:15:27 :
Great post- super informational for all of your readers. Thanks for taking the time to put this instructional article together! We appreciate it
Comment left by Bradley on 2020-09-17 20:26:46 :
Ben maintenant, une boîte de cigares, c'est onze balles.
Le squelette de Renescure, il peut aller se rhabiller.
Comment left by Tino on 2020-09-16 10:42:25 :
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Vitrified tiles
Comment left by Franches Love on 2020-09-15 16:11:21 :
This is cool! Thank you .. I hope to see such topics frequently, Thanks again.. Check out our website
Comment left by accountants Kent on 2020-09-15 08:39:28 :
Very interesting,good job and thanks for sharing such a good blog.your article is so convincing that I never stop myself to say something about it.You’re doing a great job.Keep it up accountants Kent
Comment left by online spiritual courses on 2020-09-15 08:06:05 :
it is really helpful online spiritual courses
Comment left by tree trimming on 2020-09-15 07:59:14 :
You’re doing great work. Keep it up. tree trimming
Comment left by chimney sweep London on 2020-09-15 07:43:39 :
Thanks for the information. chimney sweep London
Comment left by Harry Mathieuws on 2020-09-13 09:23:13 :
Plutôt réussi mon module électronique de teub.
15 Hz, 1OO V, quelques ma, et hop, feu d'artifice.
Mieux que les modules chinois à absorbsion.
Comment left by Bessie on 2020-09-05 08:10:39 :
I will apply this time lapse with my previous work!
Comment left by Rhainne Coles on 2020-09-02 09:55:04 :
I've tried timelapse in my phone and I was just looked funny and stupid like im in a Retaining Wall Contractors Sacramento
Comment left by Denise J. Farmer on 2020-08-28 23:22:28 :
I hope this can be pretty helpful to all people as they can make it as their screen saver or wall papers on their desktops. This was the best thing I like here so I always visit even busy with my best essay writing service reviews works. We can get good wallpapers here.
Comment left by Avril on 2020-08-27 16:22:13 :
Thanks for sharing this script. LED Headlights
Comment left by suman simgh on 2020-08-25 11:48:54 :
That’s a nice article, thank you for a great article. It helped me a lot. Keep it up Must Visit AVG ondersteuning
Comment left by Scott Heflin on 2020-08-19 06:22:43 :
People essentially claimed all of us simply just what exactly When i opted to help pay attention to help in addition to afterward a lot of. Amazing publishing in addition to regards yet again intended for performing this particular not any fee, see more here.
Comment left by Mary on 2020-08-12 12:40:58 :
Is the script working on all cameras or just this specific camera that you mentioned on the post? Anyway, I really like the output you have based on the attached time lapse video. Anyway, check out this most recommended tree removal Longmont, Colorado has to offer.
Comment left by Jenine Heijink on 2020-08-08 13:51:17 :
Really Nice Post Admin, Very helpful looking for more posts, Now I have to share some information about How To Fix “LexMark Troubleshooting Guide” problem. If you are going through this problem you can simply Lexmark Printer helpdesk
Comment left by Rowanbaartman on 2020-08-01 13:16:38 :
I am really enjoying your site.It’s simple, yet effective, thank you for this article.Now I have to share some information about How To Fix “mcafee Antivirus” problem. If you have any problem rearding Mcafee so click on this site:mcafee antivirus nummer belgie
Comment left by lima wilmink on 2020-08-01 13:13:34 :
I’m really impressed with your writing skills and also with the layout on your blog it's Very interesting to read.Now Here i would llike to share some information about HP Printer If you are facing any problem relate to your HP Printer's we wil resolve your queries at sam time.For any help please visit on our website:hp printer contact belgie
Comment left by Fien Wieten on 2020-08-01 12:18:14 :
I like your blog.You have done Excellent work. I appreciate.Here I want to inform all of you if you are looking for to resolve your Norton Antivirus problems,so you are in right place.we always available for your support.So whenever you need any help so just click on this link- norton Antivirus ondersteuningsnummer
Comment left by MillaRoose on 2020-08-01 12:12:43 :
Excellent post. I certainly appreciate this website.Keep writing.well here if you want to Overcome the issues of Avast antivirus.Pick the Best Assistance over our site to resolve your queries.Visit us :avast antivirus ondersteuning
Comment left by Simon on 2020-07-14 18:10:17 :
Thanks for this. It's really helpful from my bois team.
Comment left by Denner on 2020-03-26 13:26:34 :
Mes microjupes me manquent...
Comment left by Kay Freestone on 2020-03-20 20:00:19 :
Where is your first collaborator ?
Comment left by JP Kevin on 2020-01-13 17:29:28 :
Paraît que 700 boules en avait une grosse, mais que je n'avais rien à lui envier...
C'est Chichid et Makel qui l'ont dit.
Pour l'instant, je fourre l'appareillage dans le short plastique noir bien court.
Comment left by Gugus on 2019-12-09 16:26:44 :
Jamais plus.
9,10 $ pour un paquet de Kamel.
Jamais plus, le squelette de Renescure...
Comment left by Fidèle Didi on 2019-10-25 18:16:06 :
Mi, chu nin écrivain.
Comment left by YoctoSkirt on 2019-07-01 16:47:21 :
Ca y est, j'ai compris.!

Marie qui me dit : il ne doit plus y avoir grand chose à enlever, hein Jean-Pierre !
Et les copains à Hervé qui, par un trou de la palissade, disaient : Ca respire...
Et enfin, Nathalie qui a dit : jamais de culotte, je l'ai vu.
J'ignorais qu'elle parlait de moi à ses amis.
Ben oui, j'aime ça, rien sous le short.
J'ai compris maintenant que j'étais visé.
Comment left by Mlle Bishop on 2018-12-29 20:05:33 :
Vive la micro-jupe.
Comment left by Barsini on 2018-12-02 19:21:55 :
Un peu coincé notre ami Sydney, s'il tenait un magasin de chaussures, il n'aurait que sa pointure en stock...
Comment left by Sofun on 2017-09-17 10:48:38 :
Very Nice.
Comment left by Henri Willis on 2017-06-19 18:39:12 :
Je crois que je fais pas financer le speçtacle de mon épouse Grâce Willer ou Rose-Marie Landon...
Comment left by Sander on 2012-07-30 13:10:31 :

I finally have the script working on my A480 but even though refocusing is on 0, it does refocus every time before a photo is made..
I've copied the script and used VIM so I'm not missing any 'invisible code'.

Could you possibly help out?

Comment left by fin on 2012-02-20 03:28:37 :
Perhaps if you showed what the final peace looks like so I know what mine should look like.
Comment left by Fin on 2012-02-20 03:20:08 :
Hi there, I have no experience in coding. So trying to copy your .lua i don't actually know what I'm supposed to be copying out of what you have there?
Add a new comment :
Name :
Comment :

Answer the following question : Which is the biggest, zero or two ?