File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,11 @@ $ ./build-ffmpeg --build
217217## Cuda installation
218218
219219CUDA is a parallel computing platform developed by NVIDIA. To be able to compile ffmpeg with CUDA support, you first
220- need a compatible NVIDIA GPU.
220+ need a compatible NVIDIA GPU and the NVIDIA compiler nvcc from the CUDA toolkit .
221221
222- - Ubuntu: To install the CUDA toolkit on Ubuntu, run "sudo apt install nvidia-cuda-toolkit"
222+ - Ubuntu: To install the CUDA toolkit on Ubuntu, run ` sudo apt install nvidia-cuda-toolkit ` .
223+ After compilation, you can ` sudo apt install nvidia-cuda-dev && sudo apt remove nvidia-cuda-toolkit ` .
224+ This removes the compilers but leaves the needed shared library ` libnpp ` .
223225- Other Linux distributions: Once you have the GPU and display driver installed, you can follow the
224226 [ official instructions] ( https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html )
225227 or [ this blog] ( https://www.pugetsystems.com/labs/hpc/How-To-Install-CUDA-10-1-on-Ubuntu-19-04-1405/ )
Original file line number Diff line number Diff line change @@ -873,19 +873,21 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
873873 if build " nv-codec" " 11.1.5.2" ; then
874874 download " https://github.com/FFmpeg/nv-codec-headers/releases/download/n11.1.5.2/nv-codec-headers-11.1.5.2.tar.gz"
875875 execute make PREFIX=" ${WORKSPACE} "
876- execute make PREFIX=" ${WORKSPACE} /usr " install
876+ execute make PREFIX=" ${WORKSPACE} " install
877877 build_done " nv-codec" " 11.1.5.2"
878878 fi
879879 CFLAGS+=" -I/usr/local/cuda/include"
880880 LDFLAGS+=" -L/usr/local/cuda/lib64"
881- CONFIGURE_OPTIONS+=(" --enable-cuda-nvcc" " --enable-cuvid" " --enable-nvenc" " --enable-cuda-llvm" )
881+ CONFIGURE_OPTIONS+=(" --enable-cuda-nvcc" " --enable-cuvid" " --enable-nvdec " " --enable- nvenc" " --enable-cuda-llvm" " --enable-ffnvcodec " )
882882
883883 if [ -z " $LDEXEFLAGS " ]; then
884884 CONFIGURE_OPTIONS+=(" --enable-libnpp" ) # Only libnpp cannot be statically linked.
885885 fi
886886
887887 # https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
888888 CONFIGURE_OPTIONS+=(" --nvccflags=-gencode arch=compute_52,code=sm_52" )
889+ else
890+ CONFIGURE_OPTIONS+=(" --disable-ffnvcodec" )
889891 fi
890892
891893 # Vaapi doesn't work well with static links FFmpeg.
@@ -927,9 +929,7 @@ download "https://github.com/FFmpeg/FFmpeg/archive/refs/heads/release/$FFMPEG_VE
927929 --disable-shared \
928930 --enable-pthreads \
929931 --enable-static \
930- --enable-small \
931932 --enable-version3 \
932- --disable-ffnvcodec \
933933 --extra-cflags=" ${CFLAGS} " \
934934 --extra-ldexeflags=" ${LDEXEFLAGS} " \
935935 --extra-ldflags=" ${LDFLAGS} " \
You can’t perform that action at this time.
0 commit comments