• Hardware Platform (Jetson / GPU):Jetson
• DeepStream Version:5.1
• JetPack Version (valid for Jetson only):4.5
• TensorRT Version:7.1.3
Hi guys,
I want to send results of gstreamer pipeline streams into server, and for this I used GstRtspServer and sample codes. I before used this sample code with jetapck 4.4 and DS-5.0, every thigs was relatively good, but when I migrate to jetapck 4.5 and DS-5.1, the encoded streams in server side has huge latency about 10 second delay, why this issues is occurred? This is bug in the new version?
1- When I don’t use GstRtspServer and only use udpsink in the client side and then use gst-launch-1.0 udpsrc … in the server side the every this is good.
2- When I use GstRtspServer plugin in the client side, then I can easily use ffplay(ffmpeg) rtsp://localhost:port/ in the server side and easily use in custom applications, but the solution 1 isn’t easy in the server side for usage in custom apps, I have to write the custom plugin for this in the server side.
Hi,
Please share which Jetson platform you use. And in server you run the sample:
deepstream_python_apps/deepstream_test1_rtsp_out.py at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub
Please share the command you run in client. Do you run gstreamer command or use VLC player?
With the information we can try to reproduce the issue.
Jetson Xavier NX
I mentaned in the above post, I don’t use VLC player.
ffplay(ffmpeg) rtsp://localhost:port/
1 Like
@gharbv,
yes, but has delay.
Hi,
Please set the property ot encoder and try again:
encoder.set_property('idrinterval', 30)
With the setting IDR frames are present every second for 30fps. Should reduce certain delay.
@DaneLLL, Thanks, It’s reduce delay, but in the multi-stream, using of GstRtspServer has relatively latency, and the result of this solution(2) has relatively delay than solution 1, the solution 1 nearly hasn’t any latency.
Solution 2:
out_port = 8555
base_udpsink_port_num = 5400
server = GstRtspServer.RTSPServer.new()
server.props.service = "%d" % out_port
server.attach(None)
for i in range(num_sources):
factory = GstRtspServer.RTSPMediaFactory.new()
factory.set_launch(
"( udpsrc name=pay0 port=%d buffer-size=524288"
' caps="application/x-rtp, media=video, clock-rate=90000,'
' encoding-name=(string)H264, payload=96 " )'
% (base_udpsink_port_num + i)
)
factory.set_shared(True)
server.get_mount_points().add_factory(
"/demo{}".format(i), factory
)
When I used the above code in pipeline, then I run :
ffplay rtsp://IP:8555/demo0
ffplay rtsp://IP:8555/demo1
…
Solution 1:
When I removed the above codes from pipeline, then I run :
gst-launch-1.0 -v udpsrc port=5400 caps = “application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96” ! rtph264depay ! decodebin ! videoconvert ! autovideosink
This solution 1 it’s perfect and hasn’t any delay.
Why the solution 2 has huge delay?