Gstreamer pipeline framerate degrading over time

Hi, I’m working for my thesis on an object detection pipeline project on a Jetson TX2 but I have a problem with the decoding of the video source. I rebuilt OpenCV with gstreamer support and I’m using cv2 python VideoCapture object with the following pipeline:

"rtmpsrc location={location} latency=2000 buffer-mode=2 udp-buffer-size=4194304 ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! appsink"

It starts and works at full speed with NVDEC (20fps as the rtsp source) but after some hours, which may be between 4 and 10, the decoding framerate either drops to 5-6fps or it slowly reaches it. Finally, after a few more hours on that state, it just stops producing frames and hangs without exiting (I guess it hangs on the videocapture.read() call since it’s the only blocking one).

Has anyone encountered a similar problem? I really have no clue on how to debug this behaviour.

Hi,
Does it happen if you run with single pipeline gst-launch-1.0?

gst-launch-1.0 rtmpsrc location={location} latency=2000 buffer-mode=2 udp-buffer-size=4194304 ! rtph264depay ! h264parse ! omxh264dec ! nvoverlaysink