Deepstream YoloV8 model causing stream distorsion

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) : Jetson
• DeepStream Version: 6.3
• JetPack Version (valid for Jetson only): 5.1.2
• TensorRT Version: 8.5.2
• Issue Type( questions, new requirements, bugs): Bug
**• How to reproduce the issue ? **

Dear NVIDIA DeepStream Support Team,

I hope this message finds you well. I am writing to report a critical issue I am experiencing with NVIDIA DeepStream while working on traffic monitoring using the deepstream-nvdsanalytics plugin.

Problem Description: I have successfully trained a YOLOv8 model for my specific use case, which involves the detection of various classes such as cars, buses, trucks, and motorcycles. When I run inference on pre-recorded video files, the model performs exceptionally well, accurately detecting the objects of interest. However, I encounter significant issues when attempting to run the same model on a live RTSP stream.

Issue Details:

  1. Distortion: When processing the live RTSP stream, the video feed experiences severe distortion. The entire picture becomes pixelated, and it is nearly impossible to discern the objects within the frame.
  2. Lost Detections: In addition to the distortion problem, the YOLOv8 model seems to lose its ability to make accurate detections on the live RTSP stream because of distortion. Objects that were previously well-detected in pre-recorded videos are no longer recognized.

Steps Taken: To troubleshoot the issue, I have already:

  1. Confirmed that the YOLOv8 model is correctly trained and is functioning as expected with pre-recorded video files.
  2. Checked that the RTSP stream source is reliable and provides a consistent video feed.
  3. Verified the DeepStream configuration for the live RTSP stream, ensuring that it matches the settings for video file inference.

Despite these efforts, the issue remains unresolved.

To assist in diagnosing the issue, I have attached the following files:

  1. Configuration files used for DeepStream.
  2. Sample frames demonstrating the distortion and lost detections on the live RTSP stream.

Please let me know if you require any additional information or files to better understand and address this issue.

video2-config.txt (6.1 KB)

Hi @dalibor.lekovic

These look like decoding artifacts. A detection model shouldn’t affect the input buffer on any way. Have you tried that same RTSP stream with the pretrained models in DeepStream?

could you share more logs? please do the following setting first, then run the app again, then share log. you can use zip to compress the log.
export GST_DEBUG=6
export GST_DEBUG_FILE=/tmp/gst.log

I was able to successfully reproduce the problem on a Jetson Xavier 16GB device using the default primary detector. When streaming video with H264 encoding, I noticed significant stream distortion. However, I found something interesting during my investigation. When I changed the camera settings to use H.265 encoding, there was no stream distortion at all.

This observation led me to investigate further, and I compared the results with a different device that is currently deployed in production, a Jetson Orin 64GB. To my surprise, on the Jetson Orin device, the default primary detector did not exhibit any problems with H264 streams, similar to the Jetson Xavier 16GB when using H.265 encoding.

gstlog.zip (7.2 MB)

Hi Miguel,

thanks for reply. Yes i noticed the same, some edge devices can work with h264 stream encoding while some can not. I posted below detailed answer.

We encountered a similar issue with an RTSP camera, and in the end, it was a combination of the NVIDIA decoder for a specific platform with our specific H.264 stream.

Maybe you are experiencing something similar because we have RTSP decoding on Xavier and Orin, and we haven’t seen this issue. It may be something specific to your RTSP stream. I would suggest testing the pipeline with a different stream and also with the software decoder avdec_h264 to confirm this. Then posting your findings as a possible nvv4l2decoder bug to get some help from NVIDIA.

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.


from the the log gstlog.zip. there are some rtp packets lost. AYK, data lost will cause decoding to fail. you can find do_lost_timeout to verify.

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