Convert AVI to iPod Video

Older AVI files almost never play on an iPod. Here's how to re-encode them cleanly without losing quality.

AVI is a 1990s Microsoft container, and most AVI files in the wild use DivX, XviD or Cinepak video — none of which an iPod can decode. Conversion is mandatory, but it's painless.

Why AVI doesn't work on iPod

Two reasons. First, the AVI container itself isn't on the iPod's list of accepted formats. Second, the codecs typically used inside AVI files (DivX, XviD, MPEG-4 ASP) are similar to but not the same as the MPEG-4 profile the iPod supports.

The one-line FFmpeg conversion

ffmpeg -i movie.avi \
  -c:v libx264 -profile:v baseline -level 3.0 -crf 22 \
  -vf "scale=640:-2" \
  -c:a aac -b:a 128k -ac 2 \
  -movflags +faststart \
  movie.mp4

That's the whole job. A 700 MB AVI typically produces a 350–500 MB MP4 that looks identical on the iPod's small screen.

Using HandBrake instead

  1. Drag the .avi file into HandBrake.
  2. Pick the Apple 540p30 Surround preset.
  3. On the Video tab, set quality to RF 22.
  4. Click Start.

Audio gotchas with old AVIs

Many older AVI files contain MP3 audio at unusual sample rates (22.05 kHz mono, for example). HandBrake and FFmpeg both resample to 48 kHz stereo automatically when targeting AAC, so this is rarely a problem — but if you hear the audio playing at the wrong speed, force the sample rate with FFmpeg's -ar 48000 flag.

Tiny AVIs from the early 2000s

If your source is a 320×240 AVI from the dawn of online video, don't upscale it. Encode at the source resolution — you'll save 80% of the file size and the picture will look the same. Drop the -vf scale argument or let HandBrake pick the source resolution automatically.

Once the file is converted

Drop the resulting MP4 into iTunes or the Apple Devices app and sync to your iPod. The iTunes transfer guide walks through the sync process if you haven't done it before.