diff options
author | Dmitry Kharitonov | 2018-04-22 18:45:57 +0500 |
---|---|---|
committer | Dmitry Kharitonov | 2018-04-22 18:45:57 +0500 |
commit | 43060280660fc58071daae3f7402e27ba8c37c45 (patch) | |
tree | eac26909cd61639b31a773d13a2351c381f45350 | |
parent | a4a69b500e0a3da4b778c2580590e45c7dae883b (diff) | |
download | aur-43060280660fc58071daae3f7402e27ba8c37c45.tar.gz |
Updated to 4.0
Added support for: codec2, ffnvcodec, nvdec, Haivision SRT
Removed: gnutls (conflicts with openssl or libressl)
libavresample (deprecated, use swresample)
rkmpp patches (not needed anymore)
Changed: vmaf to vmaf-git and it's now x86_64 only
no more ffserver docs
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 60 | ||||
-rw-r--r-- | ffmpeg-full-rkmpp-build-fix.patch | 78 | ||||
-rw-r--r-- | ffmpeg-full-rkmpp-remove-stream-start.patch | 83 |
4 files changed, 36 insertions, 209 deletions
@@ -1,28 +1,27 @@ pkgbase = ffmpeg-full-nvenc pkgdesc = Record, convert, and stream audio and video (all codecs including Nvidia NVENC) - pkgver = 3.4.2 - pkgrel = 3 + pkgver = 4.0 + pkgrel = 1 epoch = 1 url = http://ffmpeg.org/ arch = i686 arch = x86_64 - license = GPL - license = custom:UNREDISTRIBUTABLE + license = custom: nonfree and unredistributable makedepends = flite makedepends = libmfx makedepends = libvdpau makedepends = nasm makedepends = opencl-headers - makedepends = vmaf depends = alsa-lib depends = bzip2 depends = celt depends = chromaprint-fftw + depends = codec2 depends = fontconfig + depends = ffnvcodec-headers depends = frei0r-plugins depends = fribidi depends = glibc - depends = gnutls depends = gsm depends = jack depends = kvazaar @@ -68,6 +67,7 @@ pkgbase = ffmpeg-full-nvenc depends = sdl2 depends = smbclient depends = speex + depends = srt depends = shine depends = tesseract depends = twolame @@ -96,7 +96,6 @@ pkgbase = ffmpeg-full-nvenc provides = libavdevice.so provides = libavfilter.so provides = libavformat.so - provides = libavresample.so provides = libavutil.so provides = libpostproc.so provides = libswresample.so @@ -108,20 +107,17 @@ pkgbase = ffmpeg-full-nvenc conflicts = ffmpeg-git conflicts = ffmpeg-full-git conflicts = ffmpeg-full-extra - source = https://ffmpeg.org/releases/ffmpeg-3.4.2.tar.xz - source = https://ffmpeg.org/releases/ffmpeg-3.4.2.tar.xz.asc - source = ffmpeg-full-rkmpp-build-fix.patch - source = ffmpeg-full-rkmpp-remove-stream-start.patch + source = https://ffmpeg.org/releases/ffmpeg-4.0.tar.xz + source = https://ffmpeg.org/releases/ffmpeg-4.0.tar.xz.asc source = UNREDISTRIBUTABLE.txt validpgpkeys = FCF986EA15E6E293A5644F10B4322F04D67658D8 - sha256sums = 2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740 + sha256sums = ed945daf40b124e77a685893cc025d086f638bc703183460aff49508edb3a43f sha256sums = SKIP - sha256sums = 142923fd02851343bfbfd31b201ba014dced8a8c8898373c72d71d30d59f5851 - sha256sums = cac8577126c3e49f8c915fa289f3f5aa624dc55f897b8b7a5613191bcfa9c097 sha256sums = e0c1b126862072a71e18b9580a6b01afc76a54aa6e642d2c413ba0ac9d3010c4 depends_x86_64 = cuda depends_x86_64 = nvidia-utils optdepends_x86_64 = intel-media-sdk: for Intel QSV support (Experimental! See PKGBUILD of that package for additional info) + makedepends_x86_64 = vmaf-git pkgname = ffmpeg-full-nvenc @@ -18,60 +18,50 @@ pkgname=ffmpeg-full-nvenc _pkgbasename=ffmpeg -pkgver=3.4.2 -pkgrel=3 +pkgver=4.0 +pkgrel=1 epoch=1 pkgdesc="Record, convert, and stream audio and video (all codecs including Nvidia NVENC)" arch=('i686' 'x86_64') url="http://ffmpeg.org/" -license=('GPL' 'custom:UNREDISTRIBUTABLE') -depends=('alsa-lib' 'bzip2' 'celt' 'chromaprint-fftw' 'fontconfig' 'frei0r-plugins' - 'fribidi' 'glibc' 'gnutls' 'gsm' 'jack' 'kvazaar' 'ladspa' 'lame' 'libass' - 'libavc1394' 'libbluray' 'libbs2b' 'libcaca' 'libcdio-paranoia' 'libdc1394' - 'libfdk-aac' 'libgme' 'libiec61883' 'libilbc' 'libmodplug' 'libomxil-bellagio' - 'libmysofa' 'libpulse' 'librsvg' 'libsoxr' 'libssh' 'libtheora' 'libva' - 'libvdpau' 'libwebp' 'libxml2' 'libxv' 'mesa' 'ndi-sdk' 'openal' 'opencore-amr' - 'opencl-driver' 'opencl-icd-loader' 'openh264' - 'openjpeg2' 'libopenmpt-svn' 'opus' 'rockchip-mpp' 'rubberband' 'rtmpdump' - 'sdl2' 'smbclient' 'speex' 'shine' 'tesseract' 'twolame' 'v4l-utils' - 'vid.stab' 'vo-amrwbenc' 'libxcb' 'xvidcore' 'xz' 'wavpack' 'zeromq' 'zimg' - 'zlib' 'zvbi' 'libvorbisenc.so' 'libvorbis.so' 'libvpx.so' 'libx264.so' - 'libx265.so' 'snappy' 'sndio' 'xavs') +license=('custom: nonfree and unredistributable') +depends=('alsa-lib' 'bzip2' 'celt' 'chromaprint-fftw' 'codec2' 'fontconfig' + 'ffnvcodec-headers' 'frei0r-plugins' 'fribidi' 'glibc' 'gsm' 'jack' 'kvazaar' + 'ladspa' 'lame' 'libass' 'libavc1394' 'libbluray' 'libbs2b' 'libcaca' + 'libcdio-paranoia' 'libdc1394' 'libfdk-aac' 'libgme' 'libiec61883' + 'libilbc' 'libmodplug' 'libomxil-bellagio' 'libmysofa' 'libpulse' + 'librsvg' 'libsoxr' 'libssh' 'libtheora' 'libva' 'libvdpau' 'libwebp' + 'libxml2' 'libxv' 'mesa' 'ndi-sdk' 'openal' 'opencore-amr' 'opencl-driver' + 'opencl-icd-loader' 'openh264' 'openjpeg2' 'libopenmpt-svn' 'opus' + 'rockchip-mpp' 'rubberband' 'rtmpdump' 'sdl2' 'smbclient' 'speex' 'srt' + 'shine' 'tesseract' 'twolame' 'v4l-utils' 'vid.stab' 'vo-amrwbenc' 'libxcb' + 'xvidcore' 'xz' 'wavpack' 'zeromq' 'zimg' 'zlib' 'zvbi' 'libvorbisenc.so' + 'libvorbis.so' 'libvpx.so' 'libx264.so' 'libx265.so' 'snappy' 'sndio' 'xavs') depends_x86_64=('cuda' 'nvidia-utils') -makedepends=('flite' 'libmfx' 'libvdpau' 'nasm' 'opencl-headers' 'vmaf') +makedepends=('flite' 'libmfx' 'libvdpau' 'nasm' 'opencl-headers') +makedepends_x86_64=('vmaf-git') optdepends=('avxsynth-git: for Avisynth support' 'blackmagic-decklink-sdk: for Blackmagic DeckLink support; need to add --enable-decklink option in this PKGBUILD') optdepends_x86_64=('intel-media-sdk: for Intel QSV support (Experimental! See PKGBUILD of that package for additional info)') conflicts=('ffmpeg' 'ffmpeg-full' 'ffmpeg-git' 'ffmpeg-full-git' 'ffmpeg-full-extra') provides=('libavcodec.so' 'libavdevice.so' 'libavfilter.so' 'libavformat.so' - 'libavresample.so' 'libavutil.so' 'libpostproc.so' 'libswresample.so' + 'libavutil.so' 'libpostproc.so' 'libswresample.so' 'libswscale.so' 'ffmpeg' 'qt-faststart') source=(https://ffmpeg.org/releases/$_pkgbasename-$pkgver.tar.xz{,.asc} - 'ffmpeg-full-rkmpp-build-fix.patch' - 'ffmpeg-full-rkmpp-remove-stream-start.patch' 'UNREDISTRIBUTABLE.txt') validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8') -sha256sums=('2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740' +sha256sums=('ed945daf40b124e77a685893cc025d086f638bc703183460aff49508edb3a43f' 'SKIP' - '142923fd02851343bfbfd31b201ba014dced8a8c8898373c72d71d30d59f5851' - 'cac8577126c3e49f8c915fa289f3f5aa624dc55f897b8b7a5613191bcfa9c097' 'e0c1b126862072a71e18b9580a6b01afc76a54aa6e642d2c413ba0ac9d3010c4') -prepare() { - cd "$_pkgbasename-$pkgver" - patch -Np1 -i "${srcdir}/ffmpeg-full-rkmpp-build-fix.patch" - patch -Np1 -i "${srcdir}/ffmpeg-full-rkmpp-remove-stream-start.patch" -} - build() { cd "$_pkgbasename-$pkgver" # Add x86_64 (opt)depends to the build if [ "$CARCH" = "x86_64" ] then - local _cuda='--enable-cuda' + local _libvmaf='--enable-libvmaf' local _cudasdk='--enable-cuda-sdk' - local _cuvid='--enable-cuvid' local _libnpp='--enable-libnpp' local _cflags='-I/opt/cuda/include' # '-L/usr/lib/nvidia' (for cuda_sdk) needs to be enabled only on @@ -106,7 +96,7 @@ build() { --enable-nonfree \ --disable-static \ --enable-shared \ - --enable-avresample \ + --enable-swresample \ \ \ $_cuda \ @@ -117,6 +107,7 @@ build() { --enable-libdrm \ --enable-libmfx \ --enable-nvenc \ + --enable-nvdec \ --enable-omx \ --enable-omx-rpi \ \ @@ -129,11 +120,9 @@ build() { --enable-bzlib \ --enable-fontconfig \ --enable-frei0r \ - --enable-gnutls \ --enable-gpl \ --enable-gray \ --enable-iconv \ - --enable-jack \ --enable-ladspa \ --enable-libass \ --enable-libbluray \ @@ -141,6 +130,7 @@ build() { --enable-libcaca \ --enable-libcdio \ --enable-libcelt \ + --enable-libcodec2 \ --enable-libdc1394 \ --enable-libfdk-aac \ --enable-libfreetype \ @@ -149,6 +139,7 @@ build() { --enable-libgsm \ --enable-libiec61883 \ --enable-libilbc \ + --enable-libjack \ --enable-libkvazaar \ --enable-libmodplug \ --enable-libmp3lame \ @@ -170,6 +161,7 @@ build() { --enable-libsnappy \ --enable-libsoxr \ --enable-libspeex \ + --enable-libsrt \ --enable-libssh \ --enable-libtesseract \ --enable-libtheora \ @@ -211,7 +203,7 @@ build() { msg "Starting make" make make tools/qt-faststart - make doc/ff{mpeg,play,server}.1 + make doc/ff{mpeg,play}.1 } package() { diff --git a/ffmpeg-full-rkmpp-build-fix.patch b/ffmpeg-full-rkmpp-build-fix.patch deleted file mode 100644 index 938affa0e2c3..000000000000 --- a/ffmpeg-full-rkmpp-build-fix.patch +++ /dev/null @@ -1,78 +0,0 @@ -From: LongChair <longchair@hotmail.com> -Date: Sat, 6 Jan 2018 08:36:58 +0000 (+0100) -Subject: avcodec/rkmpp : Fix broken build due to missing control operation -X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=c6f84106366c6f243a8b07dbffcc7880009aa904 - -avcodec/rkmpp : Fix broken build due to missing control operation - -This patch is taking care of https://trac.ffmpeg.org/ticket/6834. -It seems that one of the control operations that was available to get -the free decoders input slots was removed. - -There is another control operation to retrieve the used slots. Given -that the input slot count is hardcoded to 4 in mpp at this point, -replacing the old control operation by the other one. - -This was tested on Rockchip ROCK64. - -Signed-off-by: wm4 <nfxjfg@googlemail.com> ---- - -diff -Naurp a/configure b/configure ---- a/configure 2017-12-10 19:35:18.000000000 -0200 -+++ b/configure 2018-01-06 23:27:24.057673297 -0200 -@@ -6077,10 +6077,8 @@ enabled openssl && { use_pkg_c - check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 || - check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || - die "ERROR: openssl not found"; } --enabled rkmpp && { { require_pkg_config rockchip_mpp rockchip_mpp rockchip/rk_mpi.h mpp_create || -- die "ERROR : Rockchip MPP was not found."; } && -- { check_func_headers rockchip/rk_mpi_cmd.h "MPP_DEC_GET_FREE_PACKET_SLOT_COUNT" || -- die "ERROR: Rockchip MPP is outdated, please get a more recent one."; } && -+enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create && -+ require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.7" rockchip/rk_mpi.h mpp_create && - { enabled libdrm || - die "ERROR: rkmpp requires --enable-libdrm"; } - } -diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c -index c57a6ded38..946b827918 100644 ---- a/libavcodec/rkmppdec.c -+++ b/libavcodec/rkmppdec.c -@@ -40,6 +40,7 @@ - - #define RECEIVE_FRAME_TIMEOUT 100 - #define FRAMEGROUP_MAX_FRAMES 16 -+#define INPUT_MAX_PACKETS 4 - - typedef struct { - MppCtx ctx; -@@ -515,16 +516,17 @@ static int rkmpp_receive_frame(AVCodecContext *avctx, AVFrame *frame) - RKMPPDecoder *decoder = (RKMPPDecoder *)rk_context->decoder_ref->data; - int ret = MPP_NOK; - AVPacket pkt = {0}; -- RK_S32 freeslots; -+ RK_S32 usedslots, freeslots; - - if (!decoder->eos_reached) { - // we get the available slots in decoder -- ret = decoder->mpi->control(decoder->ctx, MPP_DEC_GET_FREE_PACKET_SLOT_COUNT, &freeslots); -+ ret = decoder->mpi->control(decoder->ctx, MPP_DEC_GET_STREAM_COUNT, &usedslots); - if (ret != MPP_OK) { -- av_log(avctx, AV_LOG_ERROR, "Failed to get decoder free slots (code = %d).\n", ret); -+ av_log(avctx, AV_LOG_ERROR, "Failed to get decoder used slots (code = %d).\n", ret); - return ret; - } - -+ freeslots = INPUT_MAX_PACKETS - usedslots; - if (freeslots > 0) { - ret = ff_decode_get_packet(avctx, &pkt); - if (ret < 0 && ret != AVERROR_EOF) { -@@ -541,7 +543,7 @@ static int rkmpp_receive_frame(AVCodecContext *avctx, AVFrame *frame) - } - - // make sure we keep decoder full -- if (freeslots > 1 && decoder->first_frame) -+ if (freeslots > 1) - return AVERROR(EAGAIN); - } - diff --git a/ffmpeg-full-rkmpp-remove-stream-start.patch b/ffmpeg-full-rkmpp-remove-stream-start.patch deleted file mode 100644 index febff8e34d15..000000000000 --- a/ffmpeg-full-rkmpp-remove-stream-start.patch +++ /dev/null @@ -1,83 +0,0 @@ -From: LongChair <longchair@hotmail.com> -Date: Tue, 2 Jan 2018 11:38:01 +0000 (+0100) -Subject: avcodec/rkmpp : remove stream start retries before first frame. -X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=2ca65fc7b74444edd51d5803a2c1e05a801a6023 - -avcodec/rkmpp : remove stream start retries before first frame. - -those were needed because of some odd mpp behavior that seems to have -been fixed. - -Makes the code cleaner. - -Signed-off-by: wm4 <nfxjfg@googlemail.com> ---- - -diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c -index 946b827918..143d05bd51 100644 ---- a/libavcodec/rkmppdec.c -+++ b/libavcodec/rkmppdec.c -@@ -47,7 +47,6 @@ typedef struct { - MppApi *mpi; - MppBufferGroup frame_group; - -- char first_frame; - char first_packet; - char eos_reached; - -@@ -329,28 +328,14 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame) - MppBuffer buffer = NULL; - AVDRMFrameDescriptor *desc = NULL; - AVDRMLayerDescriptor *layer = NULL; -- int retrycount = 0; - int mode; - MppFrameFormat mppformat; - uint32_t drmformat; - -- // on start of decoding, MPP can return -1, which is supposed to be expected -- // this is due to some internal MPP init which is not completed, that will -- // only happen in the first few frames queries, but should not be interpreted -- // as an error, Therefore we need to retry a couple times when we get -1 -- // in order to let it time to complete it's init, then we sleep a bit between retries. --retry_get_frame: - ret = decoder->mpi->decode_get_frame(decoder->ctx, &mppframe); -- if (ret != MPP_OK && ret != MPP_ERR_TIMEOUT && !decoder->first_frame) { -- if (retrycount < 5) { -- av_log(avctx, AV_LOG_DEBUG, "Failed to get a frame, retrying (code = %d, retrycount = %d)\n", ret, retrycount); -- usleep(10000); -- retrycount++; -- goto retry_get_frame; -- } else { -- av_log(avctx, AV_LOG_ERROR, "Failed to get a frame from MPP (code = %d)\n", ret); -- goto fail; -- } -+ if (ret != MPP_OK && ret != MPP_ERR_TIMEOUT) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to get a frame from MPP (code = %d)\n", ret); -+ goto fail; - } - - if (mppframe) { -@@ -366,7 +351,6 @@ retry_get_frame: - avctx->height = mpp_frame_get_height(mppframe); - - decoder->mpi->control(decoder->ctx, MPP_DEC_SET_INFO_CHANGE_READY, NULL); -- decoder->first_frame = 1; - - av_buffer_unref(&decoder->frames_ref); - -@@ -480,7 +464,6 @@ retry_get_frame: - goto fail; - } - -- decoder->first_frame = 0; - return 0; - } else { - av_log(avctx, AV_LOG_ERROR, "Failed to retrieve the frame buffer, frame is dropped (code = %d)\n", ret); -@@ -560,7 +543,6 @@ static void rkmpp_flush(AVCodecContext *avctx) - - ret = decoder->mpi->reset(decoder->ctx); - if (ret == MPP_OK) { -- decoder->first_frame = 1; - decoder->first_packet = 1; - } else - av_log(avctx, AV_LOG_ERROR, "Failed to reset MPI (code = %d)\n", ret); |