Skip to content

Instantly share code, notes, and snippets.

@spacegauch0
Last active September 9, 2021 11:33
Show Gist options
  • Select an option

  • Save spacegauch0/25284cd9a47b987694d4 to your computer and use it in GitHub Desktop.

Select an option

Save spacegauch0/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
Copy Markdown

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