I’m on a Jetson AGX Orin running Jetpack 5.1.4.
There’s a bug in GStreamer’s nvarguscamerasrc where “exposuretimerange” and “gainrange” will fail with the below errors if users try to set them dynamically via “g_object_set” after the pipeline has created.
Example code:
g_object_set(G_OBJECT(source), “exposuretimerange”, “13000 350000000”, NULL);
g_object_set(G_OBJECT(source), “gainrange”, “1 16”, NULL);
Example error:
GST_ARGUS: NvArgusCameraSrc: Setting Exposure Time Range : 13000 350000000
GST_ARGUS: NvArgusCameraSrc: Setting Gain Range : 1 16
GST_ARGUS: Invalid min gain value, using default minimum gain: 8.000000 instead.
GST_ARGUS: Invalid max gain value, using default maximum gain: 0.000000 instead.
GST_ARGUS: Invalid min exp value, using default minimum exp: 29999998 instead.
GST_ARGUS: Invalid max exp value, using default maximum exp: 0 instead.
I have created an unofficial fix at EvitanRelta/nvarguscamerasrc-r35.6.0-fix and it seems to solve the problem. The source of the bug appears to be because runtime range was validated using uninitialized per-thread local range variables. The fix I did was to store the selected sensor mode’s real gain/exposure limits on the source object and validate runtime updates against those stable limits.
This bug occurs in Jetpack 5.1.4 (my version) and it’s been reported in Jetpack 6.2:
- Nvarguscamerasrc with gstreamer not reading max and min gain/exposure correctly from sensor in cpp lib - Jetson Systems / Jetson Orin Nano - NVIDIA Developer Forums
- Nvarguscamerasrc with gstreamer not reading max gain/exposure correctly from sensor - Jetson Systems / Jetson Orin Nano - NVIDIA Developer Forums
Would it be possible for NVIDIA to publish an official patch with a similar fix for this bug? Preferably for both Jetpack 5 and 6 as due to hardware driver reasons, I have to stick to this verson of Jetpack and am unable to upgrade to Jetpack 6.