Skip to content

Instantly share code, notes, and snippets.

@MorrisJobke
Created December 23, 2016 13:28
Show Gist options
  • Save MorrisJobke/07c63a55c53620b1c913c7fce3b36c31 to your computer and use it in GitHub Desktop.
Save MorrisJobke/07c63a55c53620b1c913c7fce3b36c31 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)
@ronnyhartenstein
Copy link

Works like a charm!

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