How can I select the desired audio & video codec for the recording?

For e.g. I want my video recording saved in XviD Video Codec with my choice of bit rate like 1000Kbps and audio recording in MP3 like 48.0Khz 32Kbps.

Instant reply would be great