The build error you're encountering with FFmpeg suggests a problem with detecting the NVIDIA CUDA compiler (nvcc).
Ensure CUDA is installed. nvcc --version
Confirm nvcc is in your system's PATH. Add it if necessary. export PATH=/path/to/cuda/bin:$PATH
Pull the latest changes from the FFmpeg Git repository. git pull origin master
Verify all required dependencies (codecs, libraries) are installed. sudo apt-get install libavcodec-dev libavformat-dev ...
Review error logs and post here accordingly! After making these adjustments, attempt the build again!