Last active
August 15, 2022 20:44
-
-
Save janvojt/5cb21102b52fc228e5eb94895724ff62 to your computer and use it in GitHub Desktop.
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 will compress videos from GoPro Hero 5 using h.265 codec. | |
USAGE="Usage: $0 file1 file2 ... fileN" | |
if [ "$#" == "0" ]; then | |
echo "$USAGE" | |
exit 1 | |
fi | |
while (( "$#" )); do | |
srcFile="$1" | |
dstFile=$(echo "$srcFile" | sed 's/\.mp4$//i')".m4v" | |
echo "Converting '$srcFile' into '$dstFile' ..." | |
HandBrakeCLI -i "$srcFile" -o "$dstFile" -e x265 -q 14 -r 30 -B 128 | |
echo "Done converting '$srcFile' into '$dstFile'." | |
shift | |
done # end while |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment