Ask Your Question

Revision history [back]

Bug in cudacodecs video_reader.cpp sample

Hey all, When trying to read a 4k Video with the cuda VideoReader (gpu sample video_reader.cpp) I encountered a strange bug:

OpenCV Error: Unsupported format or combination of formats (Unsupported video source) in nextFrame, file /home/leon/opencv/opencv-3.3.0/modules/cudacodec/src/video_reader.cpp, line 143 terminate called after throwing an instance of 'cv::Exception' what(): /home/leon/opencv/opencv-3.3.0/modules/cudacodec/src/video_reader.cpp:143: error: (-210) Unsupported video source in function nextFrame

When I am reading a fullhd video this works without a problem. When reading my video I get this error message before reading a frame. When using this 4k video: video.mp4 It works for some frames and then crashes.

I searched through the web and source code and found nothing till now.

Further information: I compiled OpenCV 3.3.0 with CUDA support from source. Neither RAM or GPU memory is fully stretched. I tested the cudaDecodeGL sample (/cuda/samples/3_Imaging) and was able to display my 4k videos (but with 1fps). This was fixed by setting higher decode memory in video_decoder.cpp.

Does anybody know where the problem lies? Can somebody reproduce it?

Thanks in advance! Leon