Nvv4l2decoder breaks on some H.264 streams

Hi! I’m having problems with DeepStream accelerated decoder. It gets in an endless loop with some video streams. I’ve finally found a video to reproduce this issue. The video is from a publicly available HLS stream (saved from YouTube).

I’ve uploaded the video here looping.mp4 - Google Drive. The issue can reliably be reproduced with the following pipeline:

gst-launch-1.0 filesrc location=looping.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! progressreport update-freq=1 ! nveglglessink

It starts glitching/looping at around 12 seconds and ultimately segfaults. However, avdec_h264 works just fine:

gst-launch-1.0 filesrc location=looping.mp4 ! qtdemux ! h264parse ! avdec_h264 ! progressreport update-freq=1 ! videoconvert ! ximagesink

Ffmpeg is also able to play the file without problems (maybe unsurprisingly since avdec_h264 actually uses libav/ffmpeg under the hood if I’m not mistaken).

• Hardware Platform (Jetson / GPU) - GPU
• DeepStream Version - 6.0.1
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) 495.29.05
• Issue Type( questions, new requirements, bugs) bug

Hi, Could you have a try to use fakesink instead of nveglglesssink?

gst-launch-1.0 filesrc location=looping.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! progressreport update-freq=1 ! fakesink

Could you give me a log when the issue reproduced? Thanks a lot

Hi, replicated this issue on Nvidia T4 with the following pipeline:

  gst-launch-1.0 -e \
    filesrc location=looping.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! nvv4l2h264enc ! h264parse \
    !  splitmuxsink location='output/test1-%02d.mp4' max-size-time=30000000000

After some time videos are created with only two frames looping back and forward.

This is really critical for us because the same issue is happening with the cameras we are connected to.

• Hardware Platform (Jetson / GPU) - Nvidia T4 GPU
• DeepStream Version - 5.1
• TensorRT Version 7.2.2-1+cuda11.1
• NVIDIA GPU Driver Version (valid for GPU only) 470.57.02
• Issue Type( questions, new requirements, bugs) bug

My coworker @p.promny has raised the original issue here: Rtspsrc and nvv4l2decoder are causing jumps between frames in output video, Tesla T4 - #7 by kesong

Ok,We have replicated this issue in our Env with your pipeline.

  gst-launch-1.0 -e \
    filesrc location=looping.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! nvv4l2h264enc ! h264parse \
    !  splitmuxsink location='output/test1-%02d.mp4' max-size-time=30000000000

We are analying this issue now and will let you know in time when we fix it. Thanks

We are debugging this issue, will be back to you when the problem is fixed.

Hi @Fiona.Chen , could this be possibly related to the issue that I have Nvv4l2decoder does not work with certain rtsp video stream ?

It might not be possible.
In this case,the Nvv4l2decoder can work, but not work in the right way cause the special stream. So the video display abnormally.
In your case, the Nvv4l2decoder cannnot work. We need to analyze your issue separately. It maybe the video format(e.g. width, height, codec) that casue the Nvv4l2decoder cannot work.

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

I think we are waiting for @Fiona.Chen to provide some update in this case and it was not solved.

@Fiona.Chen Please update this topic, thanks.

We’ve found the root cause. The patch is under reviewing

The issue is fixed. You can get it in future release.

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