A Windows-safe Perl script to batch convert video files to mp4

Posted

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).

The script source can be found here. Ffmpeg is of course the fast and versatile command-line video editing tool, and can be found here.

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.)

 

Comments

There are currently no comments on this article.

Comment

Enter your comment below. Fields marked * are required. You must preview your comment first before finally posting.





← Older Newer →