Encode Video with mencoder

How to encode a video with decent quality using mencoder

Use these settings for DVDs:

mencoder VTS_01_1.VOB -oac mp3lame -lameopts preset=128 -srate 44100 -af volume=+3db,resample=44100:0:2 -ovc xvid -xvidencopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg:threads=2:bitrate=2000 -sid 7999 -vf scale=1024:576 -force-avi-aspect 16:9.0 -o movie.avi

Add the option pp=ci to -vf to use cubic deinterlacing for movies from TV.