Created
May 12, 2018 13:26
-
-
Save the-eric-kwok/4afbc70ca4d99dc1b7a79d2a73827c06 to your computer and use it in GitHub Desktop.
Merge video and audio
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 | |
VIDEO=$1 | |
AUDIO=$2 | |
OUTPUT=$3 | |
help(){ | |
echo "Usage: burn_ass.sh <video> <ass sub> <output>" | |
} | |
burn(){ | |
ffmpeg -i ${VIDEO} -i ${AUDIO} -c:v copy ${OUTPUT} | |
} | |
install(){ | |
sudo apt-get install ffmpeg | |
} | |
dpkg -l | grep 'ffmpeg' > /dev/null | |
FFMPEG=$? | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then | |
help | |
elif [ ${FFMPEG} ]; 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