We read mp4 video frame by frame with cv::VideoCapture.read like this :
cv::VideoCapture capture = cv::VideoCapture(cv::String(“video.mp4”), cv::CAP_FFMPEG,{cv::CAP_PROP_HW_ACCELERATION,cv::VIDEO_ACCELERATION_ANY});
if (capture.isOpened())
{
while (!isEndVideo)
{
(…)
cv::Mat frame;
capture.read(frame);
}
}
Frame retrieved have 2 black lines on the bottom while on the video those 2 black lines are not present.
Our video is a fullHD video (1920x1080).
If we don’t use hardware acceleration, those 2 black lines are not present. If we pass a video 1920x1088 with hardware acceleration, those 2 black lines are no present.
We need to use hardware acceleration for performance reasons, and size of our video can’t be changed. Is it a bug ? Is there a way to get around this problem ?
Environment : Windows / C++ / OpenCV 4.13.0
Thanks.