Last active
September 9, 2021 11:33
-
-
Save spacecowb0y/25284cd9a47b987694d4 to your computer and use it in GitHub Desktop.
From Gource to GIF (Gource and ffmpg are required)
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
#!/bin/bash | |
gource --key --seconds-per-day 0.1 --auto-skip-seconds 1 -400x300 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 input.mp4 | |
mkdir frames | |
ffmpeg -i input.mp4 -vf scale=400:-1:flags=lanczos,fps=10 frames/ffout%03d.png | |
convert -loop 0 frames/ffout*.png output.gif | |
rm -rf frames |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ImageMagick is also required for the convert command.