Bug in cudacodecs video_reader.cpp sample

asked 2017-08-20 16:34:29 -0600

Leon5x gravatar image

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

edit retag flag offensive close merge delete

Comments

please find a small size video to reproduce the error.

sturkmen gravatar imagesturkmen ( 2017-08-20 16:42:45 -0600 )edit

Why this? Shouldn't the video_reader be able to work with 4k videos? It seems to be a problem occuring when reading 4k videos, as it works when the video is converted to fullhd.

Leon5x gravatar imageLeon5x ( 2017-08-21 06:05:49 -0600 )edit