Last active
December 23, 2021 17:42
-
-
Save ddrscott/6831b4027d6503cf9cbdf1790fc79d16 to your computer and use it in GitHub Desktop.
Concatenating two parts of a video into a gif
This file contains hidden or 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
FRAMERATE:=12 | |
shoyo-spike.gif: clip-a.gif clip-b.gif | |
ffmpeg -i clip-a.gif -i clip-b.gif \ | |
-filter_complex 'concat=n=2:v=1:a=0,scale=480:-1' \ | |
-r ${FRAMERATE} -y $@ | |
clip-a.gif: | |
ffmpeg -ss 06:08 -to 06:21.5 -i source-clip.mp4 -r ${FRAMERATE} -y $@ | |
clip-b.gif: | |
ffmpeg -ss 06:36.0 -to 06:39 -i source-clip.mp4 -r ${FRAMERATE} -y $@ | |
## Example doing it all in a single command. | |
single.gif: | |
ffmpeg \ | |
-ss 06:08 -to 06:21.5 -i source-clip.mp4 \ | |
-ss 06:36 -to 06:39 -i source-clip.mp4 \ | |
-filter_complex 'concat=n=2:v=1:a=0,scale=480:-1' \ | |
-r ${FRAMERATE} -y $@ |
Author
ddrscott
commented
Dec 23, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment