# Maintainer: Martchus # Contributor: Ben Widawsky # Contributor: Rob McCathie # Contributor: Ionut Biru # Contributor: Bartomiej Piotrowski # Contributor: Maxime Gauduin # Contributor: Tom Newsom # Contributor: Paul Mattal _name=ffmpeg pkgname=ffmpeg-custom pkgver=4.3.2 _svt_hevc_ver='1.5.0' _svt_av1_ver='0.8.4' _svt_vp9_ver='0.3.0' pkgrel=1 epoch=1 pkgdesc='Complete solution to record, convert and stream audio and video (with more features enabled than regular ffmpeg)' arch=('x86_64') url='https://ffmpeg.org/' license=('GPL3' 'custom:libfdk-aac') depends=( alsa-lib aom bzip2 fontconfig fribidi gmp gnutls gsm jack lame libass.so libavc1394 libbluray.so libdav1d.so libdrm libfreetype.so libiec61883 libmfx libmodplug libpulse librav1e.so libraw1394 libsoxr libssh libtheora libva-drm.so libva-x11.so libva.so libvdpau libvidstab.so libvorbis.so libvorbisenc.so libvpx.so libwebp libx11 libx264.so libx265.so libxcb libxext libxml2 libxv libxvidcore.so libzimg.so opencore-amr openjpeg2 opus sdl2 speex srt v4l-utils vmaf xz zlib ocl-icd libfdk-aac librsvg svt-av1 #glslang - see note below svt-hevc svt-av1 svt-vp9 vulkan-icd-loader ) makedepends=( amf-headers avisynthplus clang ffnvcodec-headers git ladspa nasm vulkan-headers opencl-clhpp openal ) optdepends=( 'avisynthplus: AviSynthPlus support' 'intel-media-sdk: Intel QuickSync support' 'ladspa: LADSPA filters' 'nvidia-utils: Nvidia NVDEC/NVENC support' ) provides=( libavcodec.so libavdevice.so libavfilter.so libavformat.so libavutil.so libpostproc.so libswresample.so libswscale.so "ffmpeg=$pkgver" "ffmpeg-librsvg=$pkgver" ) conflicts=("$_name") _tag=f719f869907764e6412a6af6e178c46e5f915d25 source=( git+https://git.ffmpeg.org/ffmpeg.git#tag=${_tag} 'vmaf-model-path.patch' '017-ffmpeg-glslang-11.0-fix.patch'::'https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/4dab04622a6cf2a31da26a51dedb60ec44ac89a4' "020-ffmpeg-add-svt-hevc-${_svt_hevc_ver}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/v${_svt_hevc_ver}/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch" "030-ffmpeg-add-svt-hevc-docs-${_svt_hevc_ver}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/v${_svt_hevc_ver}/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch" "040-ffmpeg-add-svt-av1-${_svt_av1_ver}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-AV1/v${_svt_av1_ver}/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch" "050-ffmpeg-add-svt-vp9-${_svt_vp9_ver}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/v${_svt_vp9_ver}/ffmpeg_plugin/n4.3.1-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch" ) sha256sums=('SKIP' '8dff51f84a5f7460f8893f0514812f5d2bd668c3276ef7ab7713c99b71d7bd8d' '5b6815fc088d4acdc046eb223350a964bc998b0759aef90acf0591f65e7c98cb' 'b37d43d5d8692599347c6f1f316c13b9a9addc66d3ceb7e6e02341c494af7cdc' '1499e419dda72b1604dc5e3959668f3843292ff56bfba78734e31510ba576de0' '5e960b4dab495437082d0838a40a8cae9b67d1cef1ffd57da960afaa2bfd3719' 'b74be6d805672210e226e7c0b403f88b0ee8a53c732c9bdc873c4b44aeb75c96') #pkgver() { # cd ffmpeg # # git describe --tags | sed 's/^n//' #} prepare() { cd ffmpeg # fix glslang patch -Np1 -i "${srcdir}/017-ffmpeg-glslang-11.0-fix.patch" # add support for svt libraries rm -f libavcodec/libsvt_{hevc,av1,vp9}.c patch -Np1 -i "${srcdir}/020-ffmpeg-add-svt-hevc-${_svt_hevc_ver}.patch" patch -Np1 -i "${srcdir}/030-ffmpeg-add-svt-hevc-docs-${_svt_hevc_ver}.patch" patch -Np1 -i "${srcdir}/040-ffmpeg-add-svt-av1-${_svt_av1_ver}.patch" patch -Np1 -i "${srcdir}/050-ffmpeg-add-svt-vp9-${_svt_vp9_ver}.patch" patch -Np1 -i "${srcdir}"/vmaf-model-path.patch } build() { cd $_name ./configure \ --prefix=/usr \ --disable-debug \ --disable-static \ --disable-stripping \ --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-libdav1d \ --enable-libfreetype \ --enable-libfribidi \ --enable-libiec61883 \ --enable-libjack \ --enable-libmfx \ --enable-libgsm \ --enable-libmodplug \ --enable-libmp3lame \ --enable-libopencore_amrnb \ --enable-libopencore_amrwb \ --enable-libopenjpeg \ --enable-libopus \ --enable-libpulse \ --enable-librav1e \ --enable-libsoxr \ --enable-libspeex \ --enable-libsrt \ --enable-libssh \ --enable-libtheora \ --enable-libv4l2 \ --enable-libvidstab \ --enable-libvmaf \ --enable-libvorbis \ --enable-libvpx \ --enable-libwebp \ --enable-libx264 \ --enable-libx265 \ --enable-libxcb \ --enable-libxml2 \ --enable-libxvid \ --enable-libzimg \ --enable-nvdec \ --enable-nvenc \ --enable-omx \ --enable-shared \ --enable-version3 \ --enable-librsvg \ --enable-libfdk_aac \ --enable-libsvtav1 \ --enable-libsvthevc \ --enable-libsvtvp9 \ --enable-vaapi \ --enable-vdpau \ --enable-opencl \ --enable-openal \ --enable-vulkan \ --enable-nonfree # note: removing --enable-libglslang for now due to "ERROR: libglslang not found" make make tools/qt-faststart make doc/ff{mpeg,play}.1 cp /usr/share/licenses/libfdk-aac/NOTICE . } package() { cd $_name make DESTDIR="${pkgdir}" install install-man install -Dm 755 tools/qt-faststart "${pkgdir}"/usr/bin/ install -d "$pkgdir/usr/share/licenses/$pkgname" install -m 0644 NOTICE "$pkgdir/usr/share/licenses/$pkgname/NOTICE" } # vim: ts=2 sw=2 et: