Skip to content

Instantly share code, notes, and snippets.

@ronnyhartenstein
Forked from MorrisJobke/timelapse.md
Last active December 23, 2016 20:38
Show Gist options
  • Save ronnyhartenstein/557ef6c5265ce0852f3806cacb1419c6 to your computer and use it in GitHub Desktop.
Save ronnyhartenstein/557ef6c5265ce0852f3806cacb1419c6 to your computer and use it in GitHub Desktop.
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment