Since I'm realy lazy, using the Handbrake App everytime I wanted to convert an episode of The Big Bang Theory for my iPhone was just to munch work .
This is where the HandBrakeCLI and Automator come in handy.
I created an automator program, which converts any supported video format with the iPhone presets and saves it as originalfilename.mov in the same folder as the original video file. All you need to do is drag and drop the file you want to convert on the automator program.
Since I put this together with the help of the internets, I thought giving something back would only be fair.
1. Create a "Program" in automator.
2. Add a "Run Shell Script" action with this script:
Code: Select all
for f in "$@"
do
echo "Converting $f for iPhone";
echo "$f.mov";
/opt/local/bin/HandBrakeCLI -i "$f" -o "$f.mov" -e x264 -S 100 -a 1 -E faac -B 128 -R 48 -6 dpl2 -f mp4 -X 480 -m -x level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fast-pskip=1;
done
3. In the "Run Shell Script" action, set "Pass input" to "as arguments".
4. Save and close automator.
5. Drag any supported video format on your automator program in finder.
6. Profit!
Please note that -S 100 tells HandBrake to create a new file with the maximum size of 100MB. I use 100MB because I only convert small shows with it. They still look great on the iPhone at 100MB.
/opt/local/bin/HandBrakeCLI -i "$f" -o "$f.mov" -e x264 -S 100 -a 1 -E faac -B 128 -R 48 -6 dpl2 -f mp4 -X 480 -m -x level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fast-pskip=1;