How to use Deepstream to convert RGBA to RGB?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
Jetson AGX Orin
• DeepStream Version
deepstream-6.2
• JetPack Version (valid for Jetson only)
JetPack 5.1.1
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

  1. Using the following command, you will get “RGB/BGR Format transformation is not supported by VIC use GPU instead”:
    gst-launch-1.0 -v nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),format=UYVY,width=1920,height=1536,framerate=30/1" ! nvvideoconvert name=start ! "video/x-raw(memory:NVMM),format=NV12" ! nvvideoconvert ! "video/x-raw(memory:NVMM),format=RGB" ! fpsdisplaysink name=rec text-overlay=false video-sink=fakesink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:rec/GstFakeSink:fakesink0: sync = false
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvvideoconvert:start.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:nvvideoconvert1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstFPSDisplaySink:rec.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstFPSDisplaySink:rec/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstFPSDisplaySink:rec.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:nvvideoconvert1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:start.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
ERROR: from element /GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0:
streaming stopped, reason error (-5)
Execution ended after 0:00:00.122440064
Setting pipeline to NULL ...
Freeing pipeline ...
  1. Using the following command, you will see that the CPU is occupied by 100% and there is no output of the image:
    gst-launch-1.0 -v nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),format=UYVY,width=1920,height=1536,framerate=30/1" ! nvvideoconvert name=start ! "video/x-raw(memory:NVMM),format=NV12" ! nvvideoconvert compute-hw=GPU gpu-id=0 nvbuf-memory-type=0 ! "video/x-raw(memory:NVMM),format=RGB" ! fpsdisplaysink name=rec text-overlay=false video-sink=fakesink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:rec/GstFakeSink:fakesink0: sync = false
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvvideoconvert:start.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:nvvideoconvert1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstFPSDisplaySink:rec.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstFPSDisplaySink:rec/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstFPSDisplaySink:rec.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:nvvideoconvert1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:start.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:08.005417920
Setting pipeline to NULL ...

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Hi, @meix The two pipelines you post here are just the same, why it gave different results in “1” and “2”? What is the difference?

Sorry, I wrote the wrong pipelines. I have corrected the incorrect part in the main post:
pipelines “1” is :

gst-launch-1.0 -v nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),format=UYVY,width=1920,height=1536,framerate=30/1" ! nvvideoconvert name=start ! "video/x-raw(memory:NVMM),format=NV12" ! nvvideoconvert ! "video/x-raw(memory:NVMM),format=RGB" ! fpsdisplaysink name=rec text-overlay=false video-sink=fakesink sync=false

and result:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:rec/GstFakeSink:fakesink0: sync = false
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvvideoconvert:start.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:nvvideoconvert1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstFPSDisplaySink:rec.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstFPSDisplaySink:rec/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstFPSDisplaySink:rec.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)RGB, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:nvvideoconvert1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)NV12, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:start.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1536, format=(string)UYVY, interlace-mode=(string)progressive, framerate=(fraction)30/1
ERROR: from element /GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0:
streaming stopped, reason error (-5)
Execution ended after 0:00:00.122440064
Setting pipeline to NULL ...
Freeing pipeline ...

I’ve tried with the same pipeline in our AGX Orin board. The camera is a little different, it is 1920x1080@60fps.

The CPU loading is very low.

I have identified the issue: when the problem occurred, we guided the system from an external SSD.
When we switched back to booting the system from EMMC, CPU usage returned to normal levels

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