gst-0.10 nvvidconv sink cap problem

Jetson TK1 R21.5

“L4T_Jetson_TK1_Multimedia_User_Guide.R21.5_2016July06.pdf” says the gst-0.10 version nvvidconv supports sink “I420, YUY2, UYVY, YVYU, Y444, and NV12” which is verified by gst-inspect-0.10 nvvidconv:

ubuntu@tegra-ubuntu:~/w$ gst-inspect-0.10 nvvidconv
Factory Details:
  Long name:	NvVidConv Plugin
  Class:	Filter/Converter/Video
  Description:	Converts Video from Nv to raw/rgb formats & vice versa
  Author(s):	amit/anaken <<apandya@nvidia.com>>
  Rank:		primary (256)

Plugin Details:
  Name:			nvvidconv
  Description:		nvvidconv plugin
  Filename:		/usr/lib/arm-linux-gnueabihf/gstreamer-0.10/libgstnvvidconv.so
  Version:		0.10.0
  License:		Proprietary
  Source module:	gstreamer-nvvconv-plug-ins
  Binary package:	GStreamer nvvconv Plug-ins
  Origin URL:		http://nvidia.com/

GObject
 +----GstObject
       +----GstElement
             +----GstBaseTransform
                   +----GstVideoFilter
                         +----GstNvVConv

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw-yuv
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
                 format: { I420, YUY2, UYVY, YVYU }
      video/x-raw-rgb
                    bpp: 32
                  depth: 32
             endianness: 4321
               red_mask: 65280
             green_mask: 16711680
              blue_mask: -16777216
             alpha_mask: 255
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw-rgb
                    bpp: 32
                  depth: 32
             endianness: 4321
               red_mask: -16777216
             green_mask: 16711680
              blue_mask: 65280
             alpha_mask: 255
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw-rgb
                    bpp: 32
                  depth: 24
             endianness: 4321
               red_mask: 65280
             green_mask: 16711680
              blue_mask: -16777216
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw-rgb
                    bpp: 32
                  depth: 24
             endianness: 4321
               red_mask: -16777216
             green_mask: 16711680
              blue_mask: 65280
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw-gray
                    bpp: 8
                  depth: 8
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-nv-yuv
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
                 format: { I420, NV12 }
      video/x-nvrm-yuv
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
                 format: { I420, NV12 }

  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw-yuv
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
                 format: { I420, YV12, YUY2, UYVY, YVYU, Y444, NV12 }
      video/x-raw-gray
                    bpp: 8
                  depth: 8
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-nv-yuv
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
                 format: { I420, NV12 }
      video/x-nvrm-yuv
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
                 format: { I420, NV12 }


Element Flags:
  no flags set

Element Implementation:
  Has change_state() function: 0xb6f88474
  Has custom save_thyself() function: gst_element_save_thyself
  Has custom restore_thyself() function: gst_element_restore_thyself

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

Pads:
  SRC: 'src'
    Implementation:
      Has getrangefunc(): gst_base_transform_getrange
      Has custom eventfunc(): gst_base_transform_src_event
      Has custom queryfunc(): gst_base_transform_query
        Provides query types:
		(1):	position (Current position)
      Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
      Has getcapsfunc(): gst_base_transform_getcaps
      Has acceptcapsfunc(): gst_base_transform_acceptcaps
    Pad Template: 'src'
  SINK: 'sink'
    Implementation:
      Has chainfunc(): gst_base_transform_chain
      Has custom eventfunc(): gst_base_transform_sink_event
      Has custom queryfunc(): gst_base_transform_query
        Provides query types:
		(1):	position (Current position)
      Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
      Has bufferallocfunc(): gst_base_transform_buffer_alloc
      Has getcapsfunc(): gst_base_transform_getcaps
      Has setcapsfunc(): gst_base_transform_setcaps
      Has acceptcapsfunc(): gst_base_transform_acceptcaps
    Pad Template: 'sink'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "nvvconv0"
  qos                 : Handle Quality-of-Service events
                        flags: readable, writable
                        Boolean. Default: true
  silent              : Produce verbose output
                        flags: readable, writable
                        Boolean. Default: false
ubuntu@tegra-ubuntu:~/w$

That means gst-0.10 supports more formats compared to gst-1.0 which has only options of "I420, UYVY, NV12, GRAY8 ".

However, I have never realized format converting from any of “I420, YV12, YUY2, UYVY, YVYU, Y444, NV12” to “I420 or NV12” with scaling at the same time.

The following script fails:

GST_DEBUG=3 gst-launch-0.10 videotestsrc ! 'video/x-raw-yuv, width=(int)3840, height=(int)2160, format=I420' ! tee name=t ! queue ! nvvidconv ! 'video/x-nv-yuv, width=(int)1280, height=(int)720' ! nv_omx_h264enc ! 'video/x-h264, stream-format=(string)byte-stream, bitrate=9000000' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=10.10.80.7 port=5000 sync=true async=false t. ! queue ! nvvidconv ! 'video/x-nv-yuv, width=(int)1920, height=(int)1080' ! nv_omx_h264enc ! 'video/x-h264, stream-format=(string)byte-stream, bitrate=9000000' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=10.10.80.7 port=5002 sync=true

and fails for any replacement to format=I420 with any of "YV12, YUY2, UYVY, YVYU, Y444, NV12 ".

Whereas, the following script runs well:

GST_DEBUG=3 gst-launch-0.10 videotestsrc ! 'video/x-raw-yuv, width=(int)3840, height=(int)2160' ! tee name=t ! queue ! nvvidconv ! 'video/x-nv-yuv, width=(int)1280, height=(int)720' ! nv_omx_h264enc ! 'video/x-h264, stream-format=(string)byte-stream, bitrate=9000000' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=10.10.80.7 port=5000 sync=true async=false t. ! queue ! nvvidconv ! 'video/x-nv-yuv, width=(int)1920, height=(int)1080' ! nv_omx_h264enc ! 'video/x-h264, stream-format=(string)byte-stream, bitrate=9000000' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=10.10.80.7 port=5002 sync=true

The only difference is no “format=I420”, i.e. not specifying format for nnvidconv input.

I have no idea about how to get the real caps / limitations of nvidia proprietary gst plugins. Somebody have any suggestions?

Solution:
format=(fourcc)UYVY to replace format=UYVY

quite strange, seems there is no strict spelling.