How come Quicktime plays .avi files but iTunes doesn't?
As per this MacRumors forum post:


  There are three ways to get .avi files to load into the iTunes library, these are packaging it in a supported format (QT-Pro workaround), adding extra entries to the CFBundleDocumentTypes (may cause problems when updating iTunes) or adding the movie-type meta-data to the file. Adding the movie-type meta-data to the file is the quickest, easiest and safest of all of these options (IMHO).


He then outlines a method to add the movie-type metadata.

in Terminal (requires Dev Tools)

$ SetFile -t "MooV" /path/to/movie.avi


Then run this Applescript:

tell application "Finder"
   set file type of file this_file to "MooV"
end tell


The original post I linked above has a full Applescript droplet or Folder Action that could do this automatically.