• Hardware Platform (Jetson / GPU) Jetson Nano • DeepStream Version V5.0 GA • JetPack Version (valid for Jetson only) 4.4
Hi all,
I am having an issue with getting smooth video playback when streaming from my IP cameras on my Jetson Nano. This can be seen from the deepstream-app sample application, even with only one RTSP source and inferencing and tracking turned of. The displayed video seems to skip frames, and is very noticeable when there are moving objects (people or cars).
After further investigation using only gst-launch-1.0, it seems that nvstreammux does not respect any latency on the rtspsrc.
Running either of the following commands (without nvstreammux) produces buttery smooth playback. Note that I have specified an unusually long latency here, generally 500ms works good for me. The default in the deepstream-app is 100ms which produces the jumpiness. But the 5 second latency in the examples demonstrates this the best. On running the command, the video playback shows one frame and then pauses for 5 seconds, after which it streams smoohtly.
Adding nvstreammux to the pipeline causes the 5s buffer to be “forwarded”/“eaten up”. On running the command, the video playback also shows the one frame, pauses for 5 seconds, and then “forwards” the video until the 5s buffer is gone, and the jumpiness returns. Note that this is a 1920x1080 @ 25fps stream.
My deepstream-app config file is based of the reference file you mentioned. I have setup my 8 RTSP sources, configured sync=0 on [sink0] and live-source=1 on the [streammux] as per the Deepstream FAQ with no difference. As mentioned, this is not related to an inferencing bottleneck as the issue persists event without inferencing and tracking (please see my post again)
Please try out the gst-launch-1.0 commands I have provided against a RTSP stream and you will see what I mean.
Adding sync=0 does not help. By adding sync=0 to any of the above samples causes the streams to start playing immediately with no buffering, and the jumpiness then occurs on all samples, even those without nvstreammux.
The question would then be with sync=0 on the sink, how to ensure a buffer for each stream of 500ms, for example?
There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks
Yes, this does occur with the above pipeline with latency=5000. It will show the initial frame, then wait 5000ms (5sec) and start playing. If one looks at a rtsp source with an embedded timestimp (e.g. IP camera) one will see it fast-forwards the stream until is catches up with the latest frame and the jumpiness/laggy display issue happening.
If one runs the above pipeline without the latency=5000, it defaults to 2000ms of the rtspsrc. In this case it will behave the same as above, but will wait only for 2sec and will catch up faster - with the jumpiness/laggy display issue occuring.
If one runs the above pipeline with latency=0, it will start playing immediately and the jumpiness/laggy display issue will also be visible.
Therefere, it looks like the nvstreammux does not honour the rtspsrc’s latency.
Running the following pipeline, it will show the initial frame, then wait 5000ms (5sec) and then start playing. There will be now fast-forward, and the stream will play back smoothly.
@DaneLLL, the pipeline you provided does work with no laggy display. It shows the initial frame, then waits for 5000ms (5sec) and then starts playing. There is also no “fast-forward”. It does not work if sync=false is set on the sink as recommended
The problem though is that this option does not work with the general deepstream pipeline (source(n) -> nvstreammux -> nvinfer -> nvtracker -> nvtiler -> nvosd -> sink) where one uses nvtiler for tiled display.
It also does not work with the provided Deepstream samples (e.g. deepstream-app) as mentioned in my initial post.
Hi,
We have not tested this kind of scenario - it is like a feature enhancement. No solution available for 5.0 GA release as it needs changes in nvstreammux component. would like to understand why this specific requirement or use-case so that we can evaluate to support it in future release.
@DaneLLL thank you for your confirmation that nvstreammux does not handle this general case correctly.
In my use-case:
I need to process 8x 1080p RTSP streams in real-time in the Jetson Nano, and maybe more streams with lower resolution.
I am already looking to expand onto the Jetson Xavier NX to process even more 1080p RTSP streams
I need to display all streams tiled, or a specific stream on a connected display
Therefore I need the visual display to be smooth without any laggy/stuttering issues, as the visual impression a client gets by looking at the display is that the software is not processing in realtime / is laggy. This is really a show stopper!
In my test case the network latency is very low, and smooth streaming is possible as can be confirmed with the nvcompositorsample above. This is not the case with nvstreammux in the pipleine, resulting in poor user perception.
I would further argue that having a “latency buffer” is very important to provide smooth stream playback in any software. Looking at the following defaults also suggests this (although I would run at lower latencies):
Hi,
There can be a quick solution for smooth playback. Could you check if the fps of all sources is same? If so, we can try by setting live-source=false. With this, timestamps of outgoing nvstreammux gst buffers will increase based on framerate of the source. If fps info is not available from caps, timestamps will increase as per 30 fps framerate.
it will show the initial frame, then wait 5000ms (5sec) and start playing. Looking at the embedded timestamp, one can still see the fast-forward but at a slower rate. Once it catches up, after ~25 seconds, I start seeing the following console warnings and the display update is very slow:
WARNING: from element /GstPipeline:pipeline0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0:
There may be a timestamping problem, or this computer is too slow.
The led me to running the following command with sync=false on the sync,