Last active
August 11, 2023 21:19
-
-
Save davidjb/41297c9d35b90868e193fd4307e51835 to your computer and use it in GitHub Desktop.
Create a timelapsed video from a collection of video files in one hit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create `list.txt` via https://trac.ffmpeg.org/wiki/Concatenate; aka a file with lines like: | |
# file 'foobar.mp4' | |
# file 'foobaz.mp4' | |
# Swap the codec as per https://www.rickmakes.com/ffmpeg-timelapse-from-video-speed-up-vs-every-n-th-frame/ if you want hardware encoding or use a different platform | |
# 0.002 = 500x | |
ffmpeg -f concat -i list.txt -an -vf "setpts=0.002*PTS" -vcodec h264_videotoolbox -b:v 10000k -r 30 -pix_fmt yuv420p out.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment