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.