For best quality, use double pass method, similar to Youtube:
Code:
mencoder source.wmv -o output.flv -oac mp3lame -lameopts q=9:mode=3 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=256:mbd=2:trell:v4mv:last_pred=3:vpass=1:turbo -mc 1 -ofps 30 -of lavf -vf harddup -nosound
mencoder source.wmv -o output.flv -oac mp3lame -lameopts q=9:mode=3 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=256:mbd=2:trell:v4mv:last_pred=3:vpass=2 -mc 1 -ofps 30 -of lavf -vf harddup