Created
August 5, 2013 20:48
-
-
Save sadlerjw/6159489 to your computer and use it in GitHub Desktop.
Shell script to do batch encoding using HandBrakeCLI. Automatically invokes HandBrakeCLI on each file passed in (you can also use BASH wildcards) and creates a new .m4v file (if one doesn't already exist). My script uses the "AppleTV 2" preset - just modify the script to use a different one.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in "${@}" | |
do | |
if [ ! -f "${f%.*}.m4v" ]; then | |
HandBrakeCLI --preset="AppleTV 2" -i "$f" -o "${f%.*}.m4v" | |
else | |
echo "Skpping $f - already exists: ${f%.*}.m4v" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment