TX2 Onboard Camera - gst-launch not working

Hi,

I am trying to use the TX2 onboard camera with opencv using the pipeline:

“nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420,
framerate=(fraction)24/1 ! nvvidconv flip-method=6 ! video/x-raw, format=(string)I420 !
videoconvert ! video/x-raw, format=(string)BGR ! appsink”

But I get the below error while running the program or by directly running the gstreamer in terminal,

nvidia@tegra-ubuntu:~$ gst-launch-1.0 nvcamerasrc ! ‘video/x-raw(memory:NVMM), width=640, height=480, framerate=30/1, format=NV12’ ! nvvidconv flip-method=2 ! nvoverlaysink -e

Setting pipeline to PAUSED …

To verify the camera drivers are functional, I tried running nvgstcapture-1.0 in terminal and the camera works fine.

It would be helpful if someone could help me understand what could cause pipeline to be paused.

Any help to resolve this problem would be appreciated.
Thanks in advance

hello jovy,

since camera drivers are functional, it may be the issue with gst plugins.
could you please enable the nvcamera-daemon manually to enable background logs to gather more details.
for example,

sudo /usr/sbin/nvcamera-daemon

Hello JerryChang,

Thank you for the suggestion, I indeed tried that and I get the below error

OFParserGetVirtualDevice: virtual device driver node not found in proc device-tree
OFParserGetVirtualDevice: virtual device driver node not found in proc device-tree

LoadOverridesFile: looking for override file [/Calib/camera_override.isp]
1/16LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16LoadOverridesFile: looking for override file [/data/nvcam/settings/e3326_front_P5V27C.isp] 6/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/e3326_front_P5V27C.isp] 7/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/e3326_front_P5V27C.isp] 8/16---- imager: No override file found. ----

Since I am not familiar with internals of nvcam, what could this error mean?

hello jovy,

according to you deamon messages, there’s no failures.
couple of questions need your confirmation. thanks

  1. may I know which JetPack release you’re working with?
  2. which OpenCV version you’re used?

Hello,
I am trying to use the IMX219 sensor with TX2 on L4T 28.1
This is the backgroung logs for nvcamera daemon:

NvPclHwGetModuleList: No module data found
PCLHW_DTParser
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16LoadOverridesFile: looking for override file [/data/nvcam/settings/e3326_bottom_P5V27C.isp] 6/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/e3326_bottom_P5V27C.isp] 7/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/e3326_bottom_P5V27C.isp] 8/16---- imager: No override file found. ----
(NvOdmDevice) Error ModuleNotPresent: V4L2Device not available (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function findDevice(), line 231)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function initialize(), line 54)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 97)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 596)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 781)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 276)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 439)
Segmentation fault (core dumped)

I’m not able to debug what exactly this error is

hello rm95,

had you verify camera function yet? your failure message shows there’s no available camera device.
couple of testing you may try.

  1. could you please check your sysnode generated correctly,
    for example, /dev/video*
  2. could you please have an alternative way to access camera with v4l2-ctl,
    for example,
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

I was able to fix this. There was a mismatch between the device name in the device tree file.

However, my video quality is very poor, and I am getting a MIPI cal timeout error, even when I use the v4l2-ctl command