Skip to content

Instantly share code, notes, and snippets.

@antoineMoPa
Created April 28, 2023 01:07
Show Gist options
  • Save antoineMoPa/20f93eb446f2066015b6454617ea38af to your computer and use it in GitHub Desktop.
Save antoineMoPa/20f93eb446f2066015b6454617ea38af to your computer and use it in GitHub Desktop.
ARCH=$(uname -m)
echo "Detected OS: GNU/Linux"

if [[ "$ARCH" == "x86_64" ]]; then
    echo "Detected 64 bit intel"
    BINARIES_URL="https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2023-04-19-14-14/ffmpeg-n5.1.3-6-g1e413487bf-linux64-gpl-shared-5.1.tar.xz -O ffmpeg.tar.xz"
elif [[ "$ARCH" == "aarch64" ]]; then
    # ARM linux setup
    echo "Detected ARM"
    BINARIES_URL="https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2023-04-19-14-14/ffmpeg-n5.1.3-6-g1e413487bf-linuxarm64-gpl-shared-5.1.tar.xz"
else
    echo "\n\n\UNSUPPORTED ARCH $ARCH\n\n\n"
    exit 1
fi

rm -rf ./ffmpeg-bin
mkdir ./ffmpeg-bin
cd ./ffmpeg-bin
wget $BINARIES_URL
tar -xf ffmpeg.tar.xz
rm ffmpeg.tar.xz
mv $(ls -1) ffmpeg

ldconfig $(realpath .)/ffmpeg/lib/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment