Bottom 10 rows of pixels in VideoCapture not right when using Gstreamer

I am looking for some help in understanding why the bottom 10 rows of pixels in the frame grab of my RTSP video are “not right” when using cv::VideoCapture with a Gstreamer pipe… but when I am using a normal cv::VideoCapture without Gstreamer… the video is fine.

See cropped frame captures…original frames are 1920 x1080. Notice the lower 10 rows of pixels… in the normal case where I am using

cv::VideoCapture capture(“rtsp://admin:passwd@”);

everything is fine.

When I use cv::VideoCapture capture(pipe,cv::CAP_GSTREAMER);
with this pipe…

std::string pipe = “rtspsrc location=rtsp://admin:passwd@ ! rtph264depay ! h264parse ! omxh264dec ! video/x-raw(memory:NVMM),format=(string)NV12 ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! appsink”;

then the video has trouble on the lower 10 rows of pixels.

I would like to use the Gst pipe since I can take advantage of hardware decode on the Xavier NX… and the CPU load is lower.

Can someone help? THANK YOU so much!

We are deprecating omx plugins. Please try nvv4l2decoder.