Last active
August 29, 2015 14:08
-
-
Save arturom/23946e1a514728f6f909 to your computer and use it in GitHub Desktop.
Install ffmpeg bins from static build
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
# ------------------------------------------- | |
# INSTALL ffmpeg BINARIES FROM STATIC BUILD | |
# ------------------------------------------- | |
FFMPEG_PATH="/usr/bin/ffmpeg" | |
FFPROBE_PATH="/usr/bin/ffprobe" | |
STATIC_BIN_URL=${1:-"http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz"} | |
#uninstall ffmpeg via apt-get | |
echo -e "\e[36mremoving ffmpeg package\e[0m" | |
sudo apt-get --force-yes --yes remove ffmpeg | |
# Remove old version of ffmpeg | |
if [ -f $FFMPEG_PATH ]; then | |
echo -e "\e[36mdeleting ffmpeg and ffprobe\e[0m" | |
sudo rm $FFMPEG_PATH $FFPROBE_PATH | |
fi | |
# Grab new tarball with new ffmpeg binaries, extract it, and move them to /usr/bin/ | |
echo -e "\e[36mdownloading tarball from" $STATIC_BIN_URL "\e[0m" | |
cd /tmp/ \ | |
&& curl -LO $STATIC_BIN_URL \ | |
&& tar -xzvf $(basename $STATIC_BIN_URL ) \ | |
&& sudo mv ./ffmpeg ./ffprobe $(dirname $FFMPEG_PATH) \ | |
&& rm $(basename $STATIC_BIN_URL ) | |
# check if binary file exists | |
if [ -f $FFMPEG_PATH ]; then | |
ffmpeg -version \ | |
&& echo -e "\e[36mffmpeg upgraded succesfully\e[0m" | |
else | |
echo -e "\e[31mfailed to upgrade ffmppeg\e[0m" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment