- How should I enable camera_ar0234 use v4l2-ctl to get stream?
- How should I adjust the ISP when using a stream enabled by v4l2?
*** Please note that this reply is generated by LLM automatically ***
To enable the camera AR0234 and use v4l2-ctl to get a stream, you need to follow these steps:
-
Verify camera support: The Jetson AGX Orin series supports RAW Bayer capture data, and the
nvgstcaptureapplication is validated for SDR modes for various sensors. However, it’s essential to verify that the AR0234 camera is supported by the Jetson AGX Orin series. -
Use V4L2 IOCTL: To capture from a Bayer sensor with the format 1080p/30/RG10, you can use the following command:
$ v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=ar0234.raw
This command sets the video format to 1080p with a pixel format of RG10, enables streaming, and captures one frame to a file named `ar0234.raw`.
3. **ISP Configuration**: When using `v4l2-ctl` to capture a stream, you are not using the Jetson ISP (CSI Interface). Instead, you are using the V4L2 API, which does not utilize the ISP. However, if you want to adjust the ISP settings, you can use the ISP configuration files provided in the Camera Core release package. These files are specific to reference sensors, and you may need to modify them to suit your camera module.
4. **ISP Bypass Mode**: If your camera module supports ISP bypass mode, you can use the V4L2 API to capture a stream while bypassing the ISP. This is useful when you want to process the raw Bayer data without any ISP processing.
5. **Additional ISP Support**: If you need additional ISP support for your camera module, you may need to work with third-party partners who provide ISP support for specific camera modules.
In comparison to using `libargus` and GStreamer (GST-nvarguscamerasrc), which are the preferred paths to access the camera when using the Jetson ISP (CSI Interface), using `v4l2-ctl` provides a more direct way to capture a stream without utilizing the ISP. However, this approach may require more manual configuration and processing of the raw Bayer data.
Here's a summary of the camera APIs available for each camera configuration:
| Camera Configuration | Camera API |
| --- | --- |
| Use Jetson ISP (CSI Interface) | libargus and GStreamer (GST-nvarguscamerasrc) |
| Does not use Jetson ISP (CSI interface) | V4L2 |
| USB (UVC) (USB interface) | V4L2 |
In your case, since you are using `v4l2-ctl` to capture a stream, you are using the V4L2 API, which does not utilize the ISP. If you need to adjust the ISP settings, you can use the ISP configuration files provided in the Camera Core release package or work with third-party partners who provide ISP support for specific camera modules.
*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***
Hello @james.hsu2,
Let me answer your questions 1 by 1:
- First you will need to make sure the DTB has a device node enabled for the AR0234. You can do this by manually modifying the DTB or trying with the Jetson IO tool.
- If you capture with v4l2-ctl I think you will be skipping the ISP. Why not capturing with argus instead?
regards,
Andrew
Embedded Software Engineer at ProventusNova
We are using argus_camera and it works fine. We also want to test whether we can use libargus or other methods to adjust the ISP when using a stream opened with v4l2.
BR,
James
Thanks for getting back with further details.
Adjusting ISP when capturing with bare v4l2 is a very interesting proposal. Although I think it might not possible, you can explore the --set-ctrl bypass_mode=0 control and see if you can start by pushing buffers through the ISP.
May I ask why do you want to achieve this?
best regards,
Andrew
Embedded Software Engineer at ProventusNova
Am I using the correct test commands?
nvidia@NAC1k-NovaOrin:~$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=BA10 --set-ctrl bypass_mode=0 --stream-mmap
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
We want to know more about v4l2 control methods and commands so that other projects can use them.
BR,
James
You can check by v4l2-ctl –all to check the supported controls.
Thanks
We will be testing the v4l2 commands.
Also, following my other discussion , we tried increasing the scheduling priority of argus_camera, like “chrt -f 50 ./argus_camera“ , but ultimately encountered the same problem of failing to acquire the stream.
If we got like (fusa) errors , how should we modify the argus_camera API to increase the retry counters and timeout?
BR,
James
hello james.hsu2,
it’s device tree property set_mode_delay_ms to configure the waiting time of 1st frame after capture starts, the unit is in milliseconds.
additionally, you may running with Infinite Timeout Support enabled which overrides all timeouts throughout the driver.
Hi @JerryChang
How do I configure set_mode_delay_ms in detail? Is it modified in which file, or is it set via the command line?
BR,
James
hello james.hsu2,
please refer to developer guide, Device Properties.
Hi @JerryChang
I mean that have parameters that can be adjusted for the argus_camera app, such as the recapture streaming counter and extend the timeout .
BR
James
hello james.hsu2,
there’s default timeout value (2500ms), you may add device tree property set_mode_delay_ms into sensor mode to configure higher waiting time.
or.. please enable Infinite Timeout Support, which overrides all timeouts throughout the driver.
Hi @JerryChang
I’m testing enable Infinite Timeout Support but still encountering the problem of not being able to capture the stream. Are there any other ways to try to get the stream again under full load testing?
BR,
James
Do test gstreamer or argus_camera?
Could you verify by argus_camera for the infinite timeout mode.
Thanks
Hi @ShaneCCC
I used argus_camera testing.
nvidia@NAC1k-NovaOrin:~$ sudo cat /proc/$(pidof nvargus-daemon)/environ | tr ‘\0’ ‘\n’ | grep enableCamInfiniteTimeout
enableCamInfiniteTimeout=1
BR,
James
Infinite mode unable streaming from the sensor could be the sensor output problem.
May get the trace log to verify,
Hi @ShaneCCC
Is “ journalctl -b -u nvargus-daemon “ being used to collect logs? How can I verify that it’s a sensor output problem?
BR,
James
If running single camera you can check the trace log while freezed.
Thanks
Hi @ShaneCCC
Are there any methods or commands to find out the camera’s data stream and status?
BR,
James