I use ffmpeg in order to convert a file from avi to mp4 format.[1. http://www.ipodtouchfans.com/forums/showthread.php?t=42996] In my case, I use cygwin in Windows PC and svn for download the ffmpeg, and compile it.
Once ffmpeg is installed, you can do like following to convert a file from avi to mp4 (H.264).
ffmpeg -i a.avi a.mp4
New blog post: Converting AVI to MP4 http://blog.breadncup.com/2010/02/09/converting-avi-to-mp4/