Make timelapse videos with OpenSource software

As I said it in my previous post, I try to give you a short tutorial how you can make such timelapse videos under Linux. First of all, make sure that you have installed following software:

Then you will need lots of photos with a sequence. I shot every second one photo and got nearly 610 photos for some seconds of the movie. So, after you shot so many photos you will have something like this:

As you can see, they don’t really differ from each other, but later they will look really great. Now comes the part with Imagemagick. I shot my photos with my Canon EOS400D (or for the non-european: Canon Rebel XTi) with full resolution (3888×2592 px), but the final video should have 720p (1280×720 px). So I have to crop my images to this resolution. I have tried it with digikam and the batch mode of it, but there is no batch mode for aspect ratio cropping, so I have found a small script (aspect) which uses ImageMagick in the backgrond for doing it. It cropped my images perfectly with only one command. If your photos have the same resolution as the final movie then you can skip this step and follow this part now.

After cropping (or not, belongs to you) you can start kdenlive, create a new project as you like. I have decided to make 720p movies. So, now you can add a new slideshow clip.

Browse to your path of the photos (there should only be the photos for your movies, otherwise kdenlive will add those other photos to the movie, too) and adjust the settings you like. I choose a frame duration of 5ms and a dissolve of 2ms (as you can see in the screenshot), but you can set other parameters, you have to look on your own how it will look best with your photos.

Now kdenlive add your clip to the “Project tree” and you can drag it to the timeline on the bottom and have a first look at your movie in the “Project Monitor”. That’s it. Render your movie and you will get something like this:

http://vimeo.com/moogaloop.swf?clip_id=6556451&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1
Impression in time from Daniel Isenmann on Vimeo.

If you are not happy with the result of your movie, you can change the settings of the movie (“Frrame duration”, etc.) with menu “Clip properties”.If you want some effects on your movie, you can drag every single effect of kdenlive to your movie and make it to something special. Now we are at the end of this small tutorial, I hope that I could help some people out there to make timelapse videos under Linux. Feedback (or critic) is welcome, just leave a comment.

  1. #1 by Geoffroy Carrier on 27. September 2009 - 04:33

    50ms and 20ms. Not 5 and 2. Your screen probably refreshes at 60Hz, that’s every 17ms. It took me a long time to figure out what seemed SO wrong.

  2. #2 by MichaelNW on 27. September 2009 - 14:34

    ImageMagick also offers the possibility of making resized copies of your original photos. You have the option to keeping everything you originally photographed rather than cropping some out.

  3. #3 by ise on 27. September 2009 - 21:28

    @ MichaelNW
    I know that ImageMagick gives me the possibility to do that, but I haven’t found an easy option to do an aspect ratio crop. I not only have done resize, I also crop the photos in aspect ratio to get the 720p resolution. If I just have done a resize then the movie would look really disturbing because of the wrong image sizes. You have to do a crop to your final resolution or your pictures have the same aspect ratio as the final movie then you don’t have to do anything, just resizing. My Canon shots in 4:3 ratio and the movie is 16:9, so I have to crop something out, or I will have some black borders somewhere.

  4. #4 by radical@mail.bg on 26. June 2012 - 20:46

    Would this be possible to give an example comand line for the resizing script. I’ve tried the folowing ./aspect IMG_1820.JPG 1280×720 -m crop -g center but the script returns – NO WIDTH SPECIFIED –
    And one more question is this possible to resize all images in one step, if yes what is the comand syntax

  5. #5 by steeph on 4. September 2012 - 11:40

    Thanks for this post. I wouldn’t have found the Add Slideshow Clip function myself. Kdenlive is not necessary if you only want to have the frames stiched together. You can do this with ffmpeg. But I want to do more with the video. So this seems to be very useful.

    Here is what I did to the pictures in ImageMagick first.

    Resize to 1920px width and crop to proper aspect ratio:
    for x in `ls *.JPG`; do `convert -resize 1920x $x ../res/res_$x; convert -crop 1920×1080+0+200 ../res/res_$x ../crop/crop_$x`; done
    rm -r res

    And I’ve added the time stamp to the bottom right corner (it’s a long time lapse). I only wanted the hours and minutes when the pictures where created and I couldn’t trust the last edited date of the files. So I used this script to add the EXIF create time in two colors:
    #!/bin/sh
    filename=$1
    timeformatted=`/usr/bin/vendor_perl/exiftool $filename | grep “Create Date” | grep “\.” | cut -c 46-50`
    convert $filename -font /usr/share/fonts/courbd.ttf -pointsize 72 -fill black -annotate +1675+1045 $timeformatted stamped/stamp1_$filename
    convert stamped/stamp1_$filename -font /usr/share/fonts/courbd.ttf -pointsize 72 -fill white -annotate +1670+1040 $timeformatted stamped/stamp_$filename
    rm stamped/stamp1_$filename

    Hope it helps

  1. Computer Internet and Technology Articles. » Blog Archive » Make timelapse videos with OpenSource software « ise

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: