Package Details: ffmpeg-cuda 1:7.1.0-1

Git Clone URL: https://aur.archlinux.org/ffmpeg-cuda.git (read-only, click to copy)
Package Base: ffmpeg-cuda
Description: Complete solution to record, convert and stream audio and video. Includes cuda support.
Upstream URL: https://ffmpeg.org/
Licenses: GPL-3.0-only
Conflicts: ffmpeg
Provides: ffmpeg, libavcodec.so, libavdevice.so, libavfilter.so, libavformat.so, libavutil.so, libpostproc.so, libswresample.so, libswscale.so
Submitter: gleb.zhulik
Maintainer: daizhirui
Last Packager: daizhirui
Votes: 3
Popularity: 0.000000
First Submitted: 2019-07-07 10:08 (UTC)
Last Updated: 2024-10-14 16:28 (UTC)

Required by (2031)

Sources (2)

Latest Comments

1 2 Next › Last »

d34ay commented on 2025-06-29 14:04 (UTC) (edited on 2025-06-29 14:05 (UTC) by d34ay)

The package doesn't build on the latest manjaro (and arch, I guess). There are 2 errors:
- ERROR: failed checking for nvcc. - caused by c++11 used to check nvcc
- libavcodec/libsvtav1.c:433:61: error: passing argument 2 of ‘svt_av1_enc_init_handle’ from - caused by libsvtav1's version 3 (more: https://github.com/BtbN/FFmpeg-Builds/issues/461)

@daizhirui, here's the patch to make it work:

diff --git a/PKGBUILD b/PKGBUILD
index 495cf72..70389e3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,7 +12,7 @@
 # https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/

 pkgname=ffmpeg-cuda
-pkgver=7.1.0
+pkgver=7.1.1.54.6400860b
 pkgrel=1
 epoch=1
 pkgdesc='Complete solution to record, convert and stream audio and video. Includes cuda support.'
@@ -123,20 +123,24 @@ provides=(
 )
 conflicts=('ffmpeg')
 source=(
-  "git+https://git.ffmpeg.org/ffmpeg.git#tag=n7.0"
+  "git+https://git.ffmpeg.org/ffmpeg.git#commit=6400860b9d4bec5ace91ec3a5e43ad76f9660579"
   "add-av_stream_get_first_dts-for-chromium.patch"
+  "nvcc-cxx-14.patch"
 )
-sha256sums=("SKIP" "57e26caced5a1382cb639235f9555fc50e45e7bf8333f7c9ae3d49b3241d3f77")
+sha256sums=(
+  "SKIP"
+  "57e26caced5a1382cb639235f9555fc50e45e7bf8333f7c9ae3d49b3241d3f77"
+  "def7eab4239e33f7f3162dc23b5a29c321868614d1e25768f8c5b0f9c0fb410d")

 _dir=ffmpeg

 prepare() {
     cd ${srcdir}
     patch -Np0 -i ${srcdir}/add-av_stream_get_first_dts-for-chromium.patch
+    cd ffmpeg && git apply ../nvcc-cxx-14.patch
 }

 build() {
-  
   local _cflags='-I/opt/cuda/include'
   local _ldflags='-L/opt/cuda/lib64'
   #local _nvccflags='-gencode arch=compute_52,code=sm_52 -O2'
@@ -158,9 +162,9 @@ build() {
 #                    -O2'

   cd ${_dir}
-  export PATH="/opt/cuda/bin:$PATH"
     #--nvccflags="$_nvccflags" \
   ./configure \
+    --stdcxx=c++14 \
     --prefix=/usr \
     --extra-cflags="$_cflags" \
     --extra-ldflags="$_ldflags" \
diff --git a/libavcodec.patch b/libavcodec.patch
deleted file mode 100644
index 74b5348..0000000
--- a/libavcodec.patch
+++ /dev/null
@@ -1,57 +0,0 @@
---- a/libavcodec/x86/mathops.h
-+++ b/libavcodec/x86/mathops.h
-@@ -35,12 +35,20 @@
- static av_always_inline av_const int MULL(int a, int b, unsigned shift)
- {
-     int rt, dummy;
-+    if (__builtin_constant_p(shift))
-     __asm__ (
-         "imull %3               \n\t"
-         "shrdl %4, %%edx, %%eax \n\t"
-         :"=a"(rt), "=d"(dummy)
--        :"a"(a), "rm"(b), "ci"((uint8_t)shift)
-+        :"a"(a), "rm"(b), "i"(shift & 0x1F)
-     );
-+    else
-+        __asm__ (
-+            "imull %3               \n\t"
-+            "shrdl %4, %%edx, %%eax \n\t"
-+            :"=a"(rt), "=d"(dummy)
-+            :"a"(a), "rm"(b), "c"((uint8_t)shift)
-+        );
-     return rt;
- }
-
-@@ -113,19 +121,31 @@ __asm__ volatile(\
- // avoid +32 for shift optimization (gcc should do that ...)
- #define NEG_SSR32 NEG_SSR32
- static inline  int32_t NEG_SSR32( int32_t a, int8_t s){
-+    if (__builtin_constant_p(s))
-     __asm__ ("sarl %1, %0\n\t"
-          : "+r" (a)
--         : "ic" ((uint8_t)(-s))
-+         : "i" (-s & 0x1F)
-     );
-+    else
-+        __asm__ ("sarl %1, %0\n\t"
-+               : "+r" (a)
-+               : "c" ((uint8_t)(-s))
-+        );
-     return a;
- }
-
- #define NEG_USR32 NEG_USR32
- static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
-+    if (__builtin_constant_p(s))
-     __asm__ ("shrl %1, %0\n\t"
-          : "+r" (a)
--         : "ic" ((uint8_t)(-s))
-+         : "i" (-s & 0x1F)
-     );
-+    else
-+        __asm__ ("shrl %1, %0\n\t"
-+               : "+r" (a)
-+               : "c" ((uint8_t)(-s))
-+        );
-     return a;
- }

Anquihald commented on 2025-02-26 09:13 (UTC) (edited on 2025-02-26 09:17 (UTC) by Anquihald)

Build fails with the following error:

Can't locate object method "gdt" via package "Texinfo::Convert::HTML" at ./doc/t2h.pm line 255.

The packet itself cfan be compiled as well, but documentation is incompatible with texinfo-7.2. Downgrading texinfo to 7.1.1 resolves the build problem.

Dom.Goz commented on 2024-12-27 11:25 (UTC)

Build fails with the following error:

libavcodec/libx265.c:768:59: error: passing argument 5 of 'ctx->api->encoder_encode' from incompatible pointer type [-Wincompatible-pointer-types]

This issue is also reported on Gentoo: [https://bugs.gentoo.org/938897]

Setting the TAG to n7.1 resolved the issue for me.

kadimon commented on 2024-09-03 13:06 (UTC)

nvcc not support gcc-14. https://unix.stackexchange.com/a/486059 I used this solution with gcc-13

JakobDev commented on 2024-07-25 14:10 (UTC) (edited on 2024-07-25 14:11 (UTC) by JakobDev)

I just get ERROR: failed checking for nvcc. Cuda is installed and /opt/cuda/bin is in PATH. I can rubn nvcc through my shell.

daizhirui commented on 2023-12-16 18:55 (UTC)

The patch is applied again.

kensmith commented on 2023-12-13 20:30 (UTC) (edited on 2023-12-13 20:31 (UTC) by kensmith)

The included patch, add-av_stream_get_first_dts-for-chromium.patch, isn't being applied. That patch is required to address this bug, https://bugs.archlinux.org/task/76195 . Would it be possible to have this patch applied by the PKGBUILD?

For others seeing this issue, you can follow the instructions here to manually apply the patch, https://wiki.archlinux.org/title/Patching_packages

> makepkg --nobuild
> cd src
> patch -p0 < ../add-av_stream_get_first_dts-for-chromium.patch
> cd ..
> makepkg --noextract --install

MarsSeed commented on 2023-10-16 23:06 (UTC)

The overall version has been decreased, because epoch has been removed. You have to add back epoch=1.

jooni22 commented on 2023-10-14 21:03 (UTC)

On Arch the cuda package is located under /opt path not /usr and sometimes you don't have the /opt/cuda/bin in your env vars so just after exec: export PATH="${PATH}:/opt/cuda/bin" source ~/.bashrc the package should be fixed if not just use manual build: https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/ffmpeg-with-nvidia-gpu/index.html#compiling-for-linux