animate — Display Image Sequences as Animation
Practical guide to animate from ImageMagick: play animated GIFs and image sequences in an X11 window, control frames and create quick previews.
animate is ImageMagick's playback tool that displays a sequence of images or a ready-made animation in its own X11 window. Reach for it to quickly review animated GIFs, rendered frame sequences or time-lapses before you process them further. Note that animate needs a running X server and does not work headless. Under ImageMagick 7 you invoke it preferably as magick animate; the classic animate call stays compatible.
Basic Usage
animate <animation> — Display an animated GIF or multi-frame image.
animate animation.gifanimate <frame1> <frame2> <frame3> ... — Animate a sequence of image files.
animate frame-001.png frame-002.png frame-003.pnganimate *.png — Animate all PNG files in alphabetical order.
animate frames/*.pnganimate -delay <ticks> *.png — Set delay between frames (in 1/100 second).
animate -delay 10 frames/*.pngPlayback Control
animate -loop <n> <animation> — Set number of loops (0 = infinite).
animate -loop 3 animation.gifanimate -delay <ticks> <animation> — Override frame delay (speed up or slow down).
animate -delay 5 animation.gifanimate -delay <ticks>x<tps> <animation> — Set delay with custom ticks-per-second base.
animate -delay 1x30 frames/*.pnganimate -pause <seconds> <animation> — Pause for specified seconds between loops.
animate -pause 2 animation.gifDisplay Options
animate -resize <width>x<height> <animation> — Resize animation for display.
animate -resize 640x480 animation.gifanimate -coalesce <animation> — Reconstruct frames before displaying (fix optimized GIFs).
animate -coalesce animation.gifanimate -geometry <width>x<height>+<x>+<y> <animation> — Set window size and position.
animate -geometry 800x600+100+50 animation.gifanimate -title "<text>" <animation> — Set the window title.
animate -title "Preview" animation.gifanimate -backdrop <animation> — Display with a backdrop covering the full screen.
animate -backdrop animation.gifKeyboard Controls (during playback)
Space — Toggle play/pause.
Press Space to pause or resume playback. (period) — Step forward one frame.
Press . to advance frame by frame< / > — Slow down / speed up playback.
Press > to increase playback speedq / Escape — Quit the animation viewer.
Press q or Escape to closeF1 — Open the built-in help menu.
Press F1 for keyboard shortcuts referenceCommon Patterns
convert -delay 20 frames/*.png animation.gif && animate animation.gif — Create an animation from frames and immediately preview it.
convert -delay 20 render-*.png preview.gif && animate preview.gifanimate -delay 50 -loop 0 -resize 50% *.png — Preview frames at half size with slow playback.
animate -delay 50 -loop 0 -resize 50% timelapse-*.pnganimate -coalesce -delay 10 animation.gif — Fix and speed up an optimized GIF for preview.
animate -coalesce -delay 10 animation.gif Conclusion
animate is a pure preview tool with no destructive risk: it shows your image sequences but never alters files. For everyday use -delay, -loop, -resize and -coalesce are usually all you need, the last one playing optimized GIFs back cleanly. Keep in mind that animate opens a graphical X11 window – on a headless server without a display it simply does nothing; there you are better off using convert/magick for processing or copying the file to a workstation. Under ImageMagick 7, magick animate is the recommended invocation.
Further Reading
- ImageMagick: animate – official reference for animate and all its options
- ImageMagick: Command-line Tools – overview of all ImageMagick command-line utilities