GNU & Improved GIFs

PromisedLand2460

Big ups to my friend Barry Israelewitz, who wrote a shell script for ffmpeg (based on this article shared in this comment by Paul Wise) and taught me how to use Terminal on my mac to make much better animated gifs than Flash exports directly. Currently it’s significantly more work than just exporting .gif from Flash, because I have to instead export a PNG sequence, import the frames to Quicktime 7, and export as a new .mov to use as an input file for making the gif. This may be streamlined a little bit in the future, but for now at least I can make higher quality gifs if I need to.

Below are close-up details of single frames. “Before” is here, “after” is above.

before
before
after
after

Here’s a smaller-sized (because fewer frames) animated gif for side-by-side before-and-after comparison:

before
before
after
after

Much better, no? Plus using Terminal is METAL.

Share

Author: Nina Paley

Animator. Director. Artist. Scapegoat.

3 thoughts on “GNU & Improved GIFs”

  1. Paul is right.

    Here’s how to do it with the ImageMagick tools (a suite of separate command line tools for image editing).

    To explode your gif, I used:
    $ convert -coalesce MosesPartsSea324fps.gif frame_%05d.gif

    This created a set of frame_00000.gif to frame_00018.gif files.

    To re-construct your gif, I used:
    $ convert -loop 0 frame_000*.gif out.gif

    You can also use “png” as the extension for the frame files if you want to work with that format. It does the right thing.

  2. Hello,
    Paul: totally agree; no need for a .MOV intermediate if there is a set of numbered images available. We’d run out of available instruction time last week, but I’ve since shown Nina how to use the same shell scripts to work directly with numbered sets of files.
    Ori: ImageMagick tools are my favorites, but I went with ffmpeg here for ease of installation/management given a new command line user, and since Paul’s link to pkh.me provided a palette generation method that gave good results without me having to think about palette generation. Thanks to Paul and pkh.me !

    Cheers,

    Barry

Leave a Reply

Your email address will not be published. Required fields are marked *