Convert Video to Autodesk Animator FLI/FLC with FFmpeg
This article provides a step-by-step guide on how to convert modern video files into the legacy Autodesk Animator (FLI/FLC) format using the FFmpeg command-line tool. You will learn the specific constraints of the FLI/FLC format—such as resolution limits and color depth—and the exact FFmpeg commands required to perform the conversion successfully.
Understanding FLI/FLC Constraints
Before converting, you must format your source video to meet the strict technical limitations of the Autodesk Animator format:
- Color Depth: Both FLI and FLC formats only support an 8-bit indexed color palette (maximum of 256 colors).
- FLI Resolution: Strictly limited to 320x200 pixels.
- FLC Resolution: Supports variable resolutions (typically 640x480 or custom sizes), but both width and height must be even numbers.
- Audio: Neither FLI nor FLC formats support audio tracks. FFmpeg will automatically discard any audio during conversion.
Basic Conversion Commands
To convert a video, you must scale the input to the correct
dimensions and set the pixel format to pal8 (8-bit
palettized color) so the flic encoder can process it.
Converting to FLI (320x200)
Run the following command to convert a video to the classic 320x200 FLI format:
ffmpeg -i input.mp4 -vf "scale=320:200" -c:v flic -pix_fmt pal8 output.fliConverting to FLC (e.g., 640x480)
To convert to the FLC format with a larger resolution, use this command:
ffmpeg -i input.mp4 -vf "scale=640:480" -c:v flic -pix_fmt pal8 output.flcImproving Color Quality with a Custom Palette
Standard 8-bit conversion can result in color banding or dithering
artifacts. To achieve the best possible visual quality, you can use
FFmpeg’s palettegen and paletteuse filters.
This two-step process generates a custom 256-color palette tailored
specifically to your video’s content.
Step 1: Generate the Custom Palette
ffmpeg -i input.mp4 -vf "scale=640:480,palettegen" -y palette.pngStep 2: Convert the Video Using the Palette
ffmpeg -i input.mp4 -i palette.png -filter_complex "[0:v]scale=640:480[sc];[sc][1:v]paletteuse" -c:v flic -pix_fmt pal8 output.flc(Note: Replace 640:480 with 320:200 and
change the output extension to .fli if you are targeting
the FLI format.)
Adjusting Framerate (Optional)
Legacy FLI/FLC players often struggle with high framerates. If you
need to limit the video to a standard retro framerate (like 15 or 12
frames per second), add the -r flag to your command:
ffmpeg -i input.mp4 -vf "scale=320:200" -r 15 -c:v flic -pix_fmt pal8 output.fli