diff options
-rwxr-xr-x | .SRCINFO | 31 | ||||
-rwxr-xr-x | PKGBUILD | 136 | ||||
-rw-r--r-- | ffmpeg-full-git-add-intel-svt-hevc-docs.patch | 173 |
3 files changed, 264 insertions, 76 deletions
@@ -1,15 +1,15 @@ pkgbase = ffmpeg-git-nc pkgdesc = Complete solution to record, convert and stream audio and video (all possible features including nvenc, qsv and libfdk-aac; Nonconflicting git version) - pkgver = 4.2.r92899.g1dcb5b7dca + pkgver = 4.3.r94543.g8fcc5d963e pkgrel = 1 url = https://www.ffmpeg.org/ - arch = i686 arch = x86_64 license = custom: nonfree and unredistributable makedepends = git makedepends = nasm makedepends = opencl-headers makedepends = ffnvcodec-headers + makedepends = vmaf makedepends = blackmagic-decklink-sdk depends = glibc depends = alsa-lib @@ -23,11 +23,13 @@ pkgbase = ffmpeg-git-nc depends = ladspa depends = libass depends = aom + depends = aribb24 depends = libbluray depends = libbs2b depends = libcaca depends = celt depends = libcdio-paranoia + depends = dav1d depends = libdc1394 depends = libavc1394 depends = libfdk-aac @@ -83,13 +85,13 @@ pkgbase = ffmpeg-git-nc depends = libx11 depends = libxext depends = zlib + depends = cuda depends = libomxil-bellagio depends = libva depends = libdrm depends = libvdpau depends = chromaprint-fftw depends = codec2 - depends = dav1d depends = davs2 depends = flite1-patched depends = libilbc @@ -100,10 +102,13 @@ pkgbase = ffmpeg-git-nc depends = shine depends = vo-amrwbenc depends = xavs - depends = xavs2-git - depends = ndi-sdk + depends = xavs2 depends = libmysofa + depends = intel-media-sdk depends = rockchip-mpp + depends = intel-svt-hevc + depends = intel-svt-av1 + depends = svt-vp9-git provides = libavcodec.so provides = libavdevice.so provides = libavfilter.so @@ -115,14 +120,18 @@ pkgbase = ffmpeg-git-nc provides = libswresample.so provides = ffmpeg provides = ffmpeg-full - provides = ffmpeg-git source = ffmpeg-git::git+https://git.ffmpeg.org/ffmpeg.git + source = ffmpeg-full-git-add-intel-svt-hevc-1.4.0.patch::https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/v1.4.0/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch + source = ffmpeg-full-git-add-intel-svt-hevc-docs.patch + source = ffmpeg-full-git-add-intel-svt-av1-0.6.0.patch::https://raw.githubusercontent.com/OpenVisualCloud/SVT-AV1/v0.6.0/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch + source = ffmpeg-full-git-add-intel-svt-vp9-gce24589.patch::https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/ce245894c6fc1c5d1439c41a7dda8d6dc61784c4/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9-with-svt-hevc-av1.patch source = LICENSE - sha256sums = SKIP - sha256sums = 04a7176400907fd7db0d69116b99de49e582a6e176b3bfb36a03e50a4cb26a36 - depends_x86_64 = cuda - depends_x86_64 = intel-media-sdk - makedepends_x86_64 = vmaf + sha512sums = SKIP + sha512sums = 495d1fa7b28ed470e5718f9667a3a5b7c3f4307bcb560067349de9df6f7644b2b899073a3ba787d78c9059836a3bc4bb50b97938d1bc2fa4e0a360e810bb06fb + sha512sums = eea24143f997de534167dee154fbdcf6b2577e2893923e3ece682a7fa31f52fdbdb82c76bec60bf55c94d41135c20b55afa2d2361542edc9fbaba16d78417953 + sha512sums = 4eb79ba87b3cf7fda69041b7500a34930872d035a319a56a3975fa96f2a679693420f435296ae819e10a33db520483f2ebe7c1a82fde1e8dcb48c023c85b53b3 + sha512sums = 2ecff18501845a900150e23893f929dc2699b1fc2486ab65a251c11bb9525f86e9e8dfe661e72dbb6957696202ce21ebf2212d2937a74526973bab7d39d7d316 + sha512sums = 828dfc54c10895888adb5373b10be8e39eb47e472a8a4bef632ec2dfa7d8ac79c57c5d51d9548fd8762a85a5f9677076b620903bd8c0cfa2418f790037b626a6 pkgname = ffmpeg-git-nc @@ -1,104 +1,108 @@ # Maintainer: F Carpano < gmail-com: daert781 > -## NOTE: This PKGBUILD is a nonconflicting version of ffmpeg-full-git. +## NOTE: This PKGBUILD is a nonconflicting version of ffmpeg-full. ## NOTE: It can be installed alongside the official one in the Extra repo. +_svt_hevc_ver='1.4.0' +_svt_av1_ver='0.6.0' +_svt_vp9_ver='ce245894c6fc1c5d1439c41a7dda8d6dc61784c4' + pkgname=ffmpeg-git-nc -_pkgname=ffmpeg-git -pkgver=4.2.r92899.g1dcb5b7dca +_srcname=ffmpeg-git +pkgver=4.3.r94543.g8fcc5d963e pkgrel=1 pkgdesc='Complete solution to record, convert and stream audio and video (all possible features including nvenc, qsv and libfdk-aac; Nonconflicting git version)' -arch=('i686' 'x86_64') +arch=('x86_64') url='https://www.ffmpeg.org/' license=('custom: nonfree and unredistributable') depends=( # official repositories: 'glibc' 'alsa-lib' 'jack' 'libpng' 'bzip2' 'frei0r-plugins' 'libgcrypt' 'gmp' 'gnutls' 'ladspa' 'libass' 'aom' - 'libbluray' 'libbs2b' 'libcaca' 'celt' 'libcdio-paranoia' 'libdc1394' - 'libavc1394' 'libfdk-aac' 'fontconfig' 'freetype2' 'fribidi' 'libgme' 'gsm' - 'libiec61883' 'lensfun' 'libmodplug' 'lame' 'opencore-amr' 'openjpeg2' 'opus' - 'pulseaudio' 'librsvg' 'rubberband' 'rtmpdump' 'snappy' 'libsoxr' - 'speex' 'srt' 'libssh' 'tensorflow' 'tesseract' 'libtheora' 'twolame' - 'v4l-utils' 'vid.stab' 'libvorbis' 'libvpx' 'wavpack' 'libwebp' 'libx264.so' - 'x265' 'libxcb' 'xvidcore' 'libxml2' 'zimg' 'zeromq' 'zvbi' 'lv2' 'lilv' 'xz' - 'openal' 'ocl-icd' 'libgl' 'sndio' 'sdl2' 'vapoursynth' 'libxv' 'libx11' - 'libxext' 'zlib' 'libomxil-bellagio' 'libva' 'libdrm' 'libvdpau' + 'aribb24' 'libbluray' 'libbs2b' 'libcaca' 'celt' 'libcdio-paranoia' 'dav1d' + 'libdc1394' 'libavc1394' 'libfdk-aac' 'fontconfig' 'freetype2' 'fribidi' + 'libgme' 'gsm' 'libiec61883' 'lensfun' 'libmodplug' 'lame' 'opencore-amr' + 'openjpeg2' 'opus' 'pulseaudio' 'librsvg' 'rubberband' 'rtmpdump' 'snappy' + 'libsoxr' 'speex' 'srt' 'libssh' 'tensorflow' 'tesseract' 'libtheora' + 'twolame' 'v4l-utils' 'vid.stab' 'libvorbis' 'libvpx' 'wavpack' 'libwebp' + 'libx264.so' 'x265' 'libxcb' 'xvidcore' 'libxml2' 'zimg' 'zeromq' 'zvbi' + 'lv2' 'lilv' 'xz' 'openal' 'ocl-icd' 'libgl' 'sndio' 'sdl2' 'vapoursynth' + 'libxv' 'libx11' 'libxext' 'zlib' 'cuda' 'libomxil-bellagio' 'libva' + 'libdrm' 'libvdpau' # AUR: - 'chromaprint-fftw' 'codec2' 'dav1d' 'davs2' 'flite1-patched' 'libilbc' + 'chromaprint-fftw' 'codec2' 'davs2' 'flite1-patched' 'libilbc' 'libklvanc-git' 'kvazaar' 'openh264' 'libopenmpt-svn' 'shine' 'vo-amrwbenc' - 'xavs' 'xavs2-git' 'ndi-sdk' 'libmysofa' 'rockchip-mpp' -) -depends_x86_64=( - # official repositories: - 'cuda' - # AUR: - 'intel-media-sdk' + 'xavs' 'xavs2' 'libmysofa' 'intel-media-sdk' 'rockchip-mpp' + 'intel-svt-hevc' 'intel-svt-av1' 'svt-vp9-git' ) makedepends=( # official repositories: 'git' 'nasm' 'opencl-headers' 'ffnvcodec-headers' # AUR: - 'blackmagic-decklink-sdk' -) -makedepends_x86_64=( - # AUR: - 'vmaf' + 'vmaf' 'blackmagic-decklink-sdk' ) provides=('libavcodec.so' 'libavdevice.so' 'libavfilter.so' 'libavformat.so' 'libavutil.so' 'libpostproc.so' 'libavresample.so' 'libswscale.so' - 'libswresample.so' 'ffmpeg' 'ffmpeg-full' 'ffmpeg-git') -source=($_pkgname::'git+https://git.ffmpeg.org/ffmpeg.git' + 'libswresample.so' 'ffmpeg' 'ffmpeg-full') +source=($_srcname::'git+https://git.ffmpeg.org/ffmpeg.git' + "ffmpeg-full-git-add-intel-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" + "ffmpeg-full-git-add-intel-svt-hevc-docs.patch" + "ffmpeg-full-git-add-intel-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-with-svt-hevc.patch" + "ffmpeg-full-git-add-intel-svt-vp9-g${_svt_vp9_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/${_svt_vp9_ver}/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9-with-svt-hevc-av1.patch" 'LICENSE') -sha256sums=('SKIP' - '04a7176400907fd7db0d69116b99de49e582a6e176b3bfb36a03e50a4cb26a36') +sha512sums=('SKIP' + '495d1fa7b28ed470e5718f9667a3a5b7c3f4307bcb560067349de9df6f7644b2b899073a3ba787d78c9059836a3bc4bb50b97938d1bc2fa4e0a360e810bb06fb' + 'eea24143f997de534167dee154fbdcf6b2577e2893923e3ece682a7fa31f52fdbdb82c76bec60bf55c94d41135c20b55afa2d2361542edc9fbaba16d78417953' + '4eb79ba87b3cf7fda69041b7500a34930872d035a319a56a3975fa96f2a679693420f435296ae819e10a33db520483f2ebe7c1a82fde1e8dcb48c023c85b53b3' + '2ecff18501845a900150e23893f929dc2699b1fc2486ab65a251c11bb9525f86e9e8dfe661e72dbb6957696202ce21ebf2212d2937a74526973bab7d39d7d316' + '828dfc54c10895888adb5373b10be8e39eb47e472a8a4bef632ec2dfa7d8ac79c57c5d51d9548fd8762a85a5f9677076b620903bd8c0cfa2418f790037b626a6') + +prepare() { + cd "$_srcname" + + # add intel-svt support for hevc, av1 and vp9 + git apply --index "${srcdir}/ffmpeg-full-git-add-intel-svt-hevc-${_svt_hevc_ver}.patch" + git apply --index "${srcdir}/ffmpeg-full-git-add-intel-svt-hevc-docs.patch" + git apply --index "${srcdir}/ffmpeg-full-git-add-intel-svt-av1-${_svt_av1_ver}.patch" + git apply --index "${srcdir}/ffmpeg-full-git-add-intel-svt-vp9-g${_svt_vp9_ver:0:7}.patch" +} pkgver() { - cd "$_pkgname" + cd "$_srcname" local _version local _revision local _shorthash - _version="$( git describe --tags --long | awk -F'-' '{ printf $1 }' | sed 's/^n//')" - _revision="$( git describe --tags --match 'N' | awk -F'-' '{ printf $2 }')" + _version="$( git describe --tags --long | awk -F'-' '{ sub(/^n/, "", $1); print $1 }')" + _revision="$( git describe --tags --match 'N' | awk -F'-' '{ print $2 }')" _shorthash="$(git rev-parse --short HEAD)" printf '%s.r%s.g%s' "$_version" "$_revision" "$_shorthash" } build() { - cd "$_pkgname" + cd "$_srcname" + + local _ldflags='-L/opt/cuda/lib64' - # set x86_64 specific options - if [ "$CARCH" = 'x86_64' ] + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}/opt/intel/mediasdk/lib64/pkgconfig" + + # set path of -lcuda on systems with legacy nvidia-340xx drivers + # (libcuda.so.x, required by --enable-cuda-nvcc) + if pacman -Qs '^nvidia-340xx-utils' >/dev/null 2>&1 then - local _libvmaf='--enable-libvmaf' - local _cudasdk='--enable-cuda-sdk' - local _libmfx='--enable-libmfx' - local _libnpp='--enable-libnpp' - - local _cflags='-I/opt/cuda/include' - local _ldflags='-L/opt/cuda/lib64' - - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}/opt/intel/mediasdk/lib64/pkgconfig" - - # set path of -lcuda (libcuda.so.x, required by cuda_sdk) - # on systems with legacy nvidia drivers - if pacman -Qs '^nvidia-340xx-utils' >/dev/null 2>&1 - then - _ldflags="${_ldflags} -L/usr/lib/nvidia" - fi + _ldflags+=' -L/usr/lib/nvidia' fi printf '%s\n' ' -> Running ffmpeg configure script...' ./configure \ --prefix='/usr' \ - --incdir="/usr/include/$_pkgname" \ - --libdir="/usr/lib/$_pkgname" \ - --shlibdir="/usr/lib/$_pkgname" \ - --extra-cflags="$_cflags" \ + --incdir="/usr/include/$pkgname" \ + --libdir="/usr/lib/$pkgname" \ + --shlibdir="/usr/lib/$pkgname" \ + --extra-cflags='-I/opt/cuda/include -I/usr/include/tensorflow' \ --extra-ldflags="$_ldflags" \ \ --disable-doc \ @@ -123,6 +127,7 @@ build() { --enable-iconv \ --enable-ladspa \ --enable-libaom \ + --enable-libaribb24 \ --enable-libass \ --enable-libbluray \ --enable-libbs2b \ @@ -166,6 +171,9 @@ build() { --enable-libspeex \ --enable-libsrt \ --enable-libssh \ + --enable-libsvthevc \ + --enable-libsvtav1 \ + --enable-libsvtvp9 \ --enable-libtensorflow \ --enable-libtesseract \ --enable-libtheora \ @@ -173,7 +181,7 @@ build() { --enable-libtwolame \ --enable-libv4l2 \ --enable-libvidstab \ - $_libvmaf \ + --enable-libvmaf \ --enable-libvo-amrwbenc \ --enable-libvorbis \ --enable-libvpx \ @@ -195,7 +203,6 @@ build() { --enable-lv2 \ --enable-lzma \ --enable-decklink \ - --enable-libndi_newtek \ --disable-mbedtls \ --enable-libmysofa \ --enable-openal \ @@ -208,12 +215,12 @@ build() { --enable-xlib \ --enable-zlib \ \ - $_cudasdk \ + --enable-cuda-nvcc \ --enable-cuvid \ --enable-ffnvcodec \ --enable-libdrm \ - $_libmfx \ - $_libnpp \ + --enable-libmfx \ + --enable-libnpp \ --enable-nvdec \ --enable-nvenc \ --enable-omx \ @@ -228,14 +235,13 @@ build() { } package() { - cd "$_pkgname" + cd "$_srcname" make DESTDIR="$pkgdir" install rm -rf ${pkgdir}/usr/share install -D -m755 tools/qt-faststart -t "${pkgdir}/usr/bin" - find ${pkgdir}/usr/bin -type f -exec mv {} {}-git \; - - install -D -m644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${_pkgname}" + find ${pkgdir}/usr/bin -type f -exec mv {} {}-git-nc \; + install -D -m644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" } diff --git a/ffmpeg-full-git-add-intel-svt-hevc-docs.patch b/ffmpeg-full-git-add-intel-svt-hevc-docs.patch new file mode 100644 index 000000000000..4998042c1db4 --- /dev/null +++ b/ffmpeg-full-git-add-intel-svt-hevc-docs.patch @@ -0,0 +1,173 @@ +diff -Nawurp a/doc/encoders.texi b/doc/encoders.texi +--- a/doc/encoders.texi 2019-08-11 14:00:13.000000000 +0000 ++++ b/doc/encoders.texi 2019-08-11 14:00:13.000000000 +0000 +@@ -1640,6 +1640,151 @@ Set maximum NAL size in bytes. + Allow skipping frames to hit the target bitrate if set to 1. + @end table + ++@section libsvt_hevc ++ ++Scalable Video Technology for HEVC encoder (SVT-HEVC encoder) wrapper. ++ ++This encoder requires the presence of the headers and ++library during configuration. You need to explicitly configure the ++build with @code{--enable-libsvthevc}. The library is detected using ++@command{pkg-config}. ++ ++For more information about the library see ++@url{https://github.com/intel/SVT-HEVC.git}. ++ ++@subsection Options ++ ++The following FFmpeg global options affect the configurations of the ++libsvt_hevc encoder. ++ ++@table @option ++@item b (@emph{bitrate}) ++Set the bitrate (as a number of bits per second). Default is 7M. ++ ++@item g / @option{gop_size} ++Set the GOP size. Default is -2 (unspecified). ++ ++@item flags +cgop ++Enable closed GOP. ++ ++@item qmin (@emph{min-q}) ++Defaults 10 ++ ++@item qmax (@emph{max-q}) ++Defaults 48 ++ ++Set minimum/maximum quantisation values. Valid range is from 0 to 51 ++(Only used when bit rate control mode @option{rc} is set to 1(vbr) mode. ++Has to be qmax > = qmin). ++ ++@item profile (@emph{profile}) ++Set profile restrictions. Can assume one of the following possible values: ++ ++Default is 2 (main10). ++ ++@table @samp ++@item main ++main profile ++@item main10 ++main10 profile ++@end table ++ ++@item level ++ ++@option{profile} sets the value of @emph{profile}. ++@option{level} sets the value of @emph{level}. ++ ++The encoder also has its own specific options: ++ ++@table @option ++@item vui ++Enables or disables the vui structure in the HEVC elementary ++bitstream. 0 = Off, 1 = On. Default is 0 (Off). ++ ++@item aud (@emph{aud}) ++Enable use of access unit delimiters when set to 1. Default is 0 (Off). ++ ++@item hielevel ++Set hierarchical levels. Can assume one of the following possible values: ++ ++Default is 3 (4level). ++ ++@table @samp ++@item flat ++none hierarchy level ++@item 2level ++2-level hierarchy ++@item 3level ++3-level hierarchy ++@item 4level ++4-level hierarchy ++@end table ++ ++@item la_depth ++Set look-ahead depth, depending on bit rate control mode @option{rc}, when ++bit rate control mode is set to vbr it's best to set this parameter to be ++equal to the intra period value (such is the default set by the encoder), ++when cqp is chosen, then a look ahead is recommended. The range is from @var{0-256}. ++ ++@item preset ++A preset defining the quality vs density tradeoff point that the ++encoding is to be performed at.(e.g. 0 is the highest quality mode, ++12 is the highest density mode). The range is from @var{0-12}. Default is 9. ++ ++@item tier ++Set @emph{general_tier_flag}. This may affect the level chosen for the stream ++if it is not explicitly specified. Can assume one of the following possible values: ++ ++Default is 1 (main). ++ ++@table @samp ++@item main ++main tier ++@item high ++high tier ++@end table ++ ++@item rc ++Set bit rate control mode. Can assume one of the following possible values: ++ ++Default is 0 (cqp). ++ ++@table @samp ++@item cqp ++Constant QP (CQP) mode ++@item vbr ++Variable Bit Rate (VBR) mode ++@end table ++ ++@item qp ++Initial quantization parameter for the intra pictures used when ++@option{rc} is cqp mode. The range is from @var{0-51}. Default is 32. ++ ++@item sc_detection ++Enables or disables the scene change detection algorithm. Default is 0 (disable). ++ ++@item tune ++Set quality tuning mode. Can assume one of the following possible values: ++ ++Default is 1 (oq). ++ ++@table @samp ++@item sq ++Visually optimized mode ++@item oq ++PSNR / SSIM optimized mode ++@item vmaf ++VMAF optimized mode ++@end table ++ ++@item bl_mode ++Enables or disables Random Access Prediction. Default is 0 (disable). ++@end table ++ ++@item hdr ++High dynamic range input. Default is 0 (disable). ++@end table ++ + @section libtheora + + libtheora Theora encoder wrapper. +diff -Nawurp a/doc/general.texi b/doc/general.texi +--- a/doc/general.texi 2019-08-11 14:00:13.000000000 +0000 ++++ b/doc/general.texi 2019-08-11 14:00:13.000000000 +0000 +@@ -243,6 +243,14 @@ FFmpeg can use the OpenJPEG libraries fo + instructions. To enable using OpenJPEG in FFmpeg, pass @code{--enable-libopenjpeg} to + @file{./configure}. + ++@section Scalable Video Technology for HEVC ++ ++FFmpeg can make use of the SVT-HEVC library for HEVC encoding. ++ ++Go to @url{https://github.com/intel/SVT-HEVC.git} and follow the instructions ++for installing the library. Pass @code{--enable-libsvthevc} to configure to ++enable it. ++ + @section TwoLAME + + FFmpeg can make use of the TwoLAME library for MP2 encoding. |