0

I am trying to compile FFMPEG with Nvidia Cuda support on jetson TX2 by following the tutorial https://developer.nvidia.com/ffmpeg

git clone https://github.com/FFmpeg/FFmpeg -b master 
cd FFmpeg
./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp  --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 

When I try to configure ffmpeg, it says:

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

I saw the first answer of the question :ERROR: cuvid requested, but not all dependencies are satisfied: cuda/ffnvcodec

I thought I found the solution for my problem. 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

i tried to recompile the ffmpeg as first, but i get the same error.

Then I declare the PKG_CONFIG_PATH pointing to the path where ffnvcodec.pc is located when running configure for FFmpeg

PKG_CONFIG_PATH="/home/nvidia/ffmpeg_sources/nv-codec-headers/" ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp  --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 

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

thanks for any help

Mohand
  • 1
  • 1
  • 1
  • Try `cd FFmpeg && make distclean; ./configure --enable-nonfree --enable-libnpp`. `--enable-cuda --enable-cuvid --enable-nvenc` are autodetcted and are not needed. You probably don't have anything in `/usr/local/cuda/`. You likely do not need to use `PKG_CONFIG_PATH`. – llogan Mar 18 '19 at 19:07
  • @llogan Thanks. I just tried that and got: **ERROR: libnpp not found** . you say that I have anything /usr/local/cuda but I have all libraries , you can see `nvidia@tegra-ubuntu:~$ ls /usr/local/cuda -> bin extras lib64 nvml README share tools doc include LICENSE nvvm samples targets version.txt ` – Mohand Mar 19 '19 at 09:54
  • @llogan as you say .I compile the FFmpeg NVIDIA headers and I found it -> `nvidia@tegra-ubuntu:~$ ls /usr/lib/pkgconfig -> cuda-9.0.pc mpi-c.pc nppig-9.0.pc ompi-cxx.pc cufft-9.0.pc mpi-fort.pc nppist-9.0.pc ompi.pc cuinj64-9.0.pc nppc-9.0.pc nppitc-9.0.pc pm-utils.pc cusolver-9.0.pc nppial-9.0.pc nvgraph-9.0.pc visionworks.pc cusparse-9.0.pc nppicc-9.0.pc nvml-9.0.pc vpx.pc ffnvcodec.pc nppicom-9.0.pc nvrtc-9.0.pc ` . but the problem is not resolved yet – Mohand Mar 19 '19 at 10:08
  • @llogan since I installed cuda 9.0, I found another folder **/cuda9.0/** and **/cuda/** in the directory **/usr/local** so I have to try again with -> `./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda-9.0/include --extra-ldflags=-L/usr/local/cuda-9.0/lib64ERROR: cuda requested, but not all dependencies are satisfied: ffnvcodec` **but it still does not work !** – Mohand Mar 19 '19 at 10:18
  • FFMpeg support is not supported by TX2 just like for desktop GPUshttps://devtalk.nvidia.com/default/topic/1002969/jetson-tx2/how-to-build-ffmpeg-with-harware-acceleration-on-tx2-/post/5275574/#5275574 – Mohand Apr 11 '19 at 12:44
  • You can make that as an answer. – llogan Apr 11 '19 at 16:54
  • You can use `make install PREFIX=$HOME/ffmpeg_build` (for example) if you don't want to install to /usr/local. – rgov May 02 '23 at 22:55

0 Answers0