Skip to content

Instantly share code, notes, and snippets.

@the-eric-kwok
Created May 3, 2018 10:39
Show Gist options
  • Save the-eric-kwok/64fb41830f0cf017ac87b31852d46c8c to your computer and use it in GitHub Desktop.
Save the-eric-kwok/64fb41830f0cf017ac87b31852d46c8c to your computer and use it in GitHub Desktop.
#!/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