During the development of the imx415 camera on Jetson version 6.1, I can capture frame data normally, but cannot perform real-time video preview.
查看摄像头支持的图像格式和分辨率
v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'GB12' (12-bit Bayer GBGB/RGRG)
Size: Discrete 3864x2192
Interval: Discrete 0.067s (15.000 fps)
查看设备信息
v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0
vi-output, iimx415 10-0037 (platform:tegra-capture-vi:0):
/dev/video1
vi-output, iimx415 9-0037 (platform:tegra-capture-vi:2):
/dev/video0
查看设备格式
v4l2-ctl -d /dev/video0 --get-fmt-video
Format Video Capture:
Width/Height : 3864/2192
Pixel Format : 'GB12' (12-bit Bayer GBGB/RGRG)
Field : None
Bytes per Line : 7728
Size Image : 16939776
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
查看 vi、csi、imx415 端口绑定结果
sudo media-ctl -p -d /dev/media0
Media controller API version 5.15.148
Media device information
------------------------
driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.15.148
Device topology
- entity 1: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "iimx415 10-0037":0 [ENABLED]
pad1: Source
-> "vi-output, iimx415 10-0037":0 [ENABLED]
- entity 4: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
<- "iimx415 9-0037":0 [ENABLED]
pad1: Source
-> "vi-output, iimx415 9-0037":0 [ENABLED]
- entity 7: iimx415 9-0037 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev2
pad0: Source
[fmt:SGBRG12_1X12/3864x2192 field:none colorspace:srgb]
-> "13e00000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 9: vi-output, iimx415 9-0037 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "13e00000.host1x:nvcsi@15a00000-":1 [ENABLED]
- entity 23: iimx415 10-0037 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev3
pad0: Source
[fmt:SGBRG12_1X12/3864x2192 field:none colorspace:srgb]
-> "13e00000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 25: vi-output, iimx415 10-0037 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video1
pad0: Sink
<- "13e00000.host1x:nvcsi@15a00000-":1 [ENABLED]
When I enter the following real-time preview commands, the displayed screens are all black. And accompanied by these log information
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! nvvidconv ! nv3dsink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3864 x 2192 FR = 16.000000 fps Duration = 62500000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
ARGUS_ERROR: Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute: 946 Frame Rate specified is greater than supported
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3864 H = 2192
seconds to Run = 0
Frame Rate = 16.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
ARGUS_ERROR: Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute: 1208 InvalidState.
GST_ARGUS: Cleaning up
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0:
streaming stopped, reason error (-5)
Execution ended after 0:00:01.018388005
Setting pipeline to NULL ...
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:734 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:245 (propagating)
Freeing pipeline ...
st-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=3864,height=2192,format=NV12,framerate=15/1' ! nvvidconv ! nv3dsink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3864 x 2192 FR = 16.000000 fps Duration = 62500000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3864 H = 2192
seconds to Run = 0
Frame Rate = 16.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:734 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:245 (propagating)
Redistribute latency...
WARNING: from element /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0: Pipeline construction is invalid, please add queues.
Additional debug info:
../libs/gst/base/gstbasesink.c(1249): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0:
Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
WARNING: from element /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0: Pipeline construction is invalid, please add queues.
Additional debug info:
../libs/gst/base/gstbasesink.c(1249): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0:
Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
Got EOS from element "pipeline0".
Execution ended after 0:00:04.017392542
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
GST_ARGUS: Done Success
Freeing pipeline ...
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=3864,height=2192,format=NV12,framerate=15/1' ! nvvidconv ! nv3dsink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3864 x 2192 FR = 16.000000 fps Duration = 62500000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3864 H = 2192
seconds to Run = 0
Frame Rate = 16.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:734 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:245 (propagating)
Redistribute latency...
WARNING: from element /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0: Pipeline construction is invalid, please add queues.
Additional debug info:
../libs/gst/base/gstbasesink.c(1249): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0:
Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
WARNING: from element /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0: Pipeline construction is invalid, please add queues.
Additional debug info:
../libs/gst/base/gstbasesink.c(1249): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0:
Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
Got EOS from element "pipeline0".
Execution ended after 0:00:04.012720925
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
GST_ARGUS: Done Success
Freeing pipeline ...
However, when using frame data capture, the data can be obtained normally.And it can also save pictures in raw format, which open normally.
root@pcai-desktop:/home/pcai/pkg_orin_nx_jp6.1_v7.4.1# v4l2-ctl -d /dev/video0 -V --set-ctrl bypass_mode=0 --stream-mmap
Format Video Capture:
Width/Height : 3864/2192
Pixel Format : 'GB12' (12-bit Bayer GBGB/RGRG)
Field : None
Bytes per Line : 7728
Size Image : 16939776
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
<<<<<<<<<<<<<<<<< 15.00 fps
<<<<<<<<<<<<<<< 15.00 fps
<<<<<<<<<<<<<<< 15.00 fps
<<<<<<<<<<<<<<< 15.00 fps
<<<<<<<<<<<<<<< 15.00 fps
This is the LOG information captured when the screen is black.
dmesg.txt (66.3 KB)
trace.txt (21.7 KB)
source file:
imx415.c.txt (17.9 KB)
imx415-dtsi.txt (11.8 KB)
imx415-overlay.txt (2.9 KB)