Skip to content

Instantly share code, notes, and snippets.

@arturom
Last active August 29, 2015 14:08
Show Gist options
  • Save arturom/23946e1a514728f6f909 to your computer and use it in GitHub Desktop.
Save arturom/23946e1a514728f6f909 to your computer and use it in GitHub Desktop.
Install ffmpeg bins from static build
# -------------------------------------------
# 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