How to stream rtsp video better?

• Hardware Platform: Jetson Xavier NX
• DeepStream Version:5.0.0
• JetPack Version (valid for Jetson only):4.4

I wish to make the 4k RTSP stream to be more stable that being implemented in deepstream-test5, it seems like sometime when the network not stable it will show the distorted image like below. I know that the RTSP is using the UDP to stream the video, is this problem will be solved by changing streaming using TCP?

Hi,
It may be similar to this topic:
Encoding problem RTSp stream - #6 by DaneLLL
You may try type=2 or type=4 with setting drop-on-latency=0

And can try to tune some properties:
deepstream4.0 with rtsp of sink makes the picture distortion with high bitrate - #9 by DaneLLL

Hi, @DaneLLL
Thank you for replying! I have know the topics, but I tested with those topic seems like not perfect, I increased the bitrate and followed the topic such as setting MTU-size or force the rtsp to connect as TCP and etc, although it seems like smoothly than before, however I hope to use as surveillance purpose for real time I hope that rtsp stream will not drop frame, does nvidia tested with tcp stream instead of udp stream?

Hi,
The UDP streaming actually happens inside Xavier NX and is not a public streaming. The RTSP server is constructed by calling

gst_rtsp_media_factory_set_launch (factory, udpsrc_pipeline);

The code is open source in

deepstream-5.0\sources\apps\apps-common\src

May need other users to share experience and you can customize the code to give it a try.

Setting vbv-size in hardware encoder might help. Please take a look at

1 Like

@DaneLLL Thank you so much about the information, I tested with your advice by changing the vbv-size seems like work fine for my case. I would like to experiment with different vbv-size in order to get smooth rtsp.