I use ffmpeg in order to convert a file from avi to mp4 format.1 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