cv::cudacodec::createVideoReader Not Working as expected

Hi I am unable to run video reader GPU Sample using cv::cudacodec::createVideoReader . My configuration is as follows
Ubuntu 18.04 CUDA 11.4. Open CV build from Source. Source COnfiguration File enclosed.

This is my opencv build configuration

This is the error, I am getting.

./test_gpu5 /home/octo-ws/Downloads/jumanji.mp4
[ WARN:0@0.351] global /home/octo-ws/opencv/opencv/modules/videoio/src/cap_gstreamer.cpp (1381) open OpenCV | GStreamer warning: unable to query duration of stream
[ WARN:0@0.351] global /home/octo-ws/opencv/opencv/modules/videoio/src/cap_gstreamer.cpp (1412) open OpenCV | GStreamer warning: Cannot query video position: status=1, value=0, duration=-1
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.6.0-dev) /home/octo-ws/opencv/opencv/modules/core/include/opencv2/core/private.cuda.hpp:112: error: (-213:The function/feature is not implemented) The called functionality is disabled for current build or platform in function 'throw_no_cuda'

Aborted (core dumped)

Hi, can you send me a link to the sample code, I am confused as to why gstreamer is being called? I guess its because you don’t have FFMpeg. Unfortunately FFMpeg is required to parse the incoming bitstream, so cudacodec::VideoReader won’t work without it.

From your build it looks like you are building cudacodec, but NVDEC is not shown on the below line in your output,


this could be because FFMpeg isn’t present or it could be that you haven’t passed the location of the to cmake