ffmpeg is a very fast video and audio converter that can also grab from a live audio/video source. It can also convert between arbitrary sample rates and resize video on the fly with a high quality polyphase filter.
The command line interface is designed to be intuitive, in the sense that ffmpeg tries to figure out all parameters that can possibly be derived automatically. You usually only have to specify the target bitrate you want.
As a general rule, options are applied to the next specified file. Therefore, order is important, and you can have the same option on the command line multiple times. Each occurrence is then applied to the next input or output file.