I recently had a need to convert a massive amount of old video clips to mp4. They were in varying formats: wmv, mpg, avi, mov. I wrote this script to do it. The file size is usually around half of the original file, though of course this can vary wildly, and if attaining particular size is your goal, you should read up on ffmpeg’s encoding options and substitute as necessary. Any quality loss is undetectable to me, although if it is to you, you can always decrease the CRF (currently 20, though even most videophiles agree that going below 18 is a waste of time).
I use Strawberry Perl on Windows, which is a pretty nice install-it-then-forget-it Perl solution. It just works. You can run it either by double-clicking the .pl file or with
perl mp4fix.pl on the command line. (Protip: to open a command window anywhere in Windows 7, just type “cmd” into the address bar.)