So you have those old videos taken in your handy-cam that you'd want to convert to mp4 for better compatibility across devices and less storage footprint? And you want to batch convert all these videos?
This ruby-script should come handy for you.
STEP 1: Save a copy of the script in the directory where you've those old videos in .avi format, that you'd want to convert to mp4.
STEP 2: Run script as ruby convert_avi_to_mp4.rb
Note: You should have ruby and ffmpeg installed in your system before you run this script.