In order to convert video from one format to another, the following packages need to be installed:
sudo apt-get install mencoder
When installed the following command can be used to run the video converter:
mencoder [source_file] -ovc xvid -oac mp3lame -xvidencopts bitrate=400 -o [target_file]
Other codec options can also be provided instead of xvid and mp3lame. Similarly the bitrate and other options can also be altered.