RTSP with Jetson Nano

I implemented the RTSP server as described in the Jetson Nano FAQ :
Jetson Nano FAQ
It works properly, but the latency is high, about 2-3 seconds.

The video source is CSI Camera- IMX219. The server launch command is as follows:
./test-launch “nvarguscamerasrc ! nvvidconv ! nvv4l2h264enc ! h264parse ! rtph264pay name=pay0 pt=96”
GStreamer version: 1.14.5

Any suggestion to reduce The Latency ? Thanks.

The latency may be in receiver part. Note that typical latency from gstreamer (from rtpjitterbuffer plugin that would be instanciated from rtspsrc that would be instanciated from uridecodebin) would be 2000 ms.
Depending on how you’re receiving, you may be able to decrease this to a a few frames, but 0 might not be be the best option.
On sender side, you may try adding do-timestamp=1 to src such as:

./test-launch "nvarguscamerasrc do-timestamp=1 ! nvvidconv ! ... "

With "do-timestamp=1, the same latency, no change.
Do you know if it is possible to get reduced Latency using GStreamer ?
Do you know if any RTSP or UDP example with reduced latency exist ? Thanks.

For receiving with gstreamer, first try on the Jeston itself if it has a display:

gst-launch-1.0 uridecodebin uri=rtsp://127.0.0.1:8554/test source::latency=200 ! nvvidconv ! autovideosink

This would try to adjust latency around 200 ms. On another host you may just use:

gst-launch-1.0 uridecodebin uri=rtsp://<Jeston_IP>:8554/test source::latency=200 ! autovideosink

For receiving with FFMPEG, you would adjust option probeSize such as:

ffplay -probesize 500000 rtsp://<Jeston_IP>1:8554/test

Thank you very much for the support.
Now, the latency is about 250 mSec. (huge improvement)
However, our latency target is below 100 mSec for 1080p,30 fps.
Is is possible to get this target with GStreamer ? Maybe using other package ?

Hi,
Please execute the steps on Jetson Nano and check if there is improvement:

  1. Run $ sudo nvpmodel -m 0 and $ sudo jetson_clocks
  2. Enable maxperf-enable=1 to nvv4l2h264enc
  3. Set idrinterval to small value such as 15

There is 4-frame buffering in Argus so it may not be within 100ms for 30fps. After executing above steps, Jetson Nano are in maximum throughput and please try and see if there is further improvement.

And for comparison, you may also try UDP by referring to this topic:
Gstreamer TCPserversink 2-3 seconds latency - #5 by DaneLLL

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