git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git cd nv-codec-headers vi Makefile # change the first line to PREFIX = ${CONDA_PREFIX} make install cd .. git clone https://git.ffmpeg.org/ffmpeg.git cd ffmpeg git checkout n4.2.2 conda install nasm ./configure --prefix=$CONDA_PREFIX --enable-cuda-sdk --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 make -j 10 make install ###### DONE ###### ### TIP: # If CUDA is not installed, you can install without root permission as below. bash cuda_10.2.89_440.33.01_linux.run --silent --override --toolkit --toolkitpath="$CUDA_DIR" --librarypath="$CUDA_LIB_DIR"