Using gstreamer element nvvidconv for convert to I420 format

Hi

Trying to create gstreamer pipe that use gstreamer pluging from Deepstream SDK 2.0 for Tesla

When using pipe like this it’s ok

GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsp://172.31.29.17:3000/stream ! rtph264depay ! h264parse ! queue ! nvdec_h264 ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! 'video/x-raw' ! videoconvert ! videoscale ! videorate ! 'video/x-raw,format=(string)NV21' !  fakesink dump=1

but It’s not work while try to use like this:

GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsp://172.31.29.17:3000/stream ! rtph264depay ! h264parse ! queue ! nvdec_h264 ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! 'video/x-raw' ! videoconvert ! videoscale ! videorate ! 'video/x-raw,format=(string)I420' !  fakesink dump=1

it also not working while i try to use

GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsp://172.31.29.17:3000/stream ! rtph264depay ! h264parse ! queue ! nvdec_h264 ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! 'video/x-raw,format=(string)I420' !  fakesink dump=1

If i listen to gst-launch-1.0 nvvidconv It seems like nvvidconv should convert to I420.

Thanks

“gst-inspect-1.0 nvvidconv” say that convert to I420 is supported but seems like is don’t. Somebody tried to use nvvidconv to convert RAW video and memcpy it?

ubuntu@ip-172-31-29-17:~$ gst-inspect-1.0 nvvidconv
Factory Details:
  Rank                     none (0)
  Long-name                nvvidconv
  Klass                    nvvidconv
  Description              Gstreamer NVVIDCONV Element
  Author                   Tushar Khinvasara <<tkhinvasara@nvidia.com>>

Plugin Details:
  Name                     nvvidconv
  Description              Gstreamer plugin for video format conversion
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvvidconv.so
  Version                  1.8.2
  License                  Proprietary
  Source module            nvvidconv
  Binary package           GStreamer NV Video Converter Plugin
  Origin URL               http://nvidia.com/

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBaseTransform
                         +----Gstnvvidconv

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw(memory:NVMM)
                 format: { NV12, I420, BGRx, RGBA, RGB, BGR }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw
                 format: { NV12, I420, BGRx, RGBA, RGB, BGR }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw(memory:NVMM)
                 format: { NV12, I420, BGRx, RGBA, BGR, RGB }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw
                 format: { NV12, I420, BGRx, RGBA, BGR, RGB }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

Element Flags:
  no flags set

Element Implementation:
  Has change_state() function: gst_element_change_state_func

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
  SINK: 'sink'
    Pad Template: 'sink'
  SRC: 'src'
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "nvvidconv0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  qos                 : Handle Quality-of-Service events
                        flags: readable, writable
                        Boolean. Default: false
  num-buffers-in-batch: Number of Buffers in Batch Size
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 1 - 4294967295 Default: 1
  gpu-id              : Set GPU Device ID
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 0
  silent              : Produce verbose output ?
                        flags: readable, writable
                        Boolean. Default: false
ubuntu@ip-172-31-29-17:~$ GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsp://172.31.29.17:3000/stream ! rtph264depay ! h264parse ! queue ! nvdec_h264 ! nvvidconv ! 'video/x-raw,format=I420'  !  fakesink dump=1
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://172.31.29.17:3000/stream
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
0:00:00.248993147 22451 0x7fedf002f8f0 FIXME                default gstutils.c:3766:gst_pad_create_stream_id_internal:<fakesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Progress: (request) Sending PLAY request
0:00:00.249005419 22451 0x7fedf002f8a0 FIXME                default gstutils.c:3766:gst_pad_create_stream_id_internal:<fakesrc1:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Progress: (request) Sent PLAY request
0:00:00.301806735 22451      0x11bb680 FIXME           videodecoder gstvideodecoder.c:946:gst_video_decoder_drain_out:<nvcuvidh264dec0> Sub-class should implement drain()
0:00:00.323895584 22451 0x7fedf002f800 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<udpsrc4> error: Internal data flow error.
0:00:00.323920818 22451 0x7fedf002f800 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<udpsrc4> error: streaming task paused, reason not-linked (-1)
nvvidconv0: NOT SUPPROTED CONVERSION ... Use videoconvert ... EXITING...
nvvidconv0: NOT SUPPROTED CONVERSION ... Use videoconvert ... EXITING...
nvvidconv0: NOT SUPPROTED CONVERSION ... Use videoconvert ... EXITING...
nvvidconv0: NOT SUPPROTED CONVERSION ... Use videoconvert ... EXITING...

nvvidconv in DS2.0 does not support conversion to I420. I will report this issue.

Are you have nvvidconv element (not from DS2.0) that include conversion to I420?

You can try cuda NPP conversion.