Convert Amiga IFF ANIM to MP4 Using FFmpeg
This guide explains how to convert classic Commodore Amiga IFF
(Interchange File Format) animation files—commonly stored with
.anim or .iff extensions—into standard modern
video formats like MP4 using FFmpeg. You will learn the essential
commands to decode the original Amiga ILBM/ANIM frames, fix common
framerate issues, correct non-square pixel aspect ratios, and export a
clean video compatible with modern media players.
Prerequisites
Ensure you have a recent build of FFmpeg installed and accessible from your terminal or command prompt. FFmpeg includes native support for the Amiga IFF demuxer and its underlying graphical formats (such as ILBM and ByteRun1).
Step 1: Basic Conversion Command
If your IFF file contains standard timing metadata, you can convert it directly to an H.264 MP4 file using the following command:
ffmpeg -i input.anim -c:v libx264 -pix_fmt yuv420p output.mp4-i input.anim: Specifies your source Amiga file.-c:v libx264: Encodes the video stream to H.264.-pix_fmt yuv420p: Converts the Amiga color palette into a standard YUV 4:2:0 pixel format required by modern players like QuickTime, web browsers, and standard media devices.
Step 2: Fixing Framerate Issues
Many Amiga animations did not store fixed frame rates, or they relied on vertical blank interrupts (such as 50 Hz for PAL or 60 Hz for NTSC) or custom delay counters. If your converted video plays too quickly or slowly, explicitly declare the framerate:
ffmpeg -framerate 15 -i input.anim -c:v libx264 -pix_fmt yuv420p output.mp4Adjust the -framerate value (typically between
10 and 30 for standard Amiga computer
animations) to match the intended playback speed of the original
creation.
Step 3: Correcting Aspect Ratio (Non-Square Pixels)
Classic Amiga screen modes often used rectangular pixels. For example, Low-Res PAL (320x256) or NTSC (320x200) modes were designed to fill 4:3 CRT monitors. If your output looks squashed or stretched, apply scaling filters to scale the output to modern square pixels:
ffmpeg -framerate 15 -i input.anim -vf "scale=iw*4:ih*4:flags=neighbor,setdar=4/3" -c:v libx264 -pix_fmt yuv420p output.mp4scale=iw*4:ih*4:flags=neighbor: Upscales the low-resolution video four times using nearest-neighbor scaling to preserve crisp, retro pixel art without introducing blurriness.setdar=4/3: Forces the display aspect ratio to standard 4:3.
Step 4: Converting to Animated GIF
If you prefer an animated GIF over a modern video file, use FFmpeg's palettegen and paletteuse filters to maintain accurate Amiga colors:
ffmpeg -framerate 15 -i input.anim -vf "split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif