Creating a GIF animation from PNG files

convert is a handy command line tool to do that. cd to the folder containing your png-files and run this command:

convert -delay 10 -loop 0 *.png animation.gif

Source: http://ubuntuforums.org/showthread.php?t=1132058


Newer versions of ffmpeg have no -sameq (see faq) but do have GIF support.

ffmpeg -i %03d.png output.gif

Where %03d is the frame ID in 3 digits.

You may also try to use ffmpeg to create a movie out of a sequence of images and then convert the movie to a GIF animation (again using ffmpeg).

# cf. http://pages.uoregon.edu/noeckel/MakeMovie.html

# first convert an image sequence to a movie
ffmpeg -sameq -i %03d.jpg output.mp4

# ... and then convert the movie to a GIF animation
ffmpeg -i output.mp4 -pix_fmt rgb24 -s qcif -loop_output 0 output.gif

The convert's --delay option only applies to the next image on the command line. So convert -delay 10 * will only set the delay of the first frame to 0.1 second. The option need to be repeated:

convert $(for a in *; do printf -- "-delay 10 %s " $a; done; ) result.gif

For your sorting need, convert does not sort frames, the shell globing * does. If you know your frames are numbered from 0 to 700, you can just compute the numbers yourself:

convert $(for ((a=0; a<700; a++)); do printf -- "-delay 10 name%s.png " $a; done;) result.gif