ffmpeg-build-script icon indicating copy to clipboard operation
ffmpeg-build-script copied to clipboard

ERROR: cuvid requested, but not all dependencies are satisfied: ffnvcodec

Open whittinghamj opened this issue 2 years ago • 5 comments
trafficstars

Im running this script on a brand new ubuntu 22 install and get the following error

ERROR: cuvid requested, but not all dependencies are satisfied: ffnvcodec

whittinghamj avatar Mar 27 '23 21:03 whittinghamj

Same as #183

PhiSYS avatar Mar 28 '23 19:03 PhiSYS

Changing --disable-ffnvcodec to --enable-ffnvcodec in the script "build-ffmpeg" temporarily solves the issue and allows it to compile

--disable-ffnvcodec is supposed to result in ffmpeg autodetecting the presence of the headers, but this for some reason isn't working, even when they are present system-wide or in the include directories. I've not gone further into finding out why yet.

JohnBFrm avatar Apr 10 '23 06:04 JohnBFrm

Thanks, this worked for me but I also had to modify my path and add the following since I'm building the nv-codec-headers under the HWaccel library section.

Here's my git diff that let's me successfully build:

diff --git a/build-ffmpeg b/build-ffmpeg
index 357b140..5a9559b 100755
--- a/build-ffmpeg
+++ b/build-ffmpeg
@@ -869,11 +869,12 @@ fi
 ##
 
 if [[ "$OSTYPE" == "linux-gnu" ]]; then
+  export PATH=$PATH:/usr/local/cuda/bin
   if command_exists "nvcc"; then
     if build "nv-codec" "11.1.5.2"; then
       download "https://github.com/FFmpeg/nv-codec-headers/releases/download/n11.1.5.2/nv-codec-headers-11.1.5.2.tar.gz"
       execute make PREFIX="${WORKSPACE}"
-      execute make PREFIX="${WORKSPACE}/usr" install
+      execute make PREFIX="${WORKSPACE}" install
       build_done "nv-codec" "11.1.5.2"
     fi
     CFLAGS+=" -I/usr/local/cuda/include"
@@ -929,7 +930,7 @@ download "https://github.com/FFmpeg/FFmpeg/archive/refs/heads/release/$FFMPEG_VE
   --enable-static \
   --enable-small \
   --enable-version3 \
-  --disable-ffnvcodec \
+  --enable-ffnvcodec \
   --extra-cflags="${CFLAGS}" \
   --extra-ldexeflags="${LDEXEFLAGS}" \
   --extra-ldflags="${LDFLAGS}" \

tuxthepenguin84 avatar Apr 30 '23 13:04 tuxthepenguin84

I also set line 932 to --enable-ffnvcodec but that wasn't enough. After some searching I tried this and it worked...

cd packages/nv-codec-headers-11.1.5.2/
make install PREFIX=~/ffmpeg-build-script/workspace/usr

(Ubuntu 22.04)

garyritchie avatar May 02 '23 12:05 garyritchie

https://github.com/markus-perl/ffmpeg-build-script/issues/183#issuecomment-1554417140

kirk29974 avatar May 19 '23 11:05 kirk29974