Buffer transform failed for nvvideoconvert for num(input_channels) != num(output_channels) on Jetson

• Hardware Platform: Jetson
• DeepStream Version 6.1.1 Docker
• JetPack Version 5.0.1
• Issue Type: Bug

Bug in nvvideoconvert on Jetson for nvvideoconvert for num(input_channels) != num(output_channels)

• How to reproduce the issue?

Run deepstream as docker
docker run -it --rm nvcr.io/nvidia/deepstream-l4t:6.1.1-base /bin/bash

gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080 ! nvvideoconvert ! video/x-raw,format=RGB ! fakesink

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.178357712    59 0xaaab1318baa0 ERROR         nvvideoconvert gstnvvideoconvert.c:3750:gst_nvvideoconvert_transform: buffer transform failed
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

With highlight of course on the critical error:
0:00:00.178357712 59 0xaaab1318baa0 ERROR nvvideoconvert gstnvvideoconvert.c:3750:gst_nvvideoconvert_transform: buffer transform failed

• Additional info
The following pipelines have the same issue:
NV12 → BGR breaks
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080 ! nvvideoconvert ! video/x-raw,format=BGR ! fakesink
RGBA → RGB breaks
gst-launch-1.0 videotestsrc ! video/x-raw,format=RGBA,width=1920,height=1080 ! nvvideoconvert ! video/x-raw,format=RGB ! fakesink
The following pipelines don’ have that issue:
NV12 → RGBA works
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080 ! nvvideoconvert ! video/x-raw,format=RGBA ! fakesink
NV12 → RGBx works
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080 ! nvvideoconvert ! video/x-raw,format=RGBx ! fakesink
NV12 → GRAY8 works
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080 ! nvvideoconvert ! video/x-raw,format=GRAY8 ! fakesink

• Apparent issue
It looks like the error occurs whenever the amount of channels is different between input and output. For example RGBA → RGB breaks, but also RGB → RGBA breaks as well.

• Current workaround
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080 ! nvvideoconvert ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=RGB ! fakesink
With an additional step involving CPU transform it works.

1 Like

Issue does not occur on dGPU Deepstream, it works flawlessly.

Could you try to set the ! nvvideoconvert compute-hw=1 ! para to the nvvideoconvert?

Initially had an issue where pipeline gets stuck. But now it seems to be working.

gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080 ! nvvideoconvert compute-hw=1 ! video/x-raw,format=RGB ! fakesink

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:05.390719396
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Is using compute-hw = 1 recommended for Jetson devices? Default is using the VIC.

Yes. For deepstream 6.1.1,We recommended this option for Jetson devices.

1 Like

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