GIF to AVI Converter
Learn how to convert an animated GIF to AVI video using free desktop tools, and estimate the output video bitrate and file size before you convert.
AVI Output Calculator
Estimate bitrate and file size before running FFmpeg.
Why GIF to AVI needs a desktop tool
Browsers can read and display GIF files, but they cannot write AVI containers — AVI encoding requires native codec libraries such as libx264 or Xvid that are not available in a web sandbox. FFmpeg is the standard free tool: it runs entirely on your machine, supports every AVI codec variant, and processes files in seconds.
1 FFmpeg — basic H.264 in AVI
The simplest command reads the GIF and encodes it with H.264 inside an AVI container. Download FFmpeg free from ffmpeg.org.
Basic conversion (H.264, CRF 23)
ffmpeg -i input.gif -vcodec libx264 -crf 23 -pix_fmt yuv420p output.avi
Specify output frame rate (force 24 fps)
ffmpeg -i input.gif -r 24 -vcodec libx264 -crf 23 -pix_fmt yuv420p output.avi
Scale to 640 px wide and convert
ffmpeg -i input.gif -vf "scale=640:-2" -vcodec libx264 -crf 23 -pix_fmt yuv420p output.avi
2 Legacy Xvid / MPEG-4 inside AVI
Use Xvid or MPEG-4 if you need to play the AVI on very old hardware or software that does not support H.264.
MPEG-4 (libxvid) — widest legacy compatibility
ffmpeg -i input.gif -vcodec libxvid -qscale:v 5 -pix_fmt yuv420p output.avi
MPEG-4 (mpeg4) — built-in encoder, no extra libs needed
ffmpeg -i input.gif -vcodec mpeg4 -qscale:v 5 -pix_fmt yuv420p output.avi
-qscale:v 5 controls quality (1 = best, 31 = worst). A value of 3–6 is a good starting point.
3 Step-by-step: first-time users
- 1 Go to ffmpeg.org/download.html and download the static build for your OS.
- 2 Extract the archive and add the bin/ folder to your system PATH, or run FFmpeg from the extracted folder.
- 3 Open a terminal (Command Prompt on Windows, Terminal on macOS/Linux) and navigate to the folder containing your GIF.
- 4 Run the basic H.264 command above, replacing input.gif with your filename.
- 5 FFmpeg prints progress lines ending with a speed multiplier. When it returns to the prompt, your output.avi is ready.
- 6 Open the file in VLC or Windows Media Player to verify it plays correctly.
Tips for best results
- Add -pix_fmt yuv420p: GIFs use indexed color; H.264 needs YUV 4:2:0. Without this flag some players refuse to open the file.
- Force even dimensions: H.264 requires width and height to be divisible by 2. Use scale=640:-2 (note -2, not -1) to auto-round the height.
- Watch for variable delays: Some GIFs have inconsistent per-frame delays. Use -r 10 to override and output a clean constant frame rate.
- Batch conversion: To convert all GIFs in a folder: for %f in (*.gif) do ffmpeg -i "%f" -vcodec libx264 -crf 23 -pix_fmt yuv420p "%~nf.avi"
- Check codec availability: Run ffmpeg -encoders | grep x264 to confirm libx264 is included in your build. Most pre-built binaries include it.
Summary
Learn how to convert an animated GIF to AVI video using free desktop tools, and estimate the output video bitrate and file size before you convert.
How it works
- Install FFmpeg (free, open-source) from ffmpeg.org on Windows, macOS, or Linux.
- Enter your GIF dimensions, frame count, and desired quality in the calculator to preview the estimated AVI file size.
- Copy the recommended FFmpeg command and replace the filename placeholder with your actual GIF path.
- Run the command in a terminal — FFmpeg reads the GIF and writes an AVI file with the codec you chose.
- Play the resulting AVI in VLC or Windows Media Player to verify the output.
Use cases
- Convert a GIF animation to AVI for use in legacy video editing software.
- Embed a GIF loop inside an AVI container for older media players.
- Transcode a GIF to AVI with H.264 video for smaller file size.
- Batch-convert a library of animated GIFs to AVI for archiving.
- Prepare GIF-based motion graphics as AVI for import into PowerPoint or older NLEs.
- Convert product demo GIFs to AVI for distribution on platforms requiring that format.