Hello. I’m trying to capture a 10-bit raw image from an IMX274 MIPI CSI-2 camera from Leopard Imaging using Jetson TX2 on a Spacely carrier board from Connect Tech. I’m using JetPack 4.6.3 (L4T 32.7.3).
I tried using the following command:
v4l2-ctl -v width=3840,height=2160,pixelformat=RG10 -c bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=imag.raw -d /dev/video0 --verbose
It displays the following on screen and freezes (the imag.raw file is 0 bytes):
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 3840/2160
Pixel Format : 'RG10' (10-bit Bayer RGRG/GBGB)
Field : None
Bytes per Line : 7680
Size Image : 16588800
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 returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
I see the following error messages using dmesg
:
[ 735.586502] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 735.594936] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 735.643172] tegra-i2c c240000.i2c: no acknowledge from address 0x50
[ 735.665955] arm-smmu 12000000.iommu: Unhandled context fault: iova=0x00000000, fsynr=0x11, cb=15, sid=4(0x4 - VI), pgd=0, pud=0, pmd=0, pte=0
What could be wrong here? Is there otherwise a way of capturing 10 or 12-bit images from IMX274? (preferably using GStreamer).
1 Like
@SimonZhu
Could you help to check this issue.
Thanks
@Oystein1 Can you see video output with Argus software (argus_camera -d 0)? If so, can you try below steps?
- Use Argus software to get the video (assume the default mode is 3840x2160).
- Close argus and try the v4l2 command again.
Yes. I can see video output using GStreamer and nvarguscamerasrc
. For example, I can capture a video using this command line:
gst-launch-1.0 nvarguscamerasrc ! \
"video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160,format=(string)NV12,framerate=(fraction)30/1" ! nvv4l2h264enc \
bitrate=8000000 ! h264parse ! qtmux ! filesink location=test.mp4 -e
I tried to run v4l2-ctl again (after successfully capturing video with nvarguscamerasrc
), but the problem remains the same. (I also tried to shut down nvargus-daemon
, but it didn’t help).
Have you installed the Argus software? Could you run the “argus_camera -d 0” and then try the v4l2-ctl again?
Can you let me know exactly what Argus software you are talking about? Do you have a link to where I can download it for JetPack 4.6.3?
The Argus software can be downloaded from link below or installed from Jetpack directly.
Open a terminal, do
$ sudo apt-get update
$ sudo apt-get install cmake build-essential pkg-config libx11-dev libgtk-3-dev libexpat1-dev libjpeg-dev libgstreamer1.0-dev
Uncompress the zip package, do
$ unzip jetson_multimedia_api_r32.7.3.zip
Under jetson_multimedia_api/argus/cmake, do
$ cmake …
$ make
$ sudo make install
Do "argus_camera -d 0” to get the video.
I have followed your instructions and compiled and installed the Argus software. I am able to successfully view the video using argus_camera -d 0
.
However, when I run v4l2-ctl
(as previously mentioned), it still freezes and the imag.raw file is 0 bytes.
Could you try below command after terminal argus_camera.
v4l2-ctl --stream-mmap -c bypass_mode=0
I tried it (after running argus_camera -d 0
). What is supposed to happen? It just hangs:
$ v4l2-ctl --stream-mmap -c bypass_mode=0
With dmesg
I can see the following:
[ 151.940338] tegra-i2c c240000.i2c: no acknowledge from address 0x1a
[ 151.946833] regmap_util_write_table_8:regmap_util_write_table:-121
[ 151.952860] imx274 35-001a: Error writing mode
How many cameras on your system?
v4l2-ctl --list-devices
I only have one camera. But the CTI Spacely board has 3 MIPI CSI inputs. My LI-IMX274-MIPI-M12 camera is connected to CSI0.
$ v4l2-ctl --list-devices
vi-output, imx274 30-001a (platform:15700000.vi:0):
/dev/video1
vi-output, imx274 32-001a (platform:15700000.vi:2):
/dev/video2
vi-output, imx274 35-001a (platform:15700000.vi:4):
/dev/video0
Maybe you can remove the video0 and video3 to try if your system didn’t connect to CSI2/CSI4
How do you mean remove video0 and video3? What exactly should I do? As I mentioned, argus_camera -d 0
works.
Do you make sure the argus_camera -d 0 map to video0?
I think it does. I tried to pass arguments -d /dev/video0
, -d /dev/video1
and -d /dev/video2
to v4l2-ctl
, but I get the same result.
Do you have any suggestions on how to proceed? By the way, is it possible to get 10 or 12 bit output with nvarguscamerasrc
?
Suppose it could be the sensor REG configuration or device tree problem.
And nvarguscamerasrc only support YUV420 output.