OS : centos 7.0
FFmpeg 4.0.1
./configure --extra-cflags="-fPIC" --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --enable-shared --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
OpenCV 3.4.1
cmake -D WITH_IPP=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local –D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.1/modules -D WITH_CUDA=ON -D WITH_CUBLAS=ON -D CUDA_FAST_MATH=ON -D WITH_CUFFT=ON -D WITH_NVCUVID=ON -D WITH_FFMPEG=ON ..