add cuda 10 support for opencv_nvcuvid#1946
add cuda 10 support for opencv_nvcuvid#1946opencv-pushbot merged 1 commit intoopencv:masterfrom LNKLEO:master
Conversation
nvidia video codec sdk need to be installed separately (https://developer.nvidia.com/nvidia-video-codec-sdk#Download) only Samples/NvCodec/NvDecoder/nvcuvid.h and Samples/NvCodec/NvDecoder/cuviddec.h is necessary
|
I compiled latest OpenCV (4.0.1) with opencv_contrib master branch, but when I call cv::cudacodec::createVideoReader(fname) I'm got following error : |
are you sure you have built opencv with CUDA support enabled? the function you are calling is cuda-implemented. |
|
yes I am sure, I set WITH_CUDA flag on. You said I need to install nvidia video codec sdk separately, I downloaded Video_Codec_SDK_8.2.16.zip but how I must install it? (I'm using Windows 10 and MSVC 2017) |
simply extract nvcuvid.h and cuviddec.h to include path(such as the include directory within CUDA SDK installation, like installation of cudnn), and make sure the project summary shows you have CUDA enabled. from the error message you providing, I suspecting that cmake didn't find CUDA you installed. check if you have add it to PATH first. |
|
Thank you `Windows SDK version 10.0.14393.0 to target Windows 10.0.17134. General configuration for OpenCV 4.0.1 ===================================== Extra modules: Platform: CPU/HW features: C/C++: OpenCV modules: Windows RT support: NO GUI: Media I/O: Video I/O: Parallel framework: Concurrency Trace: YES (with Intel ITT) Other third-party libraries: NVIDIA CUDA: YES (ver 10.0, CUFFT CUBLAS) OpenCL: YES (no extra features) Python 3: Python (for build): C:/Python/Python36/python.exe Java: Install to: D:/Develop/OpenCV/buildMSVC4.0.1/installConfiguring done` |
I didn't found NVCUVID section in your summary, assume if it has been checked in cmake-gui, and retry build. |
|
That's right, cmake could not find NVCUVID, I need to set the the path manually, which path I must set for CUDA_nvcuvid_LIBRARY ? |
|
just put that two header files inside Nvidia video codec sdk into CUDA include directory should be work. |
Thank you so much I rebuild the project and everything works fine :) |
|
@LinkeyLeo Hello, Did you test this in |
nvidia video codec sdk need to be installed separately (https://developer.nvidia.com/nvidia-video-codec-sdk#Download)
only Samples/NvCodec/NvDecoder/nvcuvid.h and Samples/NvCodec/NvDecoder/cuviddec.h is necessary
resolves #1786
use nvcuvid.h instead of dynamic_nvcuvid.h when using cuda other than version 9