# Maintainer : Daniel Bermond # Contributor: Kamran Mackey # Contributor: richteer # Contributor: DrZaius pkgname=ffmpeg-git pkgver=6.1.r112534.ge5f774268a pkgrel=1 pkgdesc='Complete solution to record, convert and stream audio and video (git version)' arch=('x86_64') url='https://www.ffmpeg.org/' license=('GPL3') depends=( alsa-lib aom bzip2 fontconfig fribidi gmp gnutls gsm jack lame libass.so libavc1394 libbluray.so libbs2b.so libdav1d.so libdrm libfreetype.so libgl libiec61883 libjxl.so libmodplug libopenmpt.so libpulse librav1e.so libraw1394 librsvg-2.so libsoxr libssh libtheora libva.so libva-drm.so libva-x11.so libvdpau libvidstab.so libvorbisenc.so libvorbis.so libvpx.so libwebp libx11 libx264.so libx265.so libxcb libxext libxml2 libxv libxvidcore.so libzimg.so ocl-icd onevpl opencore-amr openjpeg2 opus sdl2 speex srt svt-av1 v4l-utils vmaf vulkan-icd-loader xz zlib ) makedepends=( amf-headers avisynthplus clang ffnvcodec-headers git ladspa mesa nasm opencl-headers vulkan-headers ) optdepends=('avisynthplus: for AviSynthPlus support' 'ladspa: for LADSPA filters' 'nvidia-utils: for Nvidia NVDEC/NVENC support' 'onevpl-intel-gpu: for Intel Quick Sync Video') provides=('libavcodec.so' 'libavdevice.so' 'libavfilter.so' 'libavformat.so' 'libavutil.so' 'libpostproc.so' 'libswresample.so' 'libswscale.so' 'ffmpeg') conflicts=('ffmpeg') source=('git+https://git.ffmpeg.org/ffmpeg.git' '040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch' '060-ffmpeg-fix-segfault-with-avisynthplus.patch') sha256sums=('SKIP' '9b94b90a33dc8ac9693d72c825e9c444df914428fce7cca61117146ee8f8c07b' '0e277c0d5e33612ca7a11025958133b17bfbe23168b0aee5bd07f674f6fd7440') prepare() { patch -d ffmpeg -Np1 -i "${srcdir}/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch" patch -d ffmpeg -Np1 -i "${srcdir}/060-ffmpeg-fix-segfault-with-avisynthplus.patch" } pkgver() { printf '%s.r%s.g%s' "$(git -C ffmpeg describe --tags --long | awk -F'-' '{ sub(/^n/, "", $1); print $1 }')" \ "$(git -C ffmpeg describe --tags --match 'N' | awk -F'-' '{ print $2 }')" \ "$(git -C ffmpeg rev-parse --short HEAD)" } build() { cd ffmpeg printf '%s\n' ' -> Running ffmpeg configure script...' ./configure \ --prefix='/usr' \ --disable-debug \ --disable-static \ --disable-stripping \ --disable-htmlpages \ --enable-amf \ --enable-avisynth \ --enable-cuda-llvm \ --enable-lto \ --enable-fontconfig \ --enable-gmp \ --enable-gnutls \ --enable-gpl \ --enable-ladspa \ --enable-libaom \ --enable-libass \ --enable-libbluray \ --enable-libbs2b \ --enable-libdav1d \ --enable-libdrm \ --enable-libfreetype \ --enable-libfribidi \ --enable-libgsm \ --enable-libiec61883 \ --enable-libjack \ --enable-libjxl \ --enable-libmodplug \ --enable-libmp3lame \ --enable-libopencore_amrnb \ --enable-libopencore_amrwb \ --enable-libopenjpeg \ --enable-libopenmpt \ --enable-libopus \ --enable-libpulse \ --enable-librav1e \ --enable-librsvg \ --enable-libsoxr \ --enable-libspeex \ --enable-libsrt \ --enable-libssh \ --enable-libsvtav1 \ --enable-libtheora \ --enable-libv4l2 \ --enable-libvidstab \ --enable-libvmaf \ --enable-libvorbis \ --enable-libvpl \ --enable-libvpx \ --enable-libwebp \ --enable-libx264 \ --enable-libx265 \ --enable-libxcb \ --enable-libxml2 \ --enable-libxvid \ --enable-libzimg \ --enable-nvdec \ --enable-nvenc \ --enable-opencl \ --enable-opengl \ --enable-shared \ --enable-version3 \ --enable-vulkan make make tools/qt-faststart } package() { make -C ffmpeg DESTDIR="$pkgdir" install install -D -m755 ffmpeg/tools/qt-faststart -t "${pkgdir}/usr/bin" }