Tuesday, July 3, 2012

Making Animations from Image Sequences

Despite making animations out of image sequences all the time, I often forget the right command line arguments, so I'm going to post them here for posterity.  Given a sequence of images in an acceptable format, say PNG, labeled frame001.png, frame002.png, etc., we can create an animation using FFMPEG with the following command:
ffmpeg -r 10 -i frame%d.png movie.mp4
which will generate a .mp4 formatted animation with 10 fps.  I use ffmpeg on the command line using the one I got from MacPorts.

I should note that I was a big fan of Quicktime Pro, which would nicely import image sequences and spit out animations in all sorts of formats.  It was an affordable piece of software, about $30 as I recall, but Apple seems to have abandoned it in favor pushing people to buy Final Cut, which is out of my budget just for making animations.

Something else that people often want to do is include animations in their Beamer presentations.  I've had success following these instructions with .mp4 formatted animations.  However, I have only gotten the actual presentation to work properly with Acrobat; Skim never seems to work for me.

2 comments:

  1. Try ppm2fli. Free, easy, nice animations open in QuickTime.
    http://vento.pi.tu-berlin.de/ppm2fli/main.html
    Write out ".ppm" image files and a text file with list of images.
    Then use ./ppm2fli -g [sizex]x[sizey] image.list foo.fli

    ReplyDelete
    Replies
    1. How do PPM image files compare to PNG (which I use for space issues) or EPS/PDF (when I want fully vectorized images)?

      Delete