Created
August 9, 2015 11:35
-
-
Save blacktaxi/2a4a120e35a5c5c012e1 to your computer and use it in GitHub Desktop.
Save space on HD phone videos
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 | |
# this script recodes phone videos to a lower bitrace encoding to save space. | |
# phones typically encode at a very high bitrate because they don't have enough | |
# CPU power to do a more compressed encoding in real time. | |
# generally this recoding does not affect perceived video quality. | |
# USAGE: encodevid.sh [path] | |
QUALITY=26.0 | |
INPATH=$1 | |
OUTPATH="${1%*.}-recoded-at-$QUALITY.${1##*.}" | |
echo "Recoding $INPATH -> $OUTPATH with q=$QUALITY..." | |
/Applications/HandBrakeCLI \ | |
--format av_mp4 --encoder x264 \ | |
--encoder-tune film --vfr \ | |
--quality $QUALITY --aencoder \ | |
copy --keep-display-aspect \ | |
-i "$INPATH" -o "$OUTPATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment