This commit is contained in:
2026-03-31 13:33:49 +02:00
parent ada9206af1
commit aae769e47a
5 changed files with 15 additions and 1583 deletions
+8 -116
View File
@@ -3,8 +3,7 @@
pkgname=ffmpeg-full
pkgver=8.1
pkgrel=1
_svt_hevc_ver='4181c9ee0611baefb40b4c0ed10023cfd837d522'
pkgrel=1.1
_whispercpp_ver='1.8.3'
pkgdesc='Complete solution to record, convert and stream audio and video (all possible features including libfdk-aac)'
arch=('x86_64')
@@ -13,16 +12,10 @@ license=('LicenseRef-nonfree-and-unredistributable')
depends=(
'alsa-lib'
'aom'
'aribb24'
'avisynthplus' # loaded on-demand by dlopen()
'bzip2'
'cairo'
'celt'
'chromaprint-fftw'
'codec2'
'dav1d'
'davs2'
'flite1'
'fontconfig'
'freetype2'
'frei0r-plugins' # loaded on-demand by dlopen()
@@ -31,42 +24,27 @@ depends=(
'glibc'
'glslang'
'gnutls'
'gsm'
'harfbuzz'
'jack'
'kvazaar'
'ladspa' # loaded on-demand by dlopen()
'lame'
'lcevcdec'
'lcms2'
'libaribcaption'
'libass'
'libavc1394'
'libbluray'
'libbs2b'
'libcaca'
'libcdio-paranoia'
'libdc1394'
'libdrm'
'libdvdnav'
'libdvdread'
'libfdk-aac'
'libgcc'
'libgcrypt'
'libgme'
'libgomp'
'libiec61883'
'libilbc'
'libjxl'
'libklvanc'
'liblc3'
'libmodplug'
'libmysofa'
'libopenmpt'
'libplacebo'
'libpulse'
'librabbitmq-c'
'libraw1394'
'librist'
'librsvg'
'libsoxr'
@@ -85,56 +63,32 @@ depends=(
'libxv'
'libwebp'
'lilv'
'mpeghdec'
'ocl-icd'
'openal'
'openapv'
'opencolorio'
'opencore-amr'
'opencv'
'openh264'
'openjpeg2'
'openvino'
'opus'
'qrencode'
'quirc'
'rav1e'
'rockchip-mpp'
'rtmpdump'
'rubberband'
'sdl2'
'shine'
'smbclient'
'snappy'
'sndio'
'speex'
'srt'
'svt-av1'
'svt-hevc'
'svt-jpeg-xs-git'
'svt-vp9'
'tesseract'
'twolame'
'uavs3d-git'
'v4l-utils'
'vapoursynth' # loaded on-demand by dlopen()
'vid.stab'
'vmaf'
'vo-amrwbenc'
'vulkan-icd-loader' # loaded on-demand by dlopen()
'vvenc'
'x264'
'x265'
'xavs'
'xavs2'
'xevd'
'xeve'
'xvidcore'
'xz'
'zeromq'
'zimg'
'zlib'
'zvbi')
'zlib')
optdepends=(
'nvidia-utils: for NVIDIA CUVID/NVDEC/NVENC support'
'vpl-runtime: for Intel Quick Sync Video')
@@ -143,12 +97,10 @@ makedepends=(
'clang'
'cmake'
'cuda'
'decklink-sdk'
'ffnvcodec-headers'
'git'
'gmp'
'libgl'
'libomxil-bellagio'
'lv2'
'nasm'
'opencl-headers'
@@ -166,9 +118,6 @@ conflicts=('ffmpeg')
source=("https://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz"{,.asc}
'git+https://github.com/lensfun/lensfun.git'
"https://github.com/ggml-org/whisper.cpp/archive/v${_whispercpp_ver}/whisper.cpp-${_whispercpp_ver}.tar.gz"
'010-ffmpeg-add-svt-hevc.patch'
"020-ffmpeg-add-svt-hevc-docs-g${_svt_hevc_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/${_svt_hevc_ver}/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch"
'030-ffmpeg-add-svt-vp9.patch'
'040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch'
'050-ffmpeg-fix-cuda-nvcc-with-gcc14.patch'
'060-ffmpeg-whisper.cpp-fix-pkgconfig.patch'
@@ -177,9 +126,6 @@ sha256sums=('b072aed6871998cce9b36e7774033105ca29e33632be5b6347f3206898e0756a'
'SKIP'
'SKIP'
'870ba21409cdf66697dc4db15ebdb13bc67037d76c7cc63756c81471d8f1731a'
'ff6dabc3cbef98d22cc8f081343d5c66b2564b3a898c2dbcc88baa5017d80232'
'a164ebdc4d281352bf7ad1b179aae4aeb33f1191c444bed96cb8ab333c046f81'
'73e516bd771024f100983d0b7a5d43b49fd1e992c83e6caec445b7338e79e8c2'
'95223dda645c15b3daf79cd4d55df5d4ac46207f749973396bb761b743586ed6'
'1bbd783da8483e2cffe99715125dddbd88c81ae36f28eee5ae7df5705c448077'
'98b3d28cbd13bb575c602785f6b8cb0b66ea3128ab5a3a82fc1645822320c136'
@@ -187,10 +133,6 @@ sha256sums=('b072aed6871998cce9b36e7774033105ca29e33632be5b6347f3206898e0756a'
validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8')
prepare() {
rm -f "ffmpeg-${pkgver}/libavcodec"/libsvt_{hevc,vp9}.c
patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/010-ffmpeg-add-svt-hevc.patch"
patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/020-ffmpeg-add-svt-hevc-docs-g${_svt_hevc_ver:0:7}.patch"
patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/030-ffmpeg-add-svt-vp9.patch"
patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch"
patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/050-ffmpeg-fix-cuda-nvcc-with-gcc14.patch"
patch -d "whisper.cpp-${_whispercpp_ver}" -Np1 -i "${srcdir}/060-ffmpeg-whisper.cpp-fix-pkgconfig.patch"
@@ -200,14 +142,14 @@ build() {
local _stagingdir="${srcdir}/staging"
local _pkgconfigdir="${_stagingdir}/lib/pkgconfig"
export PKG_CONFIG_PATH="${_pkgconfigdir}${PKG_CONFIG_PATH:+":${PKG_CONFIG_PATH}"}"
local -a _cmake_opts=(
'-GUnix Makefiles'
'-DBUILD_SHARED_LIBS:BOOL=OFF'
'-DCMAKE_BUILD_TYPE:STRING=None'
"-DCMAKE_INSTALL_PREFIX:PATH=${_stagingdir}"
'-Wno-dev')
# ffmpeg requires lensfun git master, but lensfun-git package wrongly installs its files to non-standard locations:
# https://aur.archlinux.org/cgit/aur.git/commit/?h=lensfun-git&id=7b7a2d4890df59cde62c7dbfde3cefd7868a2707
# building it locally as a static library for the time being - this also have the benefit of avoid rebuilding packages
@@ -221,7 +163,7 @@ build() {
sed -i \
-e 's/\(-llensfun\)/\1 -lglib-2.0 -lstdc++/' \
-e '/Cflags: /s/$/ -DCONF_LENSFUN_STATIC/' "${_pkgconfigdir}/lensfun.pc"
# whisper.cpp AUR package conflicts with imagemagick at the time of writing
# building it locally as a static library for the time being, as imagemagick is a commonly used package (high usage in pkgstats)
cmake -B build/whisper.cpp -S "whisper.cpp-${_whispercpp_ver}" \
@@ -229,16 +171,13 @@ build() {
-DWHISPER_BUILD_EXAMPLES:BOOL='OFF' \
-DWHISPER_BUILD_TESTS:BOOL='OFF'
cmake --build build/whisper.cpp --target install
cd "ffmpeg-${pkgver}"
printf '%s\n' ' -> Running ffmpeg configure script...'
export CFLAGS+=' -isystem/opt/cuda/include'
export LDFLAGS+=' -L/opt/cuda/lib64'
# fix build of libavfilter/asrc_flite.c with gcc 14
export CFLAGS+=' -Wno-error=incompatible-pointer-types'
./configure \
--prefix='/usr' \
--enable-lto \
@@ -254,7 +193,6 @@ build() {
--enable-gray \
\
--enable-alsa \
--enable-avisynth \
--enable-bzlib \
--enable-cairo \
--enable-chromaprint \
@@ -266,94 +204,56 @@ build() {
--enable-ladspa \
--enable-lcms2 \
--enable-libaom \
--enable-libaribb24 \
--enable-libaribcaption \
--enable-libass \
--enable-libbluray \
--enable-libbs2b \
--enable-libcaca \
--enable-libcelt \
--enable-libcdio \
--enable-libcodec2 \
--enable-libdav1d \
--enable-libdavs2 \
--enable-libdc1394 \
--enable-libdvdnav \
--enable-libdvdread \
--enable-libfdk-aac \
--enable-libflite \
--enable-libfontconfig \
--enable-libfreetype \
--enable-libfribidi \
--enable-libharfbuzz \
--enable-libglslang \
--enable-libgme \
--enable-libgsm \
--enable-libiec61883 \
--enable-libilbc \
--enable-libjack \
--enable-libjxl \
--enable-libklvanc \
--enable-libkvazaar \
--enable-liblc3 \
--enable-liblcevc-dec \
--enable-liblensfun \
--enable-libmodplug \
--enable-libmp3lame \
--enable-libmpeghdec \
--enable-liboapv \
--enable-libopencolorio \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-libopencv \
--enable-libopenh264 \
--enable-libopenjpeg \
--enable-libopenmpt \
--enable-libopenvino \
--enable-libopus \
--enable-libplacebo \
--enable-libpulse \
--enable-libqrencode \
--enable-libquirc \
--enable-librabbitmq \
--enable-librav1e \
--enable-librist \
--enable-librsvg \
--enable-librubberband \
--enable-librtmp \
--disable-libshaderc \
--enable-libshine \
--enable-libsmbclient \
--enable-libsnappy \
--enable-libsoxr \
--enable-libspeex \
--enable-libsrt \
--enable-libssh \
--enable-libsvtav1 \
--enable-libsvthevc \
--enable-libsvtjpegxs \
--enable-libsvtvp9 \
--disable-libtensorflow \
--enable-libtesseract \
--enable-libtheora \
--disable-libtls \
--disable-libtorch \
--enable-libtwolame \
--enable-libuavs3d \
--enable-libv4l2 \
--enable-libvidstab \
--enable-libvmaf \
--enable-libvo-amrwbenc \
--enable-libvorbis \
--enable-libvpx \
--enable-libvvenc \
--enable-libwebp \
--enable-libx264 \
--enable-libx265 \
--enable-libxevd \
--enable-libxeve \
--enable-libxavs \
--enable-libxavs2 \
--enable-libxcb \
--enable-libxcb-shm \
--enable-libxcb-xfixes \
@@ -361,19 +261,14 @@ build() {
--enable-libxvid \
--enable-libxml2 \
--enable-libzimg \
--enable-libzmq \
--enable-libzvbi \
--enable-lv2 \
--enable-lzma \
--enable-decklink \
--disable-mbedtls \
--enable-libmysofa \
--enable-openal \
--enable-opencl \
--enable-opengl \
--disable-openssl \
--disable-pocketsphinx \
--enable-sndio \
--enable-sdl2 \
--enable-vapoursynth \
--enable-vulkan \
@@ -392,9 +287,6 @@ build() {
--enable-nvdec \
--enable-nvenc \
--disable-ohcodec \
--enable-omx \
--enable-rkmpp \
--enable-v4l2-m2m \
--enable-vaapi \
--enable-vdpau
make