Strip artifact shown on the top of video with some non NVidia GPUs

Hello friends,

I’m using VideoCapture to hw decode video frames using FFMPEG as backend. Everything works fine with NVidia’s GPUs, but an horizontal strip artifact has been shown on the top of the captured frames on some computers with Intel HD Graphics and AMD Radeon GPUs. The following image shows the issue:

The following simple code is enough to reproduce it:

VideoCapture vCapture = VideoCapture("video.mp4", VideoCaptureAPIs::CAP_FFMPEG, { VideoCaptureProperties::CAP_PROP_HW_ACCELERATION, VideoAccelerationType::VIDEO_ACCELERATION_D3D11 });
Mat frameTemp;
vCapture >> frameTemp;
imwrite("frame.bmp", frameTemp);    

Some notes:

  • I got the issue on Intel HD Graphics 2000, HD Graphics 3000, HD Graphics 4600 and AMD Radeon RX 550.

  • It seems to only happen with videos with resolution of 1920 x 1080. Here is one I’ve been using to test that: Video.mp4 - Google Drive

  • It doesn’t happen if I use CAP_MSMF. But I would like to keep using FFMPEG as backend because it has been proved much more efficient to perform seeking than MSMF (by setting CAP_PROP_POS_FRAMES or CAP_PROP_POS_MSEC flags).

Does anyone know a workaround to avoid that without using MSMF or software decoding?

Sorry for my poor English and thanks in advance.

potential bug. please browse/search the bug tracker. maybe someone already reported it.

does this happen with multiple video files? does it happen with ALL 1920x1080 videos you have handy?

Thanks for the quick response.

Yes, it’s happing with all 1920x1080 videos I’ve tested. It doesn’t happen with videos of other resolutions.