Create a Time-Lapse Video with Transitions in FFmpeg

This article provides a step-by-step guide on how to build a high-quality time-lapse video from a sequence of static images using FFmpeg. You will learn the exact command-line instructions needed to compile your photos, set custom frame rates, and apply smooth transition effects—such as crossfading—between each image to create a professional visual flow.

Step 1: Prepare Your Image Sequence

Before running FFmpeg, ensure your images are sequentially named in a consistent pattern inside a single folder. The easiest naming convention is numerical padding, for example: * image_0001.jpg * image_0002.jpg * image_0003.jpg

Method 1: Smooth Motion Blending (Best for Dense Time-Lapses)

If you have hundreds of images and want to create a smooth, blended transition between each frame to eliminate flicker, the minterpolate filter is the most efficient tool. This filter interpolates frames by blending them together.

Run the following command in your terminal:

ffmpeg -framerate 10 -i image_%04d.jpg -vf "minterpolate=fps=30:mi_mode=blend" output_blended.mp4

How it works: * -framerate 10: Tells FFmpeg to read the input images at 10 frames per second. * -i image_%04d.jpg: Specifies the input files (the %04d placeholder matches 4-digit padded numbers). * -vf "minterpolate=fps=30:mi_mode=blend": Applies the motion interpolation filter. It bumps the output to 30 frames per second by blending the raw images together, creating a smooth transition effect between each photo. * output_blended.mp4: The final output video file.


Method 2: Sequential Crossfading (Best for Slideshow-Style Time-Lapses)

If you have fewer images and want a distinct, stylized crossfade transition (where one image slowly fades out as the next fades in), you can use the xfade filter.

For a sequence of three images where each image displays for 3 seconds with a 1-second transition, use this command:

ffmpeg -loop 1 -t 3 -i image_0001.jpg -loop 1 -t 3 -i image_0002.jpg -loop 1 -t 3 -i image_0003.jpg -filter_complex "[0:v][1:v]xfade=transition=fade:duration=1:offset=2[v1]; [v1][2:v]xfade=transition=fade:duration=1:offset=4[v]" -map "[v]" output_fade.mp4

How it works: * -loop 1 -t 3 -i image_0001.jpg: Loops the first image and sets its individual duration to 3 seconds. * xfade=transition=fade: Applies the standard crossfade transition. You can change fade to other built-in effects like wipeleft, slideup, or circleopen. * duration=1: Sets the transition effect to last for exactly 1 second. * offset=2: Tells FFmpeg to start the transition 2 seconds into the first image. * offset=4: Starts the second transition at the 4-second mark (accounting for the combined duration of the previous clips minus the overlap). * -map "[v]": Outputs the final merged video stream.