Use ffmpeg To Create a Timelapse From Pictures With Music
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 |
Leave a Reply