If you're going to use restricted codecs, then MEncoder is easier to setup than ffmpeg in Ubuntu due to ffmpeg not being compiled to support any restricted codecs. I'm not as familiar with using MEncoder, but these can help:
HOWTO Mencoder Introduction Guide
Encoding with MEncoder
transcoding wiki: MEncoder
As for ffmpeg, you will need to use a third-party repository such as Medibuntu or compile ffmpeg yourself if you plan on using restricted codecs such as mp3 and aac. The basic usage:
ffmpeg will use default values for anything you don't specify, such as bitrate.
ffmpeg -i inputvideo.avi output.mp4