# How can I combine 30,000 images into a timelapse movie?

I have taken 30,000 still images that I want to combine into a timelapse movie. I have tried QuickTime Pro, TimeLapse 3, and Windows Movie Maker, but with such a huge amount of images, each of the programs fail (I tried SUPER ©, but couldn't get it to work either...?). It seems that all of these programs crash after a few thousand pictures.

The images I have are all in .JPG format, at a resolution of 1280x800, and I'm looking for a program that can put these images into a timelapse movie in some kind of lossless format (raw/uncompressed AVI would be fine) for further editing. Does anyone have any ideas, or has anyone tried anything like this with a similar number of pictures?

-
have you tried something like Adobe Premiere, or Final Cut Pro? –  Mahmoud Hossam Feb 23 '11 at 1:00
Have you tried using a lossless video codec like HuffYUV? –  Hydaral Feb 23 '11 at 5:46

Avidemux can create movies from a bunch of images. http://fixounet.free.fr/avidemux/

You could also use mencoder, but is a bit harder to use, with all the command line options 'n all. I've been using this:

mencoder mf://*.jpg -mf fps=xxx:type=jpg -ovc x264 -x264encopts bitrate=yyyy:threads=2 -o outputfile.mkv


I use

xxx = 25 and
yyy = 1200


which produces vids that are just fine. Add tunes to the movie by inserting:

-oac copy -audiofile audiofile.mp3

-
Avidemux ROCKS! Quick insert of 33.000 images. Quick save to uncompressed AVI - and it gets automaticly split into 4GB AVI chunks. But all of them are playable! –  Swift Feb 23 '11 at 23:03
+1 for Avidemux, I've done tons of video editing using MeGUI, and didn't even know such a good alternative existed! –  Breakthrough Feb 25 '11 at 19:15
Thanks. Worked well. –  Tarik Oct 2 '13 at 6:50
mencoder outputs avi, regardless of output filename. There are options to output other formats, but the code doesn't work well. The recommended way is to output h.264-in-avi, then remux. Just use ffmpeg instead. (see Shenal Silva's answer) –  Peter Cordes Jan 15 at 5:08

If you do some basic calculations you'll see that you are probably running out of memory if you are trying to keep the movie uncompressed.

Each frame is 1,024,000 pixels. At 32 bits per pixel that's 32,768,000 bits (4,096,000 bytes or 3.9 MB).

If we multiply that up by 30,000 frames you need 117187.5 MB (114.45 GB) of memory to hold the whole movie in memory in one go - no wonder QuickTime Pro is failing.

You could try reducing the resolution but that might still fail.

You will need to build the movie up in smaller chunks and then stitch the whole thing together. I would expect that there are applications that do this without loading the entire movie into memory. The final movie will also have to be compressed - again as it would occupy 114 GB on the hard drive. A movie only occupies a single DVD after all while your movie is 20 minutes long (at 25 frames per second).

-
AFAIK, there is no video editing program in the world that stores any uncompressed clip entirely in memory before parsing/saving. –  Breakthrough Feb 22 '11 at 21:40
@Breakthrough ~ But how do you composite it into a compressed clip? –  jcolebrand Feb 22 '11 at 21:42
@Breakthrough - that's probably true, but the OP is wanting an uncompressed movie. –  ChrisF Feb 22 '11 at 21:43
@ddrachenstern and @ChrisF - there is a difference between immediate storage and long-term storage. There is no video editing program that stores the entire length of the uncompressed video data in memory. Even when you scroll through the preview, it will recreate the data from what it has stored on the hard disk from the various media sources (and maybe a bit more for caching). Other then that, when you finally "render" a project, then you get the full video output (usually as a stream). The full video output can then be saved as-is (e.g. uncompressed/RAW), or streamed to an encoder. –  Breakthrough Feb 22 '11 at 21:56
Sorry, when I made my first comment, I just wanted to point out that the problem is not a lack of memory. I also meant that while a program may store some uncompressed video data in memory (e.g. for previewing), it never stores the entire video stream (again, due to the issues you brought to light in your answer). This is just the way these programs are made, so this shouldn't be an issue. Sorry for any misinterpretations! –  Breakthrough Feb 22 '11 at 22:01

Use FFmpeg.

This will create a video slideshow (using video codec libx264) from series of png images, named named img001.png, img002.png, img003.png, …

Each image will have a duration of 5 seconds, change the variable according to your choice.

ffmpeg -f image2 -r 1/5 -i img%03d.png -c:v libx264 -pix_fmt yuv420p out.mp4


If your images have four digits, use %04d, etc. If your images do not have this pattern, you can use shell globs, at least on Linux and OS X:

ffmpeg -f image2 -pattern_type glob -i 'time-lapse-files/*.JPG' …


You can also change the output framerate by specifying another -r after the input.

-
Just a note of warning: do not think you can bypass ffmpeg's printf syntax and just use *.jpg or something for more complex patterns. It will actually overwrite each and every one of your image files with the first one! I tried it myself. –  Christian Jan 2 '13 at 16:34
I was stuggeling with this as well. I turns out you can do this but need to set the glob style flag. ffmpeg -pattern_type glob -i 'time-lapse-files/*.JPG' time-lapse.mp4 –  arno_v Dec 31 '13 at 12:25
You can use -framerate for the image2 input format. I would recommend against setting an output fps different from input fps, unless you actually want ffmpeg to drop or duplicate frames. (unless outputting to a container like mkv where ffmpeg supports variable frame rate.) Yeah, just tested, and you do get extra dup frames fed through x264, so just set the FPS of the input, but putting -r or -framerate BEFORE -i .../stuff –  Peter Cordes Jan 15 at 5:04

Try PhotoLapse; a review of it is given on Lifehacker.com here.

-
Here is an Video showing this tool in action: vimeo.com/1226517 –  Darokthar Feb 22 '11 at 21:29
I had a typo. I allready tried Photolapse, but it fails in the rendering process. If I lower to 10.000 images, it completes the AVI file - but the file is useless, and cannot be played. –  Swift Feb 23 '11 at 22:06
@Swift I understand you need the files to be at their original size. I've always batch downsampled images using Irfanview prior to creating the timelapse avi. Hopefully you find the solution you need! –  JYelton Feb 23 '11 at 22:14

Yes, I know that this thread is over a year old. I've been using this for over 2 years though, and it works great with 10,000+ images:

1080p@24fps, no sound

ls -1v | grep JPG > files.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=21600000 -o windowsill_flowers_7.avi -mf type=jpeg:fps=24 mf://@files.txt -vf scale=1920:1080


4k@90fps, no sound

ls -1v | grep JPG > files.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=21600000 -o windowsill_flowers_7.avi -mf type=jpeg:fps=90 mf://@files.txt -vf scale=3840:2160


I had to mess around with the codec a lot before getting something that youtube would recognize, though. An sample using the 2nd block can be found here: http://www.youtube.com/watch?v=4G_aaPG2QWk

-

I use Google's Picasa. It's also a very good photo organizer in my opinion. Here is how.

3) From the top menu > Create > Video > From Selection...

4) Now you're in the video maker > Video Tab > Transition Style > Time Lapse

5) You can Load an Audio Track, change the dimensions (I normally use 1024x768), add slides with text ini the Slide Tab...

Back in the library, you can right click the video > locate in disk to see where the video was saved. Another good thing about using Picasa is that you can select all the pictures and go to the top menu Picture > Batch Edit > I'm Feeling Lucky. It will correct the contrast and colour of all the photos at the same time.

-

Have you tried VirtualDub?

When you open an image in virtualdub it will ask to load the whole sequence. From there - adjust the frame rate, add some filters (crop, sharpen), choose an encoder, and save your video.

I suggest you experiment at first with a lower number of images, and, if you are pleased with the result, do the whole batch.

Edit: Here is a simple tutorial on this. All you have to do is find a suitable lossless codec, like this one: MSU Lossless Video Codec.

-

I faced a similar problem a while ago when I tried making a timelapse for a create-a-thon at a local hackerspace. I run OS X, so I'm not sure how viable it is to use this on Windows, but I used MEncoder.

This is the command I used in terminal:

mencoder mf://*.jpg -mf w=800:h=600:fps=5:type=jpg -ovc copy -oac copy -o buildmadison.avi


There's two problems with this:

1. It's AVI.
2. All it does is slosh the images together into a single file with no compression. Of course, it's fast as heck, and it actually works!

Afterwards I ran it through another utility to convert it to a halfway decent format.

MEncoder is part of the MPlayer project, located here: http://www.mplayerhq.hu/

-

I see this thread is kind of old, but I found that MakeAVI is the best program for me!

• Then to add the pictures, you just push the "Add Files" button in the top right corner and select the pictures you want to compile.
• Once they have been imported, you can use the "Up" and the "Down", on the middle left side, to adjust the ordering of the pictures in case they didn't stay in order.
• Then to adjust the frame rate of the compiled pictures, you can change the text box inside the "Playback frame rate" frame, lower right side, to the frame rate you want.
• Since the program is still in beta (0.1.1), some things don't work. Push the "Begin" button and specify the file name you want. When it asks what type of compression you want, select the one you want, except for the "Full Frames(Uncompressed)" which didn't work for me.
• Then once it's done compiling the video, go and watch to video and see how it is. If the video is blank(no length), try changing the Compression options. (That's what happened when I tried "Full Frames(Uncompressed)")

I couldn't get any of the other methods listed here to work, and this one worked for me! Hope it works for you! :)

-

Just for fun, here's another way (no, I'm clearly NOT trying to refine my own process.) It turns out nothing on Windows wants to edit the output mencoder produces from my other answer. This is a more edit-friendly version using ffmpeg:

1080p@90fps, no sound, IMG_00000.JPG - IMG_99999.JPG
ffmpeg -r 90 -i IMG_%05d.JPG -vcodec libx264 -vpre medium -crf 22 -threads 0 -vf scale=1920:-1 -r 15 -metadata title="foo"

-

​We tested our Time-Lapse Tool software to generate video from 100k images and it works like a charm. All these images can be added from multiple folders which is helpful for photos from DSLR grouped by 10k images in folder.​

-

I had to do something like that before. I was successfully able to do it in quicktime pro by doing it 500 frames at a time. I would save those as an individual movie and then move on to the next. Then later I would combine all of the 500 frame segments into the final thing.

-
Kind of a ripoff for at "professional" piece of software! –  Swift Feb 23 '11 at 22:08

I'd also vote for Virtualdub(have done actually this operation, can't remember if were these many). Is also easy later on to remove frames you don't want, etc. Maybe you could try using a lossless video format to render and store it, like camstudio codec. For a timelapse...maybe is also ok techsmith codec (TSCC), but that works only if you have purchased (or obtained an old version from a magazine) Camtasia, as it installs the encoding version of the codec. It makes really small videos. And probably is apropiate for a time lapse.

-

Another program you can use is Time Lapse MovieMonkey

It did the job of creating my latest time lapse movie really really really fast. And I didn't have to read the instructions. It's simple and intuitive, but has enough advanced settings. And it's free.

The author says it's been tested with 50.000 pictures.

-

I get really good results from using Picasa or GoPro-studio.

I'm busy with a video to journal me building a surfboard using these tools. A work in progress have been posted on my profile to YouTube (search for "Surfbordbou" - I'm not allowed more than 2 links per post yet)

Picasa's movie maker is really easy to use, it's 2 clicks and you've got your timelapse of a set of selected pictures.

-