We have the following setup:
- 2x Leopard Imaging LI-IMX390-GMSL2 cameras
- ConnectTech Xavier GMSL Camera Platform (8xGMSL2 to CSI)
- Jetson AGX Xavier DevKit running JetPack 4.4.1 (L4T r32.4.4 along with the relevant ConnectTech BSP)
We have been able to set up a GStreamer pipeline to view the camera feed using the following command:
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvoverlaysink -e
However, when we have tried to do the same thing with v4l2 we have been less lucky. More specifically, when running
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat='RG12' --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw --verbose
the test.raw file remains empty and we get the following output
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 1920/1080
Pixel Format : 'RG12'
Field : None
Bytes per Line : 3840
Size Image : 4147200
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
Index : 0
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 0
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)
Index : 0
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 0
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)
Index : 1
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 1
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)
Index : 2
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 2
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)
Index : 3
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 3
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)
Index : 0
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 0
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)
Index : 0
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 0
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)
Index : 1
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 1
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)
Index : 2
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 2
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)
Index : 3
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 3
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)
The camera and driver information are as follows:
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, imx390 30-001b
Bus info : platform:15c10000.vi:6
Driver version: 4.9.140
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 6: ok)
Format Video Capture:
Width/Height : 1920/1080
Pixel Format : 'RG12'
Field : None
Bytes per Line : 3840
Size Image : 4147200
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Camera Controls
group_hold 0x009a2003 (bool) : default=0 value=0 flags=execute-on-write
hdr_enable 0x009a2004 (intmenu): min=0 max=1 default=0 value=0
gain 0x009a2009 (int64) : min=0 max=300 step=3 default=0 value=0 flags=slider
exposure 0x009a200a (int64) : min=59 max=33333 step=1 default=33333 value=59 flags=slider
frame_rate 0x009a200b (int64) : min=30000000 max=30000000 step=1 default=30000000 value=30000000 flags=slider
exposure_short 0x009a200c (int64) : min=59 max=33333 step=1 default=33333 value=59 flags=slider
bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
height_align 0x009a2066 (int) : min=1 max=16 step=1 default=1 value=1
size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
write_isp_format 0x009a2068 (int) : min=1 max=1 step=1 default=1 value=1
sensor_signal_properties 0x009a2069 (u32) : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
sensor_image_properties 0x009a206a (u32) : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
sensor_control_properties 0x009a206b (u32) : min=0 max=4294967295 step=1 default=0 [30][36] flags=read-only, has-payload
sensor_dv_timings 0x009a206c (u32) : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
low_latency_mode 0x009a206d (bool) : default=0 value=0
preferred_stride 0x009a206e (int) : min=0 max=65535 step=1 default=0 value=0
sensor_modes 0x009a2082 (int) : min=0 max=30 step=1 default=30 value=1 flags=read-only
I’d appreciate any help letting us know why v4l2 is not working and what should be done to fix it.
On a side note, v4l2 shows that the camera has an “hdr_enable” control. Is it possible to somehow enable that through the GStreamer pipeline? I’m really keen on testing out the camera’s HDR capabilities.