Last active
August 7, 2021 19:18
-
-
Save jorgemrisco/86e66cff9740842e35c98ff2a31f030f to your computer and use it in GitHub Desktop.
Handbrake script to convert all videos inside a folder (must have `HandBrakeCLI` installed)
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 | |
SRC="$1" | |
DEST="$2" | |
DEST_EXT=mp4 | |
HANDBRAKE_CLI=HandBrakeCLI | |
PRESET="Chromecast 1080p30 Surround" | |
for FILE in "$SRC"/* | |
do | |
echo $FILE | |
filename=$(basename "$FILE") | |
extension=${filename##*.} | |
filename=${filename%.*} | |
$HANDBRAKE_CLI -i "$FILE" -o "$DEST"/"$filename".$DEST_EXT --all-subtitles --preset="$PRESET" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment