summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Woudstra2022-09-25 20:56:52 +0200
committerEric Woudstra2022-09-25 20:56:52 +0200
commit4f1d5f0a7357d440461d9ecbbf9ec0fb51a38e66 (patch)
treeaba24f7c79d1a27eb07cc2d5f45c86ccac042ff7
parent0a85c6b9ad7b0a51693b143dce5670d9151ece35 (diff)
downloadaur-4f1d5f0a7357d440461d9ecbbf9ec0fb51a38e66.tar.gz
FFmpeg with v4l2-request and drmprime
-rw-r--r--.SRCINFO60
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD254
-rw-r--r--ffmpeg-build-fix-for-dav1d-1.0.0.patch77
4 files changed, 297 insertions, 99 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e7b0c7422b90..9a9c8f629a0b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,74 +1,84 @@
pkgbase = ffmpeg-v4l2-request-git
- pkgdesc = FFmpeg with v4l2-request support
- pkgver = r94743.fa3f88530e
- pkgrel = 3
- url = https://github.com/Kwiboo/FFmpeg/tree/v4l2-request-hwaccel-4.2.2
+ pkgdesc = FFmpeg with v4l2-request and drmprime
+ pkgver = r101819.6eb83262f6
+ pkgrel = 1
+ epoch = 2
+ url = https://ffmpeg.org/
+ arch = armv7h
arch = aarch64
license = GPL3
+ makedepends = amf-headers
+ makedepends = avisynthplus
+ makedepends = clang
makedepends = git
+ makedepends = ladspa
+ makedepends = linux-api-headers
+ makedepends = nasm
depends = alsa-lib
depends = bzip2
depends = fontconfig
depends = fribidi
- depends = glibc
depends = gmp
depends = gnutls
depends = gsm
depends = jack
depends = lame
+ depends = libass.so
depends = libavc1394
+ depends = libbluray.so
+ depends = libdav1d.so
depends = libdrm
+ depends = libfreetype.so
depends = libiec61883
depends = libmodplug
- depends = libomxil-bellagio
depends = libpulse
depends = libraw1394
+ depends = librsvg-2.so
depends = libsoxr
depends = libssh
depends = libtheora
+ depends = libva.so
+ depends = libva-drm.so
+ depends = libva-x11.so
depends = libvdpau
+ depends = libvidstab.so
+ depends = libvorbisenc.so
+ depends = libvorbis.so
+ depends = libvpx.so
depends = libwebp
depends = libx11
+ depends = libx264.so
+ depends = libx265.so
depends = libxcb
depends = libxext
depends = libxml2
depends = libxv
+ depends = libxvidcore.so
+ depends = libzimg.so
depends = opencore-amr
depends = openjpeg2
depends = opus
depends = sdl2
depends = speex
+ depends = srt
depends = v4l-utils
depends = xz
depends = zlib
- depends = ladspa
- depends = libass.so
- depends = libbluray.so
- depends = libfreetype.so
- depends = libva-drm.so
- depends = libva.so
- depends = libva-x11.so
- depends = libvidstab.so
- depends = libvorbisenc.so
- depends = libvorbis.so
- depends = libvpx.so
- depends = libx264.so
- depends = libx265.so
- depends = libxvidcore.so
- optdepends = intel-media-sdk: for Intel Quick Sync Video
- optdepends = ladspa: for LADSPA filters
+ optdepends = avisynthplus: AviSynthPlus support
+ optdepends = ladspa: LADSPA filters
provides = libavcodec.so
provides = libavdevice.so
provides = libavfilter.so
provides = libavformat.so
provides = libavutil.so
provides = libpostproc.so
- provides = libswresample.so
provides = libswscale.so
+ provides = libswresample.so
provides = ffmpeg
conflicts = ffmpeg
- source = git+https://github.com/Kwiboo/FFmpeg.git#branch=v4l2-request-hwaccel-4.2.2
+ source = git+https://github.com/jernejsk/FFmpeg
+ source = ffmpeg-build-fix-for-dav1d-1.0.0.patch
+ sha256sums = SKIP
sha256sums = SKIP
pkgname = ffmpeg-v4l2-request-git
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..501c59a3daa6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+src/
+pkg/
+FFmpeg/
+*.xz
+*.zst
diff --git a/PKGBUILD b/PKGBUILD
index ac10c42f8613..85d9ab8ea89f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,92 +1,198 @@
-# Maintainer: Andre Vallestero < gmail-com: andrevallestero >
+
+# Maintainer: Eric Woudstra <ericwouds AT gmail DOT com>
+
+# Contributor: Maxime Gauduin <alucryd@archlinux.org>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Ionut Biru <ibiru@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Contributor: Paul Mattal <paul@archlinux.org>
pkgname=ffmpeg-v4l2-request-git
_srcname=FFmpeg
-pkgver=r94743.fa3f88530e
-pkgrel=3
-pkgdesc='FFmpeg with v4l2-request support'
-arch=('aarch64')
-url='https://github.com/Kwiboo/FFmpeg/tree/v4l2-request-hwaccel-4.2.2'
-license=('GPL3')
-depends=('alsa-lib' 'bzip2' 'fontconfig' 'fribidi' 'glibc' 'gmp' 'gnutls' 'gsm'
- 'jack' 'lame' 'libavc1394' 'libdrm' 'libiec61883' 'libmodplug'
- 'libomxil-bellagio' 'libpulse' 'libraw1394' 'libsoxr' 'libssh' 'libtheora'
- 'libvdpau' 'libwebp' 'libx11' 'libxcb' 'libxext' 'libxml2' 'libxv'
- 'opencore-amr' 'openjpeg2' 'opus' 'sdl2' 'speex' 'v4l-utils' 'xz' 'zlib'
- 'ladspa' 'libass.so' 'libbluray.so' 'libfreetype.so' 'libva-drm.so'
- 'libva.so' 'libva-x11.so' 'libvidstab.so' 'libvorbisenc.so' 'libvorbis.so'
- 'libvpx.so' 'libx264.so' 'libx265.so' 'libxvidcore.so')
-makedepends=('git')
-optdepends=('intel-media-sdk: for Intel Quick Sync Video'
- 'ladspa: for LADSPA filters')
+pkgver=r101819.6eb83262f6
+pkgrel=1
+epoch=2
+pkgdesc='FFmpeg with v4l2-request and drmprime'
+arch=('armv7h' 'aarch64')
+url=https://ffmpeg.org/
+license=(GPL3)
+depends=(
+ alsa-lib
+ bzip2
+ fontconfig
+ fribidi
+ gmp
+ gnutls
+ gsm
+ jack
+ lame
+ libass.so
+ libavc1394
+ libbluray.so
+ libdav1d.so
+ libdrm
+ libfreetype.so
+ libiec61883
+ libmodplug
+ libpulse
+ 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
+ opencore-amr
+ openjpeg2
+ opus
+ sdl2
+ speex
+ srt
+ v4l-utils
+ xz
+ zlib
+)
+makedepends=(
+ amf-headers
+ avisynthplus
+ clang
+ git
+ ladspa
+ linux-api-headers
+ nasm
+)
+optdepends=(
+ 'avisynthplus: AviSynthPlus support'
+ 'ladspa: LADSPA filters'
+)
provides=('libavcodec.so' 'libavdevice.so' 'libavfilter.so' 'libavformat.so'
- 'libavutil.so' 'libpostproc.so' 'libswresample.so' 'libswscale.so'
+ 'libavutil.so' 'libpostproc.so' 'libswscale.so' 'libswresample.so'
'ffmpeg')
conflicts=('ffmpeg')
-source=('git+https://github.com/Kwiboo/FFmpeg.git#branch=v4l2-request-hwaccel-4.2.2')
-sha256sums=('SKIP')
+source=(
+ 'git+https://github.com/jernejsk/FFmpeg'
+ 'ffmpeg-build-fix-for-dav1d-1.0.0.patch'
+)
+sha256sums=(
+ SKIP
+ SKIP
+)
+_branch1='v4l2-request-hwaccel-4.4'
+_branch2='v4l2-drmprime-v6'
+
+prepare() {
+ cd ${_srcname}
+
+ git reset --hard
+ git checkout $_branch1
+ git -c "user.name=Your Name" -c "user.email=you@example.com" \
+ merge --no-edit origin/$_branch2
+
+ for bp in "${srcdir}"/ffmpeg-*.patch; do
+ patch -Np1 -i $bp
+ done
+
+}
pkgver() {
- cd "$_srcname"
- printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd ${_srcname}
+ (
+ set -o pipefail
+ _cnt1=$(git rev-list --count origin/$_branch1)
+ _cnt2=$(git rev-list --count origin/$_branch2)
+ printf "r%s.%s.%s" "$(( $_cnt1 + $_cnt2 ))" \
+ "$(git rev-parse --short origin/$_branch1)" \
+ "$(git rev-parse --short origin/$_branch2)"
+ )
}
build() {
- cd "$_srcname"
+ cd ${_srcname}
- printf '%s\n' ' -> Running ffmpeg configure script...'
+ [[ $CARCH == "armv7h" || $CARCH == "aarch64" ]] && CONFIG='--host-cflags="-fPIC"'
+ [[ $CARCH == "armv6h" || $CARCH == 'arm' ]] && CONFIG='--extra-libs="-latomic"'
- ./configure \
- --prefix='/usr' \
- --disable-debug \
- --disable-static \
- --disable-stripping \
- --enable-fontconfig \
- --enable-gmp \
- --enable-gnutls \
- --enable-gpl \
- --enable-ladspa \
- --enable-libass \
- --enable-libbluray \
- --enable-libdrm \
- --enable-libfreetype \
- --enable-libfribidi \
- --enable-libgsm \
- --enable-libiec61883 \
- --enable-libjack \
- --enable-libmodplug \
- --enable-libmp3lame \
- --enable-libopencore_amrnb \
- --enable-libopencore_amrwb \
- --enable-libopenjpeg \
- --enable-libopus \
- --enable-libpulse \
- --enable-libsoxr \
- --enable-libspeex \
- --enable-libssh \
- --enable-libtheora \
- --enable-libv4l2 \
- --enable-libvidstab \
- --enable-libvorbis \
- --enable-libvpx \
- --enable-libwebp \
- --enable-libx264 \
- --enable-libx265 \
- --enable-libxcb \
- --enable-libxml2 \
- --enable-libxvid \
- --enable-omx \
- --enable-shared \
- --enable-version3 \
- --enable-libudev \
- --enable-v4l2-request \
- --enable-pic
+ ./configure \
+ --prefix=/usr \
+ --disable-debug \
+ --disable-static \
+ --disable-stripping \
+ --enable-amf \
+ --enable-avisynth \
+ --enable-cuda-llvm \
+ --enable-fontconfig \
+ --enable-gmp \
+ --enable-gnutls \
+ --enable-gpl \
+ --enable-ladspa \
+ --enable-libass \
+ --enable-libbluray \
+ --enable-libdav1d \
+ --enable-libdrm \
+ --enable-libfreetype \
+ --enable-libfribidi \
+ --enable-libgsm \
+ --enable-libiec61883 \
+ --enable-libjack \
+ --enable-libmodplug \
+ --enable-libmp3lame \
+ --enable-libopencore_amrnb \
+ --enable-libopencore_amrwb \
+ --enable-libopenjpeg \
+ --enable-libopus \
+ --enable-libpulse \
+ --enable-librsvg \
+ --enable-libsoxr \
+ --enable-libspeex \
+ --enable-libsrt \
+ --enable-libssh \
+ --enable-libtheora \
+ --enable-libv4l2 \
+ --enable-libvidstab \
+ --enable-libvorbis \
+ --enable-libvpx \
+ --enable-libwebp \
+ --enable-libx264 \
+ --enable-libx265 \
+ --enable-libxcb \
+ --enable-libxml2 \
+ --enable-libxvid \
+ --enable-libzimg \
+ --enable-shared \
+ --enable-version3 \
+ \
+ --enable-v4l2_m2m \
+ --enable-v4l2-request \
+ --enable-libudev \
+ --enable-omx \
+ --enable-pic \
+ --enable-neon \
+ $CONFIG
- make
- make tools/qt-faststart
+ make
+ make tools/qt-faststart
+ make doc/ff{mpeg,play}.1
}
package() {
- make -C "$_srcname" DESTDIR="$pkgdir" install
- install -D -m755 "$_srcname"/tools/qt-faststart -t "${pkgdir}/usr/bin"
+ cd ${_srcname}
+
+ make DESTDIR="${pkgdir}" install install-man
+ install -Dm 755 tools/qt-faststart "${pkgdir}"/usr/bin/
}
diff --git a/ffmpeg-build-fix-for-dav1d-1.0.0.patch b/ffmpeg-build-fix-for-dav1d-1.0.0.patch
new file mode 100644
index 000000000000..4c1361f5a790
--- /dev/null
+++ b/ffmpeg-build-fix-for-dav1d-1.0.0.patch
@@ -0,0 +1,77 @@
+From 2546e1ed27f92a840a2cf319e3c1833799974cf1 Mon Sep 17 00:00:00 2001
+From: BlackEagle <ike.devolder@gmail.com>
+Date: Fri, 29 Apr 2022 14:33:12 +0200
+Subject: [PATCH] add build fix for dav1d 1.0.0
+
+Taken from https://github.com/FFmpeg/FFmpeg/commit/e204846ec16c1ab34c7f3a681734cf5190433018
+
+add FF_DAV1D_VERSION_AT_LEAST
+
+Extracted from https://github.com/FFmpeg/FFmpeg/commit/7ee17ec7e46afef0e0af20af196292ec75f50b62
+
+Signed-off-by: BlackEagle <ike.devolder@gmail.com>
+---
+ libavcodec/libdav1d.c | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
+index bbb3ec1e6c..08b4af8ac8 100644
+--- a/libavcodec/libdav1d.c
++++ b/libavcodec/libdav1d.c
+@@ -30,6 +30,9 @@
+ #include "decode.h"
+ #include "internal.h"
+
++#define FF_DAV1D_VERSION_AT_LEAST(x,y) \
++ (DAV1D_API_VERSION_MAJOR > (x) || DAV1D_API_VERSION_MAJOR == (x) && DAV1D_API_VERSION_MINOR >= (y))
++
+ typedef struct Libdav1dContext {
+ AVClass *class;
+ Dav1dContext *c;
+@@ -140,6 +143,15 @@ static av_cold int libdav1d_init(AVCodecContext *c)
+ if (dav1d->operating_point >= 0)
+ s.operating_point = dav1d->operating_point;
+
++#if FF_DAV1D_VERSION_AT_LEAST(6,0)
++ if (dav1d->frame_threads || dav1d->tile_threads)
++ s.n_threads = FFMAX(dav1d->frame_threads, dav1d->tile_threads);
++ else
++ s.n_threads = FFMIN(threads, DAV1D_MAX_THREADS);
++ s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : s.n_threads;
++ av_log(c, AV_LOG_DEBUG, "Using %d threads, %d max_frame_delay\n",
++ s.n_threads, s.max_frame_delay);
++#else
+ s.n_tile_threads = dav1d->tile_threads
+ ? dav1d->tile_threads
+ : FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS);
+@@ -148,6 +160,7 @@ static av_cold int libdav1d_init(AVCodecContext *c)
+ : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS);
+ av_log(c, AV_LOG_DEBUG, "Using %d frame threads, %d tile threads\n",
+ s.n_frame_threads, s.n_tile_threads);
++#endif
+
+ res = dav1d_open(&dav1d->c, &s);
+ if (res < 0)
+@@ -384,11 +397,18 @@ static av_cold int libdav1d_close(AVCodecContext *c)
+ return 0;
+ }
+
++#ifndef DAV1D_MAX_FRAME_THREADS
++#define DAV1D_MAX_FRAME_THREADS DAV1D_MAX_THREADS
++#endif
++#ifndef DAV1D_MAX_TILE_THREADS
++#define DAV1D_MAX_TILE_THREADS DAV1D_MAX_THREADS
++#endif
++
+ #define OFFSET(x) offsetof(Libdav1dContext, x)
+ #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
+ static const AVOption libdav1d_options[] = {
+- { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD },
+- { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD },
++ { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD | AV_OPT_FLAG_DEPRECATED },
++ { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD | AV_OPT_FLAG_DEPRECATED },
+ { "filmgrain", "Apply Film Grain", OFFSET(apply_grain), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD | AV_OPT_FLAG_DEPRECATED },
+ { "oppoint", "Select an operating point of the scalable bitstream", OFFSET(operating_point), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 31, VD },
+ { "alllayers", "Output all spatial layers", OFFSET(all_layers), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VD },
+--
+2.36.0