Deepstream-test3 python : rtsp shows stuttering image every 2 seconds

• Hardware Platform (Jetson / GPU) Jetson Orin Nano
• DeepStream Version 6.3
• JetPack Version (valid for Jetson only) 5.1.2
• TensorRT Version 8.5

I use deepstream-test3.py with RTSP stream as input, I turned off AI inference but the displayed image still freezes every 2-3s. Does anyone know where the problem is, please help me. Thanks a lot

did you modify the code or configurations? . without code modification, testing one source, will the output stutter?

I modified the code to skip loading the model and inference, only displaying the image, then every 2 seconds the image will freeze. The same problem when I use the C code in /opt/nvidia/deepstream/deepstream-6.3/sources/apps/sample_apps/deepstream-test3 , when running, every 50 frame-num the image will freeze

here are some steps to narrow down this issue.

  1. what is the start command-line? could you share the whole log? Thanks!
  2. if using VLC or ffplay to play, the output video will stutter?
  3. use gst-launch to check which plugin cause the issue.
    a> will “gst-launch-1.0 uridecodebin uri=rtsp://“address” ! nvvideoconvert ! nv3dsink” stutter?
    b> will “gst-launch-1.0 uridecodebin uri=rtsp://10.19.226.223/media/video1 ! mux.sink_0 nvstreammux name=mux width=1280 height=720 batch-size=1 ! nv3dsink” stutter?

I just run: python deepstream_test_3.py -i rtsp://user:pass@ip then it displays the stream on the screen (I haven’t gone into the code yet), I remove the pgie plugin to remove AI inference, With the C code I follow the README and run ./deepstream-test3-app rtsp://user:pass@ip

could you provide the information mentioned in my last comment? Thanks!

Sorry I have some work for a few days so I’m late in responding, here is the result when following your instructions:

  1. As my previous answer

  2. If using vlc,ffplay, the stream displays normally

a) The image appears on a black screen
b) There is an rtsp stream image displayed, however the image is jerky, a lot and not following the pattern like when running deepstream-test3 python

Is there any solution? The image jerks periodically (when using C code, I see it jerks every 50 frames) each time it jerks for about 0.1s, making the video not smooth.
Here is the c code and python code i used

deepstream_test3_app.txt (18.4 KB)
deepstream_test_3.py.txt (14.7 KB)

sorry for the late reply. noticing the test video of 3.b above is jerky, does “jerky” mean stuttering? I can’t reproduce the stuttering by this basic command-line. could you share the 1.log including more logs after doing the following test? will the output video still stutter? Thanks!

export GST_DEBUG=3,rtpjitterbuffer:6,h264parse:6,v4l2videodec:6,videodecoder:6 && gst-launch-1.0 uridecodebin uri=rtsp://address  ! mux.sink_0 nvstreammux name=mux width=1280 height=720 batch-size=1  live-source=1  ! nv3dsink >1.log 2>1.log

I followed your instructions, the video output is still jerky (the video is running normally then suddenly stops for about 0.1s or so, then continues… it keeps repeating like that and it’s in a regular cycle, not random so I think maybe there’s a sleep part somewhere?)

Here is the log file, thanks
1.log (17.7 MB)

Thanks for the sharing! from the log, I found sometimes the decoder outputted many frames at the same time. for example, from 0:00:26.279312392 to 0:00:26.281870135, In 2 ms, there are 16 output frames. it should be related to the stream. could you help to dump some stream by the following command-line? Thanks!

gst-launch-1.0 rtspsrc location=rtsp://address ! rtph264depay ! h264parse ! mux. mpegtsmux name=mux ! filesink location=output.ts

After running the command, when viewing “output.ts” I see that the video is not jerky as I described before.

could you share the output.ts? Thanks! we need to check if it is decoding issue. You can use forum private email. please click forum avatar-> personal messages->new message.

Do you need the problematic video to compare, or just the “output.ts” I said is fine

the “output.ts” you said is fine. how long and how often will the stuttering happen? for example, if the stuttering happens in 20 seconds, please provide 20 seconds recording.
please also record a problematic video, wondering what kind of stuttering.

I sent you 2 videos, i have not tried with long videos, the problem occurs right from the start

fanzh solution works

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