Skip to content

Instantly share code, notes, and snippets.

@spacecowb0y
Last active September 9, 2021 11:33
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spacecowb0y/25284cd9a47b987694d4 to your computer and use it in GitHub Desktop.
Save spacecowb0y/25284cd9a47b987694d4 to your computer and use it in GitHub Desktop.
From Gource to GIF (Gource and ffmpg are required)
#!/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
@hjarrell
Copy link

ImageMagick is also required for the convert command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment