Nvv4l2decoder latency is large

I am trying to transmit video with the following pipeline, but the nvv4l2decoder is causing a large delay. Is there any way to improve it?

Jetpack R32 Revision5.2

sender pipeline

gst-launch-1.0 v4l2src device=/dev/video0 ! 'image/jpeg, width=1280, height=720, framerate=30/1' ! \
jpegdec ! \
nvvideoconvert ! 'video/x-raw(memory:NVMM), format=I420, width=1920, height=1080, framerate=30/1' ! \
nvv4l2h264enc maxperf-enable=1 ! \
rtph264pay ! \
udpsink host= port=5000

receiver pipeline

gst-launch-1.0 -e \
udpsrc port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! \
rtpjitterbuffer ! \
rtph264depay ! \
h264parse ! \
nvv4l2decoder enable-max-performance=1 disable-dpb=1 ! \
nvvideoconvert ! \

Some latency can be from the source. Please try this setup which uses videotestsrc and check the latency:
Gstreamer TCPserversink 2-3 seconds latency - #5 by DaneLLL

videotestsrc doesn’t have latency. We can roughly know the latency of the source(v4l2src)

Thank you very much.
Indeed, it seems that the delay in v4l2src was significant. It also seemed that the rtpjitterbuffer on the receiving end was also causing delays, so I changed the pipeline as follows, which improved things considerably.

Sender pipeline.

gst-launch-1.0 v4l2src device=/dev/video0 ! image/jpeg,width=1920,height=1080, framerate=30/1 ! \
jpegdec ! timeoverlay valignment=4 halignment=1 ! \
nvvideoconvert ! 'video/x-raw(memory:NVMM),width=1920,height=1080' !\
tee name=t ! nvv4l2h264enc insert-sps-pps=1 idrinterval=15 ! \
h264parse ! rtph264pay ! udpsink host= port=5000 sync=0 t. ! \
queue ! nvegltransform ! nveglglessink sync=0

Receiver pipeline

gst-launch-1.0 udpsrc port=5000 ! 'application/x-rtp,encoding-name=H264,payload=96' ! \
rtph264depay ! avdec_h264 ! xvimagesink sync=0

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