Error using nvv4l2camerasrc instead of v4l2src

Hello, I am trying to use nvv4l2camerasrc instead of v4l2src to get GRAY8 data from camera for further processing. As far I understand this would result in one less copy from CPU to NVMM buffer. However I am not able to get pipeline with nvv4l2camerasrc running.

Camera information:

$ v4l2-ctl -d /dev/video0 --list-formats-ext
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'GREY'
	Name        : 8-bit Greyscale
		Size: Discrete 1024x768
			Interval: Discrete 0.033s (30.000 fps)

Working v4l2src pipeline

gst-launch-1.0 \
  v4l2src device=/dev/video0 \
  ! 'video/x-raw,format=GRAY8,width=1024,height=768' \
  ! nvvidconv \
  ! 'video/x-raw(memory:NVMM)' \
  ! nv3dsink sync=false

Attempted nvv4l2camerasrc pipeline:

gst-launch-1.0 \
  nvv4l2camerasrc device=/dev/video0 \
  ! 'video/x-raw(memory:NVMM),format=GRAY8,width=1024,height=768' \
  ! nvvidconv \
  ! 'video/x-raw(memory:NVMM)' \
  ! nv3dsink sync=false

Error message:

WARNING: erroneous pipeline: could not link nvv4l2camerasrc0 to nvvconv0, nvv4l2camerasrc0 can’t handle caps video/x-raw(memory:NVMM), format=(string)GRAY8, width=(int)1024, height=(int)768

Looks like nvv4l2camerasrc only support YUV format.

nvidia@tegra-ubuntu:~$ gst-inspect-1.0 nvv4l2camerasrc
Factory Details:
  Rank                     primary (256)
  Long-name                NvV4l2CameraSrc
  Klass                    Video/Capture
  Description              Nvidia V4l2 Camera Source
  Author                   Ashwin Deshpande <>

Plugin Details:
  Name                     nvv4l2camerasrc
  Description              Nvidia v4l2 Source Component
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/
  Version                  1.14.5
  License                  Proprietary
  Source module            nvv4l2camerasrc
  Binary package           NvV4l2CameraSrc
  Origin URL     


Pad Templates:
  SRC template: 'src'
    Availability: Always
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
                 format: { (string)UYVY }
         interlace-mode: { (string)progressive, (string)interlaced }
              framerate: [ 0/1, 2147483647/1 ]

1 Like

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