Our software on Linux Desktop uses this GSTreamer v1.22.3 to achieve VA-API-based hardware-accelerated IP camera video decoding with just about 220ms delay using this pipeline:
rtspsrc location=rtsp://... protocols=tcp latency=100 buffer-mode=slave ! queue max-size-buffers=0 ! rtph264depay ! h264parse ! vah264dec compliance=3 ! glupload ! glcolorconvert ! qmlglsink
Meanwhile, to show RTSP stream on imx8mm this pipeline is used:
rtspsrc location=rtsp://... protocols=udp latency=200 buffer-mode=slave ! queue max-size-buffers=0 ! rtph264depay ! queue max-size-buffers=0 ! h264parse ! queue max-size-buffers=0 ! imxvpudec_h264 ! queue max-size-buffers=0 ! glupload ! qmlglsink sync=1
It seems that I need to use latency=200 in order to keep stable 25fps. If I reduce rtspsrc latency to same 100 as on Desktop, I get "wobbling", unstable and low framerate, some times dropping to 11fps for example. And if I keep 200ms latency, final real delay (measured by screencaping running timer, etc) is near 400ms, which is rather high for our use case.
I have same FPS issues even if I use "raw" glimagesink, launched via gst-launch-1.0 via terminal.
Maybe there are some "tricks" what I don't know that would help to display RTSP streames with lower latency, but with still stable 25fps video in i.MX8M Mini machines?
Thanks!