ffmpeg: Add 5.1.3 library (with avfliter included)

This commit is contained in:
lat9nq 2023-05-14 19:58:58 -04:00
parent f9678324cd
commit 3d84c27b03
2 changed files with 43 additions and 0 deletions

BIN
ffmpeg/ffmpeg-5.1.3.7z Normal file

Binary file not shown.

43
ffmpeg/ffmpeg_compile.sh Executable file
View file

@ -0,0 +1,43 @@
#!/bin/bash
# This script compiles and creates a package for the FFmpeg version specified in VERSION.
# Compilation target is x86_64 mingw32
set -e
THIS=$(readlink -e $0)
VERSION=5.1.3
INSTALL_DIR=ffmpeg-${VERSION}
REQUIRED_DLLS_NAME=requirements.txt
if [ ! -d "FFmpeg" ]; then
git clone --branch "n${VERSION}" --depth 1 https://github.com/FFmpeg/FFmpeg.git
fi
cd FFmpeg
AVCODEC_VER=$(grep '#define LIBAVCODEC_VERSION_MAJOR' libavcodec/version_major.h | sed 's/.* //g')
AVUTIL_VER=$(grep '#define LIBAVUTIL_VERSION_MAJOR' libavutil/version.h | sed 's/.* //g')
SWSCALE_VER=$(grep '#define LIBSWSCALE_VERSION_MAJOR' libswscale/version_major.h | sed 's/.* //g')
AVFILTER_VER=$(grep '#define LIBAVFILTER_VERSION_MAJOR' libavfilter/version_major.h | sed 's/.* //g')
REQUIRED_DLLS="avcodec-${AVCODEC_VER}.dll;avutil-${AVUTIL_VER}.dll;libwinpthread-1.dll;swscale-${SWSCALE_VER}.dll;avfliter-${AVFILTER_VER}.dll"
if [ -d "build" ]; then
rm -rf build
mkdir build
else
mkdir build
fi
cd build
../configure --enable-cross-compile --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --disable-avdevice --disable-avformat --disable-doc --disable-everything --disable-ffmpeg --disable-ffprobe --disable-network --disable-postproc --disable-swresample --disable-vaapi --disable-vdpau --enable-decoder=h264 --enable-decoder=vp9 --enable-avfilter --enable-shared --prefix=/
make -j$(nproc)
mkdir ${INSTALL_DIR}
make install DESTDIR=${INSTALL_DIR}
cp ${THIS} ${INSTALL_DIR}
echo -n ${REQUIRED_DLLS} > ${INSTALL_DIR}/${REQUIRED_DLLS_NAME}
cp $(find /usr/x86_64-w64-mingw32/ | grep libwinpthread-1.dll | head -n 1) ${INSTALL_DIR}/bin
7z a ${INSTALL_DIR}.7z ${INSTALL_DIR}