Multiple outputStreams with a multi camera captureSession

Hallo,

I have one captureSession, which should manage up to three cameras and supply two frame consumers.
One consumer renders a Preview to the screen and the other save the current frame(s) as jpg.

As long as only one camera is connected everything works fine. Both outputStreams to both consumers (one stream for each consumer) get the frames and the consumers can process them correctly.

Also if i have one consumer with multiple cameras connected (one consumer manages multiple streams), everything works fine. The consumer can read the frames from all streams and process them.

However if I activate two outputStreams on two cameras (this means 4 stream in total and one consumer gets one stream from each camera), I don’t get any frame at all on any outputStream.

Is this an inherent limitation of libargus or is there something else I have to consider to get frames in this scenario?

Suppose shouldn’t have any of this kind of limitation.
Like you can simulate by argus_camera --device=0 and argus_camera --device=1 and both of them have output JPEG output stream.

I also don’t have any problems if i use two cameras, with one output stream for each camera, at the same time.

However, if I want to use two cameras with two output stream for each camera I don’t get any frames delivered.

When you run two argus_camera with JPEG encoder that’s 4 output steam. Two preview streams and two JPEG streams.

When I start the argus_camera with camera 0 it seems to work. If I switch to camera 1 I get the following error message:

Executing Argus Sample Application (argus_camera)
Argus Version: 0.98.3 (multi-process)
Error generated. /usr/src/jetson_multimedia_api/argus/samples/utils/Validator.h, checkValid:670 Value '21.8' out of range. Valid values need to be in the range [3.40282e+38, 21.8].
Error generated. /usr/src/jetson_multimedia_api/argus/samples/utils/Value.h, set:94 (propagating)
Error generated. /usr/src/jetson_multimedia_api/argus/apps/camera/modules/Dispatcher.cpp, onSensorModeIndexChanged:1176 (propagating)
Error generated. /usr/src/jetson_multimedia_api/argus/samples/utils/Observed.cpp, notifyObservers:92 (propagating)
Error generated. /usr/src/jetson_multimedia_api/argus/samples/utils/Value.h, set:98 (propagating)
Error generated. /usr/src/jetson_multimedia_api/argus/apps/camera/modules/Dispatcher.cpp, onDeviceIndexChanged:1122 (propagating)
Error generated. /usr/src/jetson_multimedia_api/argus/samples/utils/Observed.cpp, notifyObservers:92 (propagating)
Error generated. /usr/src/jetson_multimedia_api/argus/samples/utils/Value.h, set:98 (propagating)
Error generated. /usr/src/jetson_multimedia_api/argus/samples/utils/Value.h, setFromString:112 (propagating)
Error generated. /usr/src/jetson_multimedia_api/argus/samples/utils/Options.h, valueCallback:320 (propagating)
Error generated. /usr/src/jetson_multimedia_api/argus/samples/utils/Options.cpp, parse:246 (propagating)
Error generated. /usr/src/jetson_multimedia_api/argus/apps/camera/ui/common/App.cpp, run:88 (propagating)

However the MultiSession seems to work normally.

Is there any progress on this?

It could be your second sensor gain/exposure/frame rate report incorrect.

I have two identical cameras connected. Both use the same diver and the same settings. I don’t understand why camera 0 works and camera1 dosn’t.

What’s your version?
Did you get the same version of MMAPI sample code?

I am using Jetpack version 4.6.2 and L4T 32.7.2 .
I used the MMAPI samples witch where installed with the API via the SDK manager.
The Argus camera API is the version 0.98 (from the RELEASE.TXT file)

Does any gain/frame rate range is in the range [3.40282e+38, 21.8]?

I don’t know where the 3.40282e+38 are taken from, the supported range should be [0, 21.8].

However, if I use my application I can access both cameras (also simultaneously), if I only use one Stream for each camera.
But I still can’t connect two streams to two (or three) cameras each.

Is there any progress on this?

Could you get the source by below to try.

sudo apt list -a nvidia-l4t-jetson-multimedia-api
sudo apt install nvidia-l4t-jetson-multimedia-api=32.x.x

I currently have the following version installed:

nvidia-l4t-jetson-multimedia-api/stable,now 32.7.2-20220417024839 arm64 [installed]

Have try this attached binary on your Jetson platform to confirm.

argus_camera_32_7_2 (2.4 MB)

When I run the provided app I get the following error messages:

Executing Argus Sample Application (argus_camera_32_7_2)
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
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 1. (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 593)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 305)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 471)
Acquiring SCF Camera device source via index 0 has failed. ---- imager: No override file found. ----
NvCameraIspConfigFileLoad: type = 0x5 Config file "common.cfg" Line 460: Error: Bad parameter: "ae.CameraEfficiency=0.1508"
NvCameraIspConfigFileLoad: type = 0x5 Config file "common.cfg" Line 473: Error: Bad parameter: "ae.MeanAlg.ConvergeSpeed=0.10"
NvCameraIspConfigFileLoad: type = 0x5 Config file "common.cfg" Line 810: Error: Bad parameter: "awb.convergeSpeed=0.3"
NvCameraIspConfigFileLoad: type = 0x5 Config file "common.cfg" Line 3100: Error: Bad parameter: "af.alg.over_scan_percent=0.15"
NvCameraIspConfigFileLoad: type = 0x5 Config file "common.cfg" Line 3101: Error: Bad parameter: "af.alg.smooth_over_scan_percent=0.035"
NvCameraIspConfigFileLoad: type = 0x5 Config file "common.cfg" Line 3107: Error: Bad parameter: "af.alg.scene_change_t_guard_factor=0.30f"
NvCameraIspConfigFileLoad: type = 0x5 Config file "common.cfg" Line 3108: Error: Bad parameter: "af.alg.scene_stable_sharpness=0.15f"
NvCameraIspConfigFileLoad: type = 0x5 Config file "common.cfg" Line 3109: Error: Bad parameter: "af.alg.scene_change_sharpness=0.30f"
Motion points are not strictly ascending.NvCameraIspConfigFileLoad: type = 0x5 Config file "common.cfg" Line 4524: Error: 11: "tnr.v1.consistencyPoints={0.00,0.25,0.50,0.75,1.00}"
Argus Version: 0.98.3 (single-process)
argus_camera_32_7_2: /usr/src/jetson_multimedia_api/argus/samples/utils/Validator.h:600: bool ArgusSamples::operator<(const Argus::Range<T>&, const Argus::Range<T>&) [with T = float]: Assertion `l.min() <= l.max()' failed.
Aborted (core dumped)

Try below command then run the argus APP to try.

locale
export LC_NUMERIC="en_US.UTF-8"
locale | grep LC_NUMERIC

with this version I still get this errors, when I try to use camera 1:

Don’t know what happened to your system. Looks like it could be location/LANG configure.
Please reflash the system by sdkmanager to try.