Creating timelapse videos on Linux

Posted: 12th December 2011 by Ammar Qammaz in Post
Tags: ,

In the past weeks I started to take timelapse photographs using my Nikon D-7000 camera and ffmpeg and image magick video and picture converters..!

My camera has a built in intervalometer that I use to acquire the pictures , but lower-end cameras that do not have this kind of functionality can be “hacked” with an Arduino i.e. and be used likewise. This site has a lot of opensource hardware and software , that can be used to this end.

The results are not so good until now :P , at least when compared to this..

Due to environmental pollution and the lights of the city there are only a few stars visible from Athens. For daytime shots on the other hand , I have yet to find a proper position and camera configuration that on a course of 5-10 hours for example will provide a pleasing visual result..!

These are some of my timelapses so far , the third is the best one..


These are the scripts I use.. (TimeLapseTools.tar)

And these are the instructions :

To customize them you should edit the files directly and append your own parameters

STEP 0 : You will first need to extract the TimeLapseTools.tar.gz somewhere and empty your photographs , to become timelapsed in the FOLDER folder :P
they will have filenames like DSC_XXXX.jpg

STEP 1 : Make sure you have ffmpeg and imagemagick installed on your Linux Distro , for Debian/Ubuntu you can do sudo apt-get install ffmpeg imagemagick to download them.
It goes without saying that if you need an exotic codec for your video file you must also find it and download it too..

STEP 2 : Open a terminal and cd to the directory which has the scripts

STEP 3 : Run ./file_rename_script.sh which will change the filenames from DSC_XXXX.jpg to img_XXX.jpg starting from img_001.jpg and empty the FOLDER directory placing all of the files in the current dir.

STEP 4 : Run ./resize_images.sh which will change the resolution of the images to 1631×1080 for my cameras aspect ration creating _img_XXX.jpg for every img_XXX.jpg ( notice the initial _ )

STEP 5 : Run ./ffmpegcommand which will create an mp4 file with an image size of 1631×1080 @ 25 fps

STEP 6 : Upload to Youtube , or profit ;p

Comments are closed.