Use ffmpeg To Create a Timelapse From Pictures With Music

leave a comment »

Create a timelapse movie from images using ffmpeg with background music.

Images must be sequentialy numbered starting with the value given for the start_number argument.


ffmpeg -framerate 12 -start_number 15 -f image2 -y -i "G%7d.jpg" -i music.mp3 -c:v libx264 -preset fast -c:a mp3 -shortest -movflags +faststart "output_filename.mp4"


Options Breakdown:

Option Description
framerate 12 Number of images to show per second
start_number 15 Start number of the first image
-i “G%7d.jpg” ffmpeg formatted file name
-i music.mp3 Background music filename
-shortest Truncate video to shortest of timelapse or music
-movflags +faststart Put file index at beginning to speed up online streaming

Written by M Kapoor

December 23, 2019 at 11:54 pm

Posted in Programming

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: