Reducing H264 decoder latency

Hi,

I’m trying to build a low latency decoder pipeline for playing out network streams. I am observing 140ms pipeline latency which I want to reduce.

gst-launch-1.0 udpsrc port=34000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" ! queue ! rtph264depay ! h264parse ! omxh264dec disable-dpb=true ! nvoverlaysink

I profiled this further and found that omxh264dec has a latency of 56ms, i.e each input frame is outputed after 56ms. My input h264 stream has only I and P frames so I tried the disable-dpb=true option, but there is no difference.

Why does the decoder take 56 ms?. Is there a way to reduce this? Does the disable-dpb configuration work as expected?

Hi zeitgeist, please also try tegra multimedia api. Or run at max clocks
56ms looks OK. Please realize it is integrated with 3rd party frameworks and difficult to get zero latency. It worths trying tegra multimedia api.

Zeitgeist,

We’re having the same issue with the Jetson TX1. Instead of using the omxh264_dec element for H.264 decoding, we’re going to use libav’s avdec_h264 with max-threads=1. This gives us a latency of 30ms, which is better than anything we’re seeing with omxh264_dec (55-65ms in our case).

Hope that helps!