xyzio

Posts Tagged ‘ffmpeg

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.

Command:

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 ,