for file in *.mov; do mencoder -ovc xvid -oac pcm -xvidencopts pass=2:bitrate=800 -fps 12.607 "$file" -o "$file.avi"; done
note: -ovc is for video; xvid and mpeg4 are the ones I usually try first. -oac is for audio; pcm and mp3lame are the ones I prefer. -fps is set accordingly to original video property. my default setting would be 25fps (PAL)
from avi to flv (multiple files)
for file in *.avi; do ffmpeg -i "$file" -ar 22050 -ab 192000 -f flv -s 320x240 -aspect 4:3 "$file.flv"; done
note: -ar values i would usually use are 22050 and 44100. -ab values are counted in bit per second -s value can be adjusted accordingly -aspects are 4:3, 16:9 and one more I rarely use.