Categories
Photography

Creating time lapse videos with mencoder

In the last post I wrote about the intervalometer I was using to create time lapse videos but I forgot to share how I’m making these videos from the camera files.

There are lots of tools you can use for mounting a time lapse, like Adobe Premiere or Final Cut, but there is also some more simple yet effective ways to do so, using the open source mencoder utility.

The first you will need is to create a text file with all the filenames for the photos you want to use as frames. On a linux box you can use ls -1tr > frames.txt (warning: the first parameter is a “one” not a “l”). This will create a file frames.txt with all files on the current directory, one per line, ordered by date taken. We will use this file to tell mencoder which files to use to create the video.

Next thing is to execute mencoder to create the video.

$ mencoder -nosound -ovc lavc -lavcopts \
vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=3 \
-vf scale=1920:1080 -mf type=jpeg:fps=20 \
mf://@frames.txt -o time-lapse.avi

With this command we are asking mencoder to pick all the photos from frames.txt and make a full HD video from them at 20 frames per second, you can adjust the fps or the quality of the video by modifying the fps and vqscale parameters respectively.

Here you can see a demo created as explained above, these are me and a friend doing some clean up in my bedroom after doing some work.

12 replies on “Creating time lapse videos with mencoder”

Mi interés por los time lapses empezó con esos vídeos, el dolly que estoy construyendo es una réplica del que se uso para hacerlos.

Note it is a “one”, not a l.

And you’re right it is 1920×1080, fixed it. Thanks for the feedback 😉

Comments are closed.