I often get a folder full of videos of my niece from my family. They live out in Arizona, so I don’t get to see them regularly; these videos are often the only way I can watch my niece grow up. The problem is that they’re always saved as .avi files, which aren’t compatible with iTunes. This makes it difficult to watch them on my television through my Apple TV.
The application Handbrake will easily convert them (and most other videos) to the proper format, but Handbrake has no way to batch convert them. The only way to do it is to manually load each individual movie into the queue. This can be time consuming if you have a large amount of files to convert. I recently discovered that Handbrake has a command line version of the software that you can use with AppleScript to automate all of its functions.
After some searching, I found a Mac user who wrote an AppleScript that will monitor a specific folder looking for things to convert. His script is set up to watch for .avi and .mkv videos and will convert them using a special preset. I’ve modified the script so that it watches the folder I want it to and uses the Normal preset within Handbrake. I also have it set up to not play nice with my system and instead use every scrap of processing power to convert the video. Needless to say, I only run it when I don’t need my computer, but the videos will convert faster. With a little patience and some Googling, you should have no problem modifying it to suit your needs.
You’ll need to have the command line utility of Handbrake installed in your Applications folder for this to work. If you run the script as an application, you’ll have no notification of when it’s done other than the script disappearing from the dock. You can download his AppleScript by clicking here. He has links to all the required components on his website as well.
I’ve loved Handbrake since I found the program—this handy script just made it even better.