I only just discovered that my three year old iPod Classic (5th generation) can play video. However, reencoding my videos for it proved difficult. The Apple product support page for the iPod classic says that it supports h264 video. I tried every recommended h264/x264 encoding method (1,2) that I could find, including Mencoder and HandBrake, but none of them worked for me. Each attempt resulted in the dreaded, “cannot be played on this iPod,” error.
Finally, I found that using HandBrakeCLI’s default FFmpeg encoder worked. The following commands create an MP4 file containing MPEG-4 video encoded at 350kbps, with AAC audio at 160kbps.
Faster, one-pass encoding:
HandBrakeCLI -i "$input" -o "$output" -e ffmpeg -b 350 --width 320 \ -a 1 -E faac -B 160 -R 48 -6 dpl2 \ -f mp4 -I
Slower, two-pass encoding:
HandBrakeCLI -i "$input" -o "$output" -e ffmpeg -b 350 --width 320 \ --two-pass --turbo \ -a 1 -E faac -B 160 -R 48 -6 dpl2 \ -f mp4 -I
Note that if you’re viewing widescreen video, the iPod will automatically zoom in to fill the screen vertically. This results in content cut off from the left and right sides. To prevent this, go to Video | Settings and turn off Fit to Screen.