RTSP stream decoding using v4l2h264dec on BBAI-64

Hello Devs,

I have been trying to run this gstreamer pipeline on BBAI-64. The pipeline works fine with avdec_h264 however, it doesn’t with v4l2h264dec

GST_DEBUG="v4l2*:8" gst-launch-1.0 rtspsrc location=rtsp://192.168.0.10:8554/st1 latency=1000 buffer-mode=none ! rtph264depay ! h264parse ! queue ! v4l2h264dec capture-io-mode=4 ! videoconvert ! fakevideosink

The same pipeline works fine with a file source

GST_DEBUG="v4l2*:8" gst-launch-1.0 filesrc location=video1_1280_768.h264 ! h264parse ! queue ! v4l2h264dec capture-io-mode=4 ! videoconvert ! video/x-raw,format=NV12 ! fakevideosink

I have tried different capture modes as well different latency. It gets stuck at Redistribute latency...

root@j721e-sk:/opt/edgeai-gst-apps# GST_DEBUG="v4l2*:8" gst-launch-1.0 rtspsrc location=rtsp://192.168.0.10:8554/st1 latency=1000 buffer-mode=none ! rtph264depay ! h264parse ! queue ! avdec_h264 ! videoconvert ! fakevideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Pipeline is PREROLLED ...
Prerolled, waiting for progress to finish...
Progress: (connect) Connecting to rtsp://192.168.0.10:8554/st1
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (request) SETUP stream 1
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Redistribute latency...
Redistribute latency...
Redistribute latency...
Progress: (request) Sending PLAY request
Redistribute latency...
Progress: (request) Sent PLAY request
Redistribute latency...
Redistribute latency...
Redistribute latency...
Redistribute latency...
Redistribute latency...
Redistribute latency...
Redistribute latency...
Redistribute latency...

I am using TI-SDK 10.0 (Thanks to @jiance.zahng ). However, I had a similar problem with SDK 8.6 and 8.2 where v4l2h264dec was not able to allocate memory.

Please guide if you have any idea how this can be rolled.

Thank you

Best
Shubham

Note: I am also attaching the detailed logs
rtsp_v4l2h264dec_logs.txt (198.8 KB)