How to make a time lapse video using Linux

If you have shot the images for a time lapse video you probably want to resize the images and make a video from it. Linux is the way to go to automate this easy.

You can resize multiple image files (jpg/png/gif….) stored in a folder by the imagemagick package. Here is step-by-step guideline:

1. Install imagemagick from Ubuntu Software Center

Or, in the terminal:

sudo apt-get install imagemagick

2. Put all your image files in a single directory.

3. Open a terminal and go to this directory:

cd

4. Now, enter following command to resize all of the images to a specific percentage. For examples, for the following command, all of the images will be reduced to 50% of their dimension maintaining the ratio.

mogrify -resize 50% -format jpg *

Where -format jpg specifies: the resultant format will be JPG.

You may also specify width and height by the following command:

mogrify -resize 800×600 -format jpg *

You can easily guess, the resultant images will be of width 800 px and height of 600 px, keeping the original ratio.

Convert the jpg files using mencoder

1. Install mencoder from Ubuntu Software Center

Or, in the terminal:

sudo apt-get install mencoder

2. Put all your image files in a single directory.

3. Open a terminal and go to this directory:

cd

4. To convert a series of jpg files to an avi movie that can be displayed by, for example, Quicktime Player with no add-ons, use:

mencoder “mf://*.jpg” -o movie.avi -ovc lavc -lavcopts vcodec=mjpeg

You can also try and use ffmpeg

Share
This entry was posted in How-to, Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *