Handbrake iPhone Batch Conversions
![]()
So I finally broke down and bought an iPhone recently. Over Christmas, I'm planning on driving down to Florida, and I'll be needing some entertainment. Like a lot of folks, I've backed up my DVDs to AVIs so I can watch them on my laptop on the go. Handbrake is a phenomenal tool for trancoding media to different formats. It comes with a whole queuing system to help do batch conversions, but its still tedious if you are trying to convert more than a few.
Thats where HandbrakeCLI comes in. Like the name references, HandbrakeCLI is a command line tool for doing the transcoding. The funny thing is, I assumed if I had already installed Handbrake, it must have installed HandbrakeCLI as well. WRONG. HandbrakeCLI is a separate download. Grab it from the Handbrake download page and install it.
To make it easy, drop all the files you want to convert into one folder. Fire up Terminal, change to the directory where all the original AVIs are. Type the following command:
apply '/Applications/HandBrakeCLI -i %1 -o %1.mp4 --preset="iPhone & iPod Touch" ' *.avi
Basically, apply lets your run a command on a set of input data. The *.avi is the input data, which lists all the files in the current directory. The apply command takes each of the files names returned by *.avi and runs the HandBrakeCLI string with it, replacing the %1 with the filenames. The -i tells HandBrakeCLI the input file, the -o says what the output or resulting files should be named, and the --preset tells HandbrakeCLI the format the output file should be in.
Thats pretty much it.
Comments [0]