I have an Nvidia GPU in my computer and I wanted to use it with ffmpeg to convert video files much quicker using hardware capabilities. On the documentation of Nvidia (ttps://developer.nvidia.com/ffmpeg), it is said that we have to recompile ffmpeg to gain support for CUDA. I am on Linux (Debian based, Ubuntu). First, I did "sudo apt remove" and then I've the repository and did :
sudo ./configure --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --enable-libass
sudo make -j 4
sudo make install
This does work pretty well with CUDA but the fact is that all the free codecs are not supported- (one example is CUDA). So I did :
sudo ./configure --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --enable-libass
sudo make uninstall
sudo make clean
./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --extra-libs="-lpthread -lm" --bindir="$HOME/bin" --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
sudo make -j 4
sudo make install
The problem is, when I run the ffmpeg command, I get this error:
maxime@maxime-X756UWK:~/ffmpeg_sources$ ffmpeg
bash: /usr/local/bin/ffmpeg: Aucun fichier ou dossier de ce type
The translation is "No such file or folder of that kind".
Here's the result of the "type" commande :
maxime@maxime-X756UWK:/usr/bin$ type ffmpeg
ffmpeg est haché (/usr/local/bin/ffmpeg)
The translation is "ffmpeg is hashed (/usr/local/bin/ffmpeg)"
I tried to install ffmpeg using apt, the installation worked, but I wasn't able to run the program...
Can you help me fix that issue?
Thanks in advance.