For converting just one format to another, you can use ffmpeg:
ffmpeg -i myfirstvideo.mpeg myoutputvideo.avi
The program has its own defaults in terms of compression, etc., but there are extra flags that can be added to change resolution, sound quality, and so forth. Frequently I use the -sameq for matching quality of original to conversion.
This script loops through a whole directory of mpg and converts them to avi (at 1000K quality):
for f in *.mpg; do ffmpeg -i "$f" -vcodec libxvid -acodec libmp3lame -b 1000000 "${f%.mpg}.avi"; done
Note: This is case sensitive! *.mpg is not the same as *.MPG