Skip to content

Instantly share code, notes, and snippets.

@diegovar
Created October 7, 2012 23:14
Show Gist options
  • Save diegovar/3849928 to your computer and use it in GitHub Desktop.
Save diegovar/3849928 to your computer and use it in GitHub Desktop.
Convert mkv's to m4v's for iTunes
for f in *.mkv
do
echo converting $f
if [ -a "${f%.*}.srt" ]; then
/Applications/HandBrakeCLI -i "$f" -o "${f%.*}.m4v" --preset="AppleTV 2" --srt-file "${f%.*}.srt"
else
/Applications/HandBrakeCLI -i "$f" -o "${f%.*}.m4v" --preset="AppleTV 2"
fi
rm $f
done
echo finished converting and copying
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment