# cv::VideoCapture.read(frame) with CAP FFMPEG and hardware acceleration adds two black lines

**URL:** <https://forum.opencv.org/t/cv-videocapture-read-frame-with-cap-ffmpeg-and-hardware-acceleration-adds-two-black-lines/24568>\
**Category:** C++\
**Tags:** videoio\
**Created:** [June 8, 2026, 7:03am UTC](https://forum.opencv.org/t/cv-videocapture-read-frame-with-cap-ffmpeg-and-hardware-acceleration-adds-two-black-lines/24568 "2026-06-08T07:03:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ari](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@ari](https://forum.opencv.org/u/ari)\
**Post date:** [June 8, 2026, 7:03am UTC](https://forum.opencv.org/t/cv-videocapture-read-frame-with-cap-ffmpeg-and-hardware-acceleration-adds-two-black-lines/24568/1 "2026-06-08T07:03:48Z")

</div>

We read mp4 video frame by frame with cv::VideoCapture.read like this :

```auto
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.
