One evening, while sipping chai in my balcony at sunset, I was curious to record it in a fancy way - time lapse. I’m not a “Pro” or “wannabe - Pro” Photographer - just own a decent camera Canon 600 D - with 18-135mm lens.
Time Lapse is an art of taking continuous photos and arranging them one after the other which gives an idea of how things are changing in a frame. Many of you must be wondering the difference b/w video and time lapse.
Well, Video records ~25-30 fps and plays at same speed while in time frame, we take 1 photo every 20 secs (or several mins based on your subject and its motion) which is 1/20 fps and then playing at 30 fps. Thus you see the change in subject in shorter time (very much like running a video at ~40x or more based on your interval time).
In past, I have contributed to development of secure & scalable image handling backend of an Electronic Medical Record Cloud which apart from regular medical record stuff, does lossless compression on images and mortifies it for different usage styles (thumbnail, lightbox view). I used graphicsmagick for the same and also played with ffmpeg (in case you want video output) so I had enough idea to get started. My aim was to make sure I use command line tools, than any Pro software.
Step 1: Choose subject, arrange for tripod
I got up early - 4.30am for 6am sunrise to setup stuff (probably too early for sleep deprived Software Engg). I couldn’t arrange tripod for early morning shot (too early to wake your boss for that ;) ), though borrowed that for cloud shoot in the evening.
Step 2: Click Photos at regular interval of time:
I used EOS Utility to capture images at interval of 3 mins. Unfortunately, this not available for my linux machine (which is my first choice), so had to use my Mac. If you don’t wish to use your laptop, you can buy an intervalometer (costs 10-15 $) to set time interval between shots or use software on your mobile.
My EOS Utility CD was back in India, so had to tweak installing process on my Mac (removed Info.datx file in Resources folder of downloaded copy from Canon official site - which tells system to look for previous versions before installing it). Even if I had the copy of CD, I can’t do without external CD drive for Mac. Using the software, you can directly save images on your laptop, thats fantastic! So, you don’t have to worry about disk space. I couldn’t figure out if there is a way to connect Camera’s power cord ( and not use battery) to keep the camera running for very long time. My battery takes ~350 photos per charge or ~ 200 mins of usage - without display (To overcome this for next time, I have ordered 2 extra (non Canon) battery packs from amazon).
For all linux fans, who dont wish to touch iOS or PC, I managed to get my Nexus 5 connected to my camera using micro usb to usb converter (very cheap). There are plenty of good paid apps with zillions of features, but you can find basic intervalometer in free app HeliconRemote.
Step 3: Check out photos
You should keep checking if photos are coming out to be good. After finishing your session, you should select the photo range that you wish to time lapse.
Step 4: Play with command line tools
“GraphicsMagick is the swiss army knife of image processing” - is how it’s official site mentions it.
It is very matured and well documented library for image processing cmd tools for all major platforms.
Easy to install graphicsmagick:
#For linux users:
sudo apt-get install gm
#For mac users (hoping you have brew already installed)
brew install gm
Step 5: Run commands and fine tune range
Following command should be handy.
gm convert -resize x200 -quality .2 -delay 20 -loop 0 IMG_*.JPG output_file.gif
output file can be very large (in hunderds of MBs) , you should make sure you resize to smaller version so that viewers can process it nicely.
For resize option, provide, widthxheight (either of them). You may use loop option to keep the images in loop and quality to reduce quality (for web), you may also compress images before processing for gif, but results came out to be same.
Delay option lets you give time between two frames. Play with this option to remove any choppy movement in the gif.
Last two arguments are input file format and output file name.
Step 6: Feel good about it :D