# nvh264dec / vah264dec add one frame of latency on a no-B-frame live stream, even with max-display-delay=0

**URL:** <https://discourse.gstreamer.org/t/nvh264dec-vah264dec-add-one-frame-of-latency-on-a-no-b-frame-live-stream-even-with-max-display-delay-0/5935>\
**Category:** General Discussion\
**Created:** [November 5, 2026, 2:04pm UTC](https://discourse.gstreamer.org/t/nvh264dec-vah264dec-add-one-frame-of-latency-on-a-no-b-frame-live-stream-even-with-max-display-delay-0/5935 "2026-11-05T14:04:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgupta-telos](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/p/f05b48/32.png) [@pgupta-telos](https://discourse.gstreamer.org/u/pgupta-telos)\
**Post date:** [November 5, 2026, 2:04pm UTC](https://discourse.gstreamer.org/t/nvh264dec-vah264dec-add-one-frame-of-latency-on-a-no-b-frame-live-stream-even-with-max-display-delay-0/5935/1 "2026-11-05T14:04:57Z")

</div>

We stream live H.264 over WebRTC (`webrtcbin`) at 30 fps and are trying to bring glass-to-glass latency down. Almost all of the remaining receiver time is in the hardware decoder: `nvh264dec` holds each decoded frame for one frame period before pushing it downstream. Software decoders on the same stream don’t do this.

**Setup**

- GStreamer 1.24.2, Ubuntu, NVIDIA GPU: [GPU model / driver version]

- Sender: `x264enc tune=zerolatency speed-preset=ultrafast key-int-max=30 pass=cbr byte-stream=true`. No B-frames, so the stream needs no reordering.

- Receiver: `webrtcbin → rtph264depay → decodebin` (picks `nvh264dec`) `→ videoconvert/glupload → qml6glsink`

- 1080p, 30 fps, progressive

---

<div class="post-metadata">

**Author:** ![ndufresne](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/ndufresne/32/10_2.png) [@ndufresne](https://discourse.gstreamer.org/u/ndufresne)\
**Post date:** [November 5, 2026, 2:13pm UTC](https://discourse.gstreamer.org/t/nvh264dec-vah264dec-add-one-frame-of-latency-on-a-no-b-frame-live-stream-even-with-max-display-delay-0/5935/2 "2026-11-05T14:13:54Z")

</div>

You can use the [latency tracer](https://gstreamer.freedesktop.org/documentation/coretracers/latency.html) to locate what component causes this extra latency. Use gst-stats-1.0 to process the logs and make human readable output.

Typically, many things can introduce 1 frame of latency, Annex B formatting is out, lack of marker bit over RTP is another (though would affect avdec\_h264). Regarding NVDEC, considering we had 4 frames with the stateful interface, you already won on latency quite a bit. But I know on VA (with Intel and AMD), for the type of stream you produce, there shouldn’t be any decoder introduce latency other then the processing time.

---

<div class="post-metadata">

**Author:** ![johnwhite](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@johnwhite](https://discourse.gstreamer.org/u/johnwhite)\
**Post date:** [November 16, 2026, 12:33pm UTC](https://discourse.gstreamer.org/t/nvh264dec-vah264dec-add-one-frame-of-latency-on-a-no-b-frame-live-stream-even-with-max-display-delay-0/5935/3 "2026-11-16T12:33:34Z")

</div>

Your DPB explanation is plausible, but retaining a picture as a reference and outputting it are separate: with max\_num\_reorder\_frames=0 the decoder can output a picture immediately after decoding and still keep it in the DPB for later reference. I don’t know of a GstH264Decoder property that forces that; max-display-delay only limits reorder delay. So your second question is yes in principle, but it likely needs a baseclass/low-latency change rather than a setting. Confirm with the latency tracer that the 33 ms is on nvh264dec’s src pad before filing.
