NVENC latency

Hey! Using these gstreamer pipelines I measured latency:

gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080,framerate=60/1’ ! nvv4l2h265enc insert-sps-pps=true ! h265parse ! rtph265pay pt=96 ! udpsink host= port=8001 sync=false -e

Host (Windows PC):
gst-launch-1.0 udpsrc address= port=8001 caps=‘application/x-rtp, encoding-name=(string)H265, payload=(int)96’ ! rtph265depay ! h265parse ! queue ! nvh265dec ! autovideosink

The latency is about 150ms. This is too much for my use case. Is it possible to reduce the latency? For example, I saw in jtop that NVENC frequency is about 115MHz. But for the first second, it is 729MHz. I already activated jtops. Is it possible to increase frequency continously to reduce the latency?
Do you have other suggestions?

EDIT: When I display directly to monitor in jetson I have a latency ~50ms. So there seem to be ~100ms for encoding-transfer-decoding.

Best regards,

Please refer to this post and give it a try:
Gstreamer TCPserversink 2-3 seconds latency - #5 by DaneLLL

We don’t see much latency with videotestsrc plugin. Please try and check if you see similar result.

I made the test, too and my latency is much worse: 133ms
Right side: Jetson

gst-launch-1.0 videotestsrc is-live=1 ! video/x-raw,width=1280,height=720 ! timeoverlay valignment=4 halignment=1 ! nvvidconv ! ‘video/x-raw(memory:NVMM),width=1280,height=720’ ! tee name=t ! nvv4l2h264enc insert-sps-pps=1 idrinterval=15 ! h264parse ! rtph264pay ! udpsink host= port=8111 sync=0 t. ! queue ! nvdrmvideosink conn-id=1

Left side: Windows PC

gst-launch-1.0 udpsrc address= port=8111 ! ‘application/x-rtp,encoding-name=H264,payload=96’ ! rtph264depay ! h264parse ! nvh264dec ! autovideosink sync=0

Best regards,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.