Time Lapse

Frame Extraction

April 2011

This method of time lapse video I use when either the event occurs in a short period of time or I need images less than 1 minute apart. This arbitrary figure is derived from the limits of the intervalometer on my stills camera. Many of the comments made on the Interval page are relevant here. The two topics should be read as a pair.

I use another stills camera, a Fujifilm super-zoom, with full HD movie capabilities. Any digital video recorder with adequate resolution and memory capacity could be used. It is essential that you use freshly charged batteries, a large empty memory card and mount the camera on a tripod.

Start the recording. My camera can record up to 30 minutes continuously, other cameras may be different. Auto-exposure, focusing and zoom are all available if the subject needs them. When the recording is complete, switch off the camera, remove its memory card and copy across to a suitable folder on the PC. My camera can only record MOV files. The frame extraction software, VideoToJPG can read these if Quicktime is installed.

The camera video I now pass through VideoToJPG. Its job is to extract JPEG still images from it at intervals that can be defined by time or frame count. The interval/count is decided by the recorded event's time scale and finished video's running time. Either way, I end up with a sequentially numbered sequence that I can pass straight to Virtualdub or filter/reverse via PhotoLapse.

PhotoLapse gives me the opportunity to remove certain frames because, say, an aeroplane has come into shot, or I want to further compress part of the sequence. This would give me a discontinuous image sequence that Virtualdub could not import directly. I could also reverse the sequence if I want to get gimmicky or creative. If the video is going to be further edited by Virtualdub or it is intended to part of a DVD presentation then I would choose the "Uncompressed" codec, otherwise something like "Xvid" might be better suited.

Virtualdub can convert a sequential numbered sequence of JPEGs into video by opening the first image. If there are breaks in the sequence then use PhotoLapse to compile an interim video or use Virtualdub to create several videos and use its "Append AVI" feature to bring them all together. I can also add an audio track. This would have to be created separately using a tool such as Audacity. Music and/or speech can be used but beware that the laws surrounding copyright are a minefield. The final codec depends on the video's final destination. If it is bound for use on a DVD then "Uncompressed" is a good choice. If it's for a PC then "Xvid" or another high compression codec might be better. Virtualdub can only produce AVI files so another video converter for, perhaps Flash or Quicktime, would be more appropriate for web use.

The Calculations

Suppose the recording is 20 minutes long with a frame rate of 30 fps gives 20x60x30 = 36,000 frames in total.
Extracting a frame every 30 frames leaves 36,000/30 = 1,200 frames.
Compiling these into a video of 25 fps gives a running time of 1200/25 = 48 seconds.
The time dilation factor (tdf) which is the time of the recorded event divided by the final running time is 20 mins/48 secs = 25.

Generallising, a recording of M minutes at R fps extracting every Q frames gives 60xMxR/Q frames.
Compiling these at T fps gives a running time of 60xMxR/TxQ seconds.
The time dilation factor is therefore 60xMxTxQ/60xMxR leaving a tdf of TxQ/R.

Block diagram of frame extraction timelapse video creation