Skip to content

Instantly share code, notes, and snippets.

@iPublicis
Forked from EmmanuelKasper/create_gif.sh
Created January 7, 2019 15:34
Show Gist options
  • Save iPublicis/5d9aad99077ac9e7fa640250338e1228 to your computer and use it in GitHub Desktop.
Save iPublicis/5d9aad99077ac9e7fa640250338e1228 to your computer and use it in GitHub Desktop.
Create gif file with avconf
#export frames
avconv -i hatari.avi -vf fps=10 frames/ffout%03d.png
#assemble frames a gif
convert -loop 0 frames/ffout0*.png new.gif
@iPublicis
Copy link
Author

iPublicis commented Jan 7, 2019

You can also also change the size of the frames on export by changing the 320 in this line:
ffmpeg -i input -vf scale=320:-1:flags=lanczos,fps=10 frames/ffout%03d.png

Then use convert (or gm convert if you prefer GraphicsMagick) to make your animated GIF:
convert -loop 0 frames/ffout*.png output.gif

via danijeljw

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