
We'll need Mencoder for this.
If you want to reencode a video using the XviD video codec and the MP3 audio codec (using Lame), it's best to do it in two passes, like this:
In the second command, change the 500 value to whatever bitrate
you need (in Kb per seconds). You also use a negative value if you want
to specify a (very approximate) file size, like -600000
for a 600 M file.