The following command converts all AVI files in a directory to H264 480p using ffmpeg :
1 | FOR /F "tokens=*" %G IN ( 'dir /b *.avi' ) DO ffmpeg -i "%G" -codec: v libx264 -preset slow -b: v 500k -maxrate 500k -bufsize 1000k -vf scale=-1:480 -threads 0 -codec:a aac -b:a 128k "%~nG.mp4" |