Problem compiling ffmpeg with nvenc using visual studio 2015 community edition

I’m trying to build ffmpeg w/ nvenc on Windows 10 64 bit and visual studio 2015 community edition. The command from step 10 in the Using FFmpeg with NVIDIA GPU Hardware Acceleration doc:

./configure --enable-nonfree --enable-cuda-sdk --enable-libnpp –-toolchain=msvc --extra-cflags=-I…/nv_sdk --extraldflags=-libpath:…/nv_sdk

Gives me the error ‘Unknown option “–-toolchain=msvc”’

Background: I’ve executed the commands (changed the path in the first, I’m not sure its right):

export PATH="/C/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/":$PATH export PATH="/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/bin/":$PATH

And …/nv_sdk has the subdirectories include & bin, copied from the NVIDIA GPU Computing Toolkit directory.

1 Like

Did you solve this? I am facing this problem too.

First write the command ./configure --toolchain=msvc. After configuration has finished, run the configuration again like this: ./configure -toolchain=msvc --enable-cuda-nvcc --enable-nonfree --enable-libnpp --extra-cflags=-I…/nv_sdk --extraldflags=-libpath:…/nv_sdk. Do not use –enable-cuda-sdk, it has been deprecated. There will be error again. Modify the configure file in the main directory. Search for the word gencode in the file. You will see a line like this: nvccflags_default="-gencode arch=compute_30,code=sm_30 -O2". Replace 30 by converting your gpu’s compute capability version. FOR EXAMPLE: if your gpu has compute capability 6.1 then replace 30 with 61.

1 Like