Skip to content

Instantly share code, notes, and snippets.

Created December 23, 2016 13:28
What would you like to do?
Creating a timelapse out of an images series

Creating a timelapse out of an images series

Bring them into a common naming format (ordered by date):

jhead -n%Y-%m-%d.%H-%M-%S *.JPG

Create a timelapse video out of those images:

ffmpeg -framerate 40 -pattern_type glob -i 'images/*.jpg' -c:v libx264 -vf fps=25 -s 1440x1080 -pix_fmt yuv420p -threads 8 -movflags +faststart Timelapse.mp4```

This will create following:

  • use 40 images to fill one second (-framerate 40)
  • create a 1080p video (for the default GoPro image ratio of 4:3 - adjust to the ratio of your images)
  • use 8 threads to encode the video
  • place the video index at the begining to allow streaming of the video (by default added to the end and the whole video needs to be downloaded to view it - -movflags +faststart)
Copy link

Works like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment