rtspsrc: Stream timeout after 30sec, potential QoS - jitter related?
Hi Gstreamer Community,
I am trying to use an Rtsp Stream from a Meraki Camera in a containerised Gstreamer application on an Nvidia Jetson Device. See the links at the bottom for the same question addressed towards nvidia (already closed) and meraki (no response yet).
The following pipeline stops after a while:
gst-launch-1.0 --gst-debug rtspsrc:5 rtspsrc location=rtsp://172.17.15.148:9000/live latency=200 protocols=tcp ! rtph264depay ! h264parse ! avdec_h264 ! fakesink
The log shows the following inf for rtspsrc
:
0:00:39.012627424 2031 0xaaaac8c00cc0 DEBUG rtspsrc gstrtspsrc.c:5292:gst_rtspsrc_handle_data:<rtspsrc0> pushing data of size 1456 on channel 0
0:00:39.012745889 2031 0xaaaac8c00cc0 DEBUG rtspsrc gstrtspsrc.c:5483:gst_rtspsrc_loop_interleaved:<rtspsrc0> doing receive with timeout 21 seconds, 149197 usec
0:00:41.013121788 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3116:gst_rtspsrc_sink_chain:<rtspsrc0> sending 84 bytes RTCP
0:00:41.013578336 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3118:gst_rtspsrc_sink_chain:<rtspsrc0> sent RTCP, 0
0:00:44.398050795 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3116:gst_rtspsrc_sink_chain:<rtspsrc0> sending 84 bytes RTCP
0:00:44.399698872 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3118:gst_rtspsrc_sink_chain:<rtspsrc0> sent RTCP, 0
0:00:49.452082450 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3116:gst_rtspsrc_sink_chain:<rtspsrc0> sending 60 bytes RTCP
0:00:49.453826399 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3118:gst_rtspsrc_sink_chain:<rtspsrc0> sent RTCP, 0
0:00:55.313793770 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3116:gst_rtspsrc_sink_chain:<rtspsrc0> sending 60 bytes RTCP
0:00:55.316535838 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3118:gst_rtspsrc_sink_chain:<rtspsrc0> sent RTCP, 0
0:00:59.033220662 2031 0xaaaac8c00cc0 DEBUG rtspsrc gstrtspsrc.c:5501:gst_rtspsrc_loop_interleaved:<rtspsrc0> timeout, sending keep-alive
0:00:59.033310679 2031 0xaaaac8c00cc0 DEBUG rtspsrc gstrtspsrc.c:5190:gst_rtspsrc_send_keep_alive:<rtspsrc0> creating server keep-alive
0:00:59.033840859 2031 0xaaaac8c00cc0 DEBUG rtspsrc gstrtspsrc.c:5483:gst_rtspsrc_loop_interleaved:<rtspsrc0> doing receive with timeout 59 seconds, 999994 usec
0:01:00.382545984 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3116:gst_rtspsrc_sink_chain:<rtspsrc0> sending 60 bytes RTCP
0:01:00.382947171 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3118:gst_rtspsrc_sink_chain:<rtspsrc0> sent RTCP, 0
0:01:06.059474662 2031 0xffff8003fc00 WARN rtspsrc gstrtspsrc.c:3458:on_timeout_common:<rtspsrc0> source 7d70c1fa, stream 7d70c1fa in session 0 timed out
0:01:06.059559815 2031 0xffff8003fc00 DEBUG rtspsrc gstrtspsrc.c:3418:gst_rtspsrc_do_stream_eos:<rtspsrc0> setting stream for session 0 to EOS
Got EOS from element "pipeline0".
Execution ended after 0:01:05.899511216
Setting pipeline to NULL ...
Setting latency=50000
increases the lifetime of the pipeline from 30sec to ~10min so it seems like I have a performance problem.
I am using TCP, as UDP does not want to connect.
Running the stream via ffplay
actually stops as well after a few minutes. This however can be resolved when setting -reorder_queue_size 0
, which as far as I know disables jitter buffering (StackOverflow).
Are there any parameters I should try to solve this problem? Any hints on what I could test?
https://forums.developer.nvidia.com/t/rtsp-source-stops-working-after-30s-qos-issue/242961