Skip to content

Instantly share code, notes, and snippets.

@DarkionAvey
Created January 31, 2021 20:00
Show Gist options
  • Save DarkionAvey/33e892ea7cffc2bdf2c67be7172a4a81 to your computer and use it in GitHub Desktop.
Save DarkionAvey/33e892ea7cffc2bdf2c67be7172a4a81 to your computer and use it in GitHub Desktop.
A script for creating a timelapse video
//Unpack video to frames (r 1 is one frame per second)
ffmpeg -i input1.avi -r 1 frames/image-%6d.jpeg
//repack at 25fps
ffmpeg -i image-%6d.jpeg -r 25  -q:v 2 output1.mp4
//Speed up video by 2x "0.5"
ffmpeg -i output1.mp4 -filter:v "setpts=0.5*PTS" output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment