Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@danijeljw

This comment has been minimized.

Copy link

@danijeljw danijeljw commented May 28, 2016

create the directory for output first
mkdir -p frames
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

@danijeljw

This comment has been minimized.

Copy link

@danijeljw danijeljw commented May 28, 2016

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

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