Error cuda requested but not all dependencies are satisfied ffnvcodec

Заголовки NVIDIA были перемещены из кодовой базы FFmpeg в автономный репозиторий в коммите 27cbbbb. Из сообщения фиксации:

Заголовки NVIDIA были перемещены из кодовой базы FFmpeg в автономный репозиторий в коммите 27cbbbb. Из сообщения фиксации:

Внешние заголовки больше не приветствуются в базе кода ffmpeg, поскольку они увеличивают нагрузку на обслуживание. Однако в случае NVidia ванильные заголовки нуждаются в некоторых модификациях, чтобы их можно было использовать в ffmpeg, поэтому мы все еще предоставляем их, но в отдельном хранилище.

Также, из FFmpeg Wiki: HWAccelIntro:

FFmpeg теперь использует свой собственный слегка измененный загрузчик времени выполнения для библиотек, связанных с nvidias CUDA/nvenc/nvdec. Если вы получите ошибку от configure, жалующуюся на отсутствие ffnvcodec, это то, что вам нужно.

У него есть рабочий Makefile с целью установки:

make install PREFIX=/usr

FFmpeg будет искать свой файл pkg-config , который называется ffnvcodec.pc . Убедитесь, что это в вашем PKG_CONFIG_PATH .

Чтобы скомпилировать заголовки FFmpeg NVIDIA («ffnvcodec»):

git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers
make
sudo make install

Теперь скомпилируйте ffmpeg как обычно. Заголовки должны быть автоматически обнаружены. Если нет, объявите PKG_CONFIG_PATH указав путь к файлу ffnvcodec.pc при запуске configure для FFmpeg. Например:

PKG_CONFIG_PATH="/path/to/lib/pkgconfig" ./configure

MSYS2 just updated several packages, most important, it ships GCC 8.2.0 now. So I cleared libs and bins in local32 and local64 before rebuilding everything.

It passed well on one PC (GT 450) but failed on another (GTX 1050 Ti). The configure step of ffmpeg, chapter ffnvcodec, complained about an unescaped left brace in a regex in Texinfo/Parser.pm — so I assumed that there may be some outdated syntax in configure import scripts provided by ffmpeg, and also opened ffmpeg trac ticket 7348.

Last messages on the console:

┌ ffmpeg git ........................................ [Recently updated]
├ Changing options to comply to nonfree...
├ Compiling static FFmpeg...
├ Running configure...
Likely error:
../configure --prefix=/local32 --bindir=/local32/bin-video --pkg-config-flags=--static --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --disable-debug --enable-ffnvcodec --enable-nvdec --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libaom --enable-version3 --enable-chromaprint --enable-decklink --enable-frei0r --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libfdk-aac --enable-libflite --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmodplug --enable-libopenh264 --enable-libopenmpt --enable-librtmp --enable-librubberband --enable-libssh --enable-libtesseract --enable-libxavs --enable-libzmq --enable-libzvbi --enable-opencl --enable-opengl --enable-libcodec2 --enable-libsrt --enable-ladspa --enable-openssl --extra-cflags=-fopenmp --extra-libs=-lgomp --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DLIBSSH_STATIC --extra-ldflags=-Wl,--allow-multiple-definition --extra-cflags=-DCACA_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCHROMAPRINT_NODLL --extra-libs=-lstdc++ --extra-cflags=-DZMQ_STATIC --extra-libs=-lpsapi --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads --extra-cflags=-DKVZ_STATIC_LIB --enable-nonfree
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/^s+@([[:alnum:]][[:alnum:]-]*)({ <-- HERE })?s*/ at /usr/share/texinfo/Texinfo/Parser.pm line 5481.
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/^s+@([[:alnum:]][[:alnum:]-]*)({ <-- HERE })?s*(@(c|comment)((@|s+).*)?)?/ at /usr/share/texinfo/Texinfo/Parser.pm line 5485.
ERROR: cuda requested, but not all dependencies are satisfied: ffnvcodec

logs.zip

The NVIDIA headers were moved out of the FFmpeg codebase to a standalone repository in commit 27cbbbb. From the commit message:

External headers are no longer welcome in the ffmpeg codebase because
they increase the maintenance burden. However, in the NVidia case the
vanilla headers need some modifications to be usable in ffmpeg
therefore we still provide them, but in a separate repository.

Also, from FFmpeg Wiki: HWAccelIntro:

FFmpeg now uses its own slightly modified runtime-loader for nvidias
CUDA/nvenc/nvdec related libraries. If you get an error from configure
complaining about missing ffnvcodec, this is what you need.

It has a working Makefile with an install target:

make install PREFIX=/usr

FFmpeg will look for its pkg-config file, called
ffnvcodec.pc. Make sure it is in your PKG_CONFIG_PATH.

To compile the FFmpeg NVIDIA headers («ffnvcodec»):

git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers
make
sudo make install

Now compile ffmpeg as usual. The headers should be autodetected. If not then declare the PKG_CONFIG_PATH pointing to the path where ffnvcodec.pc is located when running configure for FFmpeg. For example:

PKG_CONFIG_PATH="/path/to/lib/pkgconfig" ./configure

I encountered a similar error but it turns out, it was caused by missing tool package config. On Ubuntu 16.04 you can run

apt-get install pkgconf

and check whether the missing package is really missed or not:

pkgconf --list-all | grep package-name

Tags:

Linux

Ffmpeg

Cuda

Related

Environmental information: ubuntu20.04 AARCH64 version + ffmpeg4.2.5 + cuda11

Ffmpeg’s compile flow here simple review:

1. Download the FFMPEG source code, download NV-CODEC-Headers

2. Compile and install NV-CODEC-HEADERS

3. Compile FFMPEG

My Configure option is like this

./configure  --enable-shared 
                 --disable-static 
                 --disable-doc 
                 --disable-ffplay 
                 --disable-ffmpeg  
                 --disable-ffprobe  
                 --enable-gpl 
                 --enable-libx264 
                 --enable-libx265 
                 --enable-cuda 
                 --enable-cuvid 
                 --enable-nvenc 
                 --enable-nvdec 
                 --enable-nonfree 
                 --enable-libnpp 
                 --enable-debug 
                 --extra-cflags=-I/usr/local/cuda/include 
                 --extra-ldflags=-L/usr/local/cuda/lib64 && 
                 make && make install 

This code is compiled by my AMD64 platform, but here is reported as follows: Error: Cuda Requested, But Not All Dependencies Are Satisfied: ffnvcodec

The online search is a lack of nv-codec-headers, or PKG_Config_Path is not set correctly. But I tried in the back sequence, I have a problem.

The following is my NV-CODEC-HEADERS installation, it is indeed installed and can be identified (the same code as the AMD64 platform).

Starting to suspect that the ARM version of NV-CODEC-Headers is different. It is the official website to find it. It has not distinguished ARM and X86 platforms, and this is just some header files.

Then I thought it was a problem that the CUDA version was too low, so there was still the problem after I tried several versions of CUDA.

Finally, there is really no way, changed the latest version of FFMPEG, which is resolved.

Conclusion: FFMPEG + CUDA compiled under ARM Note FFMPEG version must not be lower than4.4

Понравилась статья? Поделить с друзьями:
  • Error cs1501 unity
  • Error cs1501 no overload for method min takes 1 arguments
  • Error cs1061 юнити
  • Error cs1061 как исправить
  • Error cs1061 unity