ffmpeg compile with nvidia acceleration failed
I have today updated Slackware64-current.
HP ZBook with Nvidia P2000 Installed: nv-codec-headers-12.0.16.0-x86_64 nvidia-driver-535.113.01_multilib-x86_64 nvidia-kernel-535.113.01_6.4.16-x86_64 Nvidia krenel/driver test: Code:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep OpenGL Code:
ls -la /usr/include/ffnvcodec/ Code:
ffmpeg -hide_banner -encoders |grep H.26 As a result ffmpeg is not nvidia accelerated.:( Please help. |
Check the build instructions for an option to enable nvenc or edit the buildscript to enable it.
|
Quote:
All properly done by manuals/suggestions here and Nvidia. What bothers me, is on nVidias page as Prerequisites: To compile FFmpeg, the CUDA toolkit must be installed on the system, though the CUDA toolkit is not needed to run the FFmpeg compiled binary. Previous versions do not require Cuda Toolkit to compile only nvenc and nvdec without Cuda acceleration. For simple test I used pure ffmpeg-5.1.3 source and get undefined error as nvenc is not a library or dependency: Code:
./configure --prefix="$HOME/bin" --bindir="$HOME/bin" --disable-doc --enable-static --disable-shared --enable-openssl --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libopus --enable-libfdk-aac --enable-libtheora --enable-zlib --enable-libfreetype --enable-libpulse --enable-libfribidi --enable-libass --enable-nvenc --enable-gpl --enable-nonfree |
Installed cuda-12.2, the same error remains.:confused::banghead:
|
Do you have libvdpau installed?
It's a dependency of nvidia-driver according to https://docs.slackware.com/howtos:ha...aphics_drivers Also you might try this: Code:
For CUDA/OpenCL to work after reboot, and for utilites such as |
Quote:
/dev/nvidia-modeset /dev/nvidia-uvm /dev/nvidia-uvm-tools /dev/nvidia0 /dev/nvidiactl /dev/nvidia-caps: nvidia-cap1 nvidia-cap2 I tested all I found on net, but no success. I also reverted kernel/driver to 530.41.03. ffmpeg config do not detect nvidia kernel modules and drivers. Explicitly specified enable-nvenc in configure returns: nvenc requested but not found. Can anybody help? |
Part of config.log where error is:
Code:
clang: warning: CUDA version 12.1 is only partially supported [-Wunknown-cuda-version] |
:) Finally solved. :)
nv-codec-headers is responsible for many hours lost. The right version is 11.1.5.3 - the last 11.X version. Despite a new nvidia kernel/driver installed, nv-codec-headers must be < 12.X. Works with the latest 545.23.06 kernel/driver. All options are autodetected with original Pats ffmpeg.SlackBuild. As I'm out of US, I set to compile patented and non_free code. |
Instructions for CUDA 12.x: https://docs.nvidia.com/video-techno...ling-for-linux
|
be sure to update nv-codec-headers to correspond with your Cuda version
Quote:
Update: I needed to update nv-codec-headers to 12.1.14.0, then the SlackBuild detected everything properly. |
All times are GMT -5. The time now is 05:00 PM. |