Skip to content

Instantly share code, notes, and snippets.

@gwparikh
Last active February 8, 2018 22:32
Show Gist options
  • Save gwparikh/b4df91691e38d490184f to your computer and use it in GitHub Desktop.
Save gwparikh/b4df91691e38d490184f to your computer and use it in GitHub Desktop.
Time-lapse from video files with ffmpeg
# Make the images
# (used parallel to speed it up with multiple jobs, but this may not be necessary; haven't tested it)
# fps=1/60 is 1 frame per minute (1/60th frame per second)
parallel 'ffmpeg -i {} -vf fps=1/60 imgs/{.}_%03d.jpg' ::: vidfiles*.avi
# Recombine them
ffmpeg -r <fps> -pattern_type glob -i 'vidimages*.jpg' -c:v libx264 timelapse.avi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment