With the release of the image sequence export feature, I thought I’d play around a bit with making different animations with the frame outputs to see what quality and file size I could come up with.
I started with an existing animation and exported an animated gif from that. Then exported an image sequence from the same animation and used ImageMagick to create another animated gif, and ffmpeg to create an mp4 video. Here are the results.
First, the GLC gif output:
That comes in at 473kb and looks decent.
Then the ImageMagick version.
That’s 326kb. Looks about the same to me, but significantly smaller. Actually, my initial attempts were horrible. The IM version came in larger than GLC’s output and had all kinds of horrible artifacts. Some research found some command line options that cleaned it up and optimized it nicely. Here’s the command I used to create this image:
convert -delay 3.33 -loop 0 -fuzz 2% -layers Optimize *.png isogrid_im.gif
delay is in terms of 100ths of a second,
fuzz cleans up the quantization and
-layers Optimize brought the file size way down.
That’s down to a whopping 50kb. But it does look a bit fuzzy. I’m not even going to begin to explain the ffmpeg command line I used, because I hardly understand it myself.
ffmpeg.exe -framerate 30 -i isogrid_%0
4d.png -c:v libx264 -r 30 -pix_fmt yuv420p isogrid.mp4
Here’s the page I gleaned that info from: https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images
There are probably options that would improve the quality at the expense of some file size. Another interesting concept is the idea of including audio in the mp4. or creating multiple animations and stitching them together in a longer movie. Of course, you could just pull all the files into some video editor and do the same thing that way.
I was going to try gifsicle as well, but that requires individual gifs as input. Won’t take pngs.
Anyway, there’s some things to try. I’d love to hear any additional tools or techniques you come up with.
I had to turn off comments here. 10,000 to 1 spam to comment ratio. But tweet with the tag #gifloopcoder and I’ll see it.