Page 1 of 1

Convert avi with Handbrake for use with iPhone/iPod

Posted: September 25th, 2010, 4:30 am
by ProfDrLuigi

Code: Select all

#!/bin/bash

################## Change to Unpack-Path ##################
base=`basename "$1"`
cd "$1"
###########################################################

######## Pathes to the needed Binaries (change this)#######
handbrakecli="/opt/local/bin/HandBrakeCLI"
destination="/Volumes/Progs/iPod/Converts/"
###########################################################

################ Ignore upper and lowercase ###############
shopt -s nocaseglob
###########################################################

################## Scan every Sub-Folder ##################
find . -type d | while read VERZEICHNIS
    do
    cd "$VERZEICHNIS"
###########################################################

for a in *.{avi,mkv}; do
"$handbrakecli" -i "$a" -o "$destination""$a".mp4 --preset="iPhone & iPod Touch"
mv "$destination""$a".mp4 "$destination""${a/avi.mp4/.avi/}"
done

open -g -a /Applications/iTunes.app/ "$destination""$a".mp4 

cd -
done
This Script converts an AVI to iPhone/iPod and imports automatic to itunes.

Re: Convert avi with Handbrake for use with iPhone/iPod

Posted: November 7th, 2010, 4:54 pm
by th3joker
posted in wrong thread sorry :-)