Skip to content
26 changes: 15 additions & 11 deletions build-ffmpeg
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# LICENSE: https://github.com/markus-perl/ffmpeg-build-script/blob/master/LICENSE

PROGNAME=$(basename "$0")
FFMPEG_VERSION=5.0
SCRIPT_VERSION=1.37
FFMPEG_VERSION=5.1
SCRIPT_VERSION=1.41
CWD=$(pwd)
PACKAGES="$CWD/packages"
WORKSPACE="$CWD/workspace"
Expand Down Expand Up @@ -346,12 +346,12 @@ if build "nasm" "2.15.05"; then
build_done "nasm" "2.15.05"
fi

if build "zlib" "1.2.12"; then
download "https://www.zlib.net/zlib-1.2.12.tar.gz"
if build "zlib" "1.2.13"; then
download "https://www.zlib.net/zlib-1.2.13.tar.gz"
execute ./configure --static --prefix="${WORKSPACE}"
execute make -j $MJOBS
execute make install
build_done "zlib" "1.2.12"
build_done "zlib" "1.2.13"
fi

if build "m4" "1.4.19"; then
Expand Down Expand Up @@ -477,7 +477,7 @@ fi
if ! $MACOS_M1; then
if build "svtav1" "0.9.0"; then
# Last known working commit which passed CI Tests from HEAD branch
download "https://github.com/AOMediaCodec/SVT-AV1/archive/refs/tags/v0.9.0.tar.gz" "svtav1-0.9.0.tar.gz"
download "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v0.9.0/SVT-AV1-v0.9.0.tar.gz" "svtav1-0.9.0.tar.gz"
cd "${PACKAGES}"/svtav1-0.9.0//Build/linux || exit
execute cmake -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DENABLE_SHARED=off -DBUILD_SHARED_LIBS=OFF ../.. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
execute make -j $MJOBS
Expand Down Expand Up @@ -768,11 +768,15 @@ if build "libtheora" "1.1.1"; then
sed "s/-fforce-addr//g" configure >configure.patched
chmod +x configure.patched
mv configure.patched configure
##BEGIN CONFIG.GUESS PATCH -- Updating config.guess file. Which allowed me to compile on aarch64 (ARMv8) [linux kernel 4.9 Ubuntu 20.04]
rm config.guess
curl -L --silent -o "config.guess" "https://raw.githubusercontent.com/gcc-mirror/gcc/master/config.guess"
chmod +x config.guess
##END OF CONFIG.GUESS PATCH

if ! $MACOS_M1; then
##BEGIN CONFIG.GUESS PATCH -- Updating config.guess file. Which allowed me to compile on aarch64 (ARMv8) [linux kernel 4.9 Ubuntu 20.04]
rm config.guess
curl -L --silent -o "config.guess" "https://raw.githubusercontent.com/gcc-mirror/gcc/master/config.guess"
chmod +x config.guess
##END OF CONFIG.GUESS PATCH
fi

execute ./configure --prefix="${WORKSPACE}" --with-ogg-libraries="${WORKSPACE}"/lib --with-ogg-includes="${WORKSPACE}"/include/ --with-vorbis-libraries="${WORKSPACE}"/lib --with-vorbis-includes="${WORKSPACE}"/include/ --enable-static --disable-shared --disable-oggtest --disable-vorbistest --disable-examples --disable-asm --disable-spec
execute make -j $MJOBS
execute make install
Expand Down