#RESOLVED: ffmpeg returns error

1 messages · Page 1 of 1 (latest)

gray peak
#

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!

#

Advanced package tool!

#

It is a command-line tool that simplifies the process of installing, updating, and removing software packages on Linux!

#

apt ^

#

Ah

#

Which distro are you on

#

Debian?

#

Alrighty!

#

I have to be careful with which commands I give you.

#

As some may not work with certain distros!

#

Try this command string:
export PATH=/path/to/cuda/bin:$PATH && \
git -C /home/felix/.cache/yay/alvr/src/alvr/deps/linux/nv-codec-headers pull origin master && \
sudo apt update && \
sudo apt install libavcodec-dev libavformat-dev libavutil-dev nvidia-cuda-toolkit && \
cd /home/felix/.cache/yay/alvr/src/alvr/deps/linux/ffmpeg && \
PKG_CONFIG_PATH='/home/felix/.cache/yay/alvr/src/alvr/deps/linux/nv-codec-headers/build/lib/pkgconfig' ./configure \
--prefix=/home/felix/.cache/yay/alvr/src/alvr/deps/linux/ffmpeg/alvr_build \
--enable-gpl --enable-version3 --enable-static --disable-programs --disable-doc \
--disable-avdevice --disable-avformat --disable-swresample --disable-swscale --disable-postproc \
--disable-network --disable-everything --enable-encoder=h264_vaapi --enable-encoder=hevc_vaapi \
--enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-filter=scale_vaapi --enable-vulkan \
--enable-libdrm --enable-pic --enable-rpath --fatal-warnings --enable-encoder=h264_nvenc \
--enable-encoder=hevc_nvenc --enable-nonfree --enable-cuda-nvcc --enable-libnpp \
--nvccflags="-gencode arch=compute_52,code=sm_52 -O2" \
--extra-cflags="-I/opt/cuda/targets/x86_64-linux/include" \
--extra-ldflags="-L/opt/cuda/targets/x86_64-linux/lib" && \
make && \
sudo make install

This will add CUDA to PATH temporarily. Updates some respositories and dependencies! Compiles ffmpeg and reinstalls it!

#

Oh fair!

#

Np!

#

Make sure you to add the resolved tag to this thread @meager vigil!