Created
May 3, 2018 10:39
-
-
Save the-eric-kwok/64fb41830f0cf017ac87b31852d46c8c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
VIDEO=$1 | |
ASS=$2 | |
OUTPUT=$3 | |
help(){ | |
echo "Usage: burn_ass.sh <video> <ass sub> <output>" | |
} | |
burn(){ | |
ffmpeg -i "$VIDEO" -vf "ass=$ASS" "$OUTPUT" | |
} | |
install(){ | |
sudo apt-get install -y ffmpeg | |
} | |
dpkg -l | grep 'ffmpeg' > /dev/null | |
FLAG=$? | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then | |
help | |
elif [ $FLAG ]; then | |
burn | |
else | |
echo "ffmpeg not found, installing..." | |
install | |
burn | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment