Setting up camera parameters in nvarguscamerasrc

I am trying to set up camera parameters for argus

source = Gst.ElementFactory.make("nvarguscamerasrc", "camera-stream")


source.set_property("ispdigitalgainrange", (1, 256))
source.set_property("exposuretimerange", (20000.0, 33698000.0))
source.set_property("gainrange", (1.0, 8.0))

However I get

GST_ARGUS: NvArgusCameraSrc: Setting ISP Digital Gain Range : (1, 256)
GST_ARGUS: Invalid ISP Digital Gain Range Input
GST_ARGUS: NvArgusCameraSrc: Setting Exposure Time Range : (20000.0, 33698000.0)
GST_ARGUS: Invalid Exposure Time Range Input
GST_ARGUS: NvArgusCameraSrc: Setting Gain Range : (1.0, 8.0)
GST_ARGUS: Invalid Gain Range Input

I think this means the way I input the parameters are not correct. I tried to find a document that documents this and was unsuccessful. can you please help me set these parameters.


P.S I’m not sure if this is due to the custom camera driver. or a generic nvidia thing.

Please reference to nvgstapp(nvgstcapture.c) to set them by g_obj_set()

L4T Driver Package (BSP) Sources

Hi, In the nvgstcapture.c I couldn’t find a reference to g_obj_set(), however I am a bit familiar with the pattern g_object_set (G_OBJECT (element-name), "property", "value", NULL); as I had to slightly modify the nvarguscamerasrc to work with our custom setup. ( which I did in the C land and I’m happy with it).

This new question became when I was doing more DL and network building type of work in python. I saw the element-name.set_property('property', value) pattern which actually seemed equivalent to g_object_set and I thought if it works for streammux it woud work with the source setup, so basically I tried porting my C bits from my custom nvarguscamerasrc to python.

So in summary: setting up camera parameters in the python (pyds) is not supported (natively) by nvidia?

I can’t tell that. But if element-name.set_property(‘property’, value) follow gstreamer suppose should be work.

Hmm… that is what I thought as well. I tried the combinations I could think of. tuples, list, arrays etc. not sure if I missed the right one somehow because it is presented slightly differently.

Apologies: I found the correct format eventually., However some of these settings are subject to the camera capabilities.(I was using an incompatible format earlier)

gst-inspect had the correct format template :)

    source.set_property("ispdigitalgainrange", "1 256")
    source.set_property("exposuretimerange", "20000 33698000")
    source.set_property("gainrange", "1.0, 8.0")