How to use deepstream_imagedata-multistream in custom app

So there is no way to use decoded frames in custom python app?

I used gstreamer + opencv in python, but this use both GPU buufer + CPU buffer,

        gstream_elemets = (
            'rtspsrc location=rtsp latency=300 !'
            'queue !'
            'rtph264depay ! h264parse !'
            'omxh264dec  disable-dvfs=1 enable-low-outbuffer=1 !'
            'queue !'
            'video/x-raw(memory:NVMM), framerate=25/1, format=(string)NV12 !'
            'queue !'
            'nvvidconv ! video/x-raw, width={}, height={}, framerate=25/1, format=(string)BGRx !'
            'videoconvert ! video/x-raw, framerate=25/1, format=(string)BGR !'
            'appsink max-buffer=100 sync=0 ')

cv2.VideoCapture(gstream_elemets, cv2.CAP_GSTREAMER)

I want to skip some frames, becuasethe input frame rate = 25 and output frame rate = 5, then I don’t want to decode all evey 25 input frames, I want to decode every 5th frames. This option is exist in nvv4l2decoder , but there is not such a way in omxh264dec to skip some frames. and I tested the nvv4l2decder, but I don’t know why this decoder don’t work in rtsp source but work for file source.
I also used videorate elemnt for framerate=5/1, but this cause cpu usage dramatically increased. I have to decoder every 25 frames then take only 5 frame with counter state in python program. because of I don’t want to decode every 25 frames.

please see this link.