# nvcamerasrc exposure-time not working

**URL:** <https://forums.developer.nvidia.com/t/nvcamerasrc-exposure-time-not-working/66314>\
**Category:** Jetson TX2\
**Created:** [October 17, 2018, 12:45pm UTC](https://forums.developer.nvidia.com/t/nvcamerasrc-exposure-time-not-working/66314 "2018-10-17T12:45:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![adh](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@adh](https://forums.developer.nvidia.com/u/adh)\
**Post date:** [October 17, 2018, 12:45pm UTC](https://forums.developer.nvidia.com/t/nvcamerasrc-exposure-time-not-working/66314/1 "2018-10-17T12:45:11Z")

</div>

Hi all,

We have tried to disable the auto exposure and manually specify an exposure time using nvcamerasrc, but without any apparent effect. This is documented and should really work, so I am wondering why we cannot make it work.

Is this mode of operation sensor specific? Can someone share a minimal working pipeline using nvcamerasrc?

Best regards,  
Adh

---

<div class="post-metadata">

**Author:** ![ShaneCCC](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/shaneccc/32/14043_2.png) [@ShaneCCC](https://forums.developer.nvidia.com/u/ShaneCCC)\
**Post date:** [October 18, 2018, 6:57am UTC](https://forums.developer.nvidia.com/t/nvcamerasrc-exposure-time-not-working/66314/2 "2018-10-18T06:57:01Z")

</div>

Could you use argus?

---

<div class="post-metadata">

**Author:** ![Beerend](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Beerend](https://forums.developer.nvidia.com/u/Beerend)\
**Post date:** [October 23, 2018, 7:32am UTC](https://forums.developer.nvidia.com/t/nvcamerasrc-exposure-time-not-working/66314/3 "2018-10-23T07:32:21Z")

</div>

> [@ShaneCCC](#):
>
> Could you use argus?

I also came across this problem with nvcamerasrc and played a bit with argus but in some experiments I found that calls in the form of “iNativeBuffer-\>copyToNvBuffer(buffer\_fd);” are rather slow on our TX1 device but this seems to be the only way to get workable pixel buffers.

Also: we would like to work with gstreamer and perhaps the NVIDIA DeepStream SDK so it would be convenient to have a working gstreamer source.

Currently can launch a gstreamer chain from nvcamerasrc and we override whatever settings is makes regarding exposure-time and gain using direct v4l2 comments but of course this is rather hacky and we would prefer a clean solution.

Do you think that you can either implement auto-exposure, exposure-time, gains, etc. in nvcamerasrc or perhaps release the source code of this component such that we can implement it ourselves?

---

<div class="post-metadata">

**Author:** ![ShaneCCC](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/shaneccc/32/14043_2.png) [@ShaneCCC](https://forums.developer.nvidia.com/u/ShaneCCC)\
**Post date:** [October 23, 2018, 7:54am UTC](https://forums.developer.nvidia.com/t/nvcamerasrc-exposure-time-not-working/66314/4 "2018-10-23T07:54:42Z")

</div>

For the nvcamerasrc you can check with the nvgstcaptrue-1.0 and implement your own gst APP

[http://developer.nvidia.com/embedded/dlc/nv-gst-apps-sources-r2423](http://developer.nvidia.com/embedded/dlc/nv-gst-apps-sources-r2423)

---

<div class="post-metadata">

**Author:** ![Beerend](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Beerend](https://forums.developer.nvidia.com/u/Beerend)\
**Post date:** [October 23, 2018, 8:28am UTC](https://forums.developer.nvidia.com/t/nvcamerasrc-exposure-time-not-working/66314/5 "2018-10-23T08:28:38Z")

</div>

> [@ShaneCCC](#):
>
> For the nvcamerasrc you can check with the nvgstcaptrue-1.0 and implement your own gst APP
> 
> [http://developer.nvidia.com/embedded/dlc/nv-gst-apps-sources-r2423](http://developer.nvidia.com/embedded/dlc/nv-gst-apps-sources-r2423)

Hi ShaneCCC,

I checked nvgstcapture and I looked for exposure time related settings. So there is a function:

```auto
void
set_exposureTime (gfloat dval)
{
  app->exposureTime = dval;
  g_object_set (G_OBJECT (app->ele.vsrc), "auto-exposure", 1, NULL);
  g_object_set (G_OBJECT (app->ele.vsrc), "exposure-time", dval, NULL);
}

```

This is basically calling a set\_property on whatever app-\>ele.vsrc is so let’s go figure out what this is.

```auto
app->ele.vsrc = gst_element_factory_make (NVGST_VIDEO_CAPTURE_SRC_CSI, NULL);

```

And if I then go and find that define:

```auto
#define NVGST_VIDEO_CAPTURE_SRC_CSI "nvcamerasrc"

```

So this application just secretly uses nvcamerasrc and will also not have working exposure-time control… It seems kind of a waste of time to be implementing our own v4l2-based gstreamer src trying to optimally get this to work nicely in NVMM zero-copy memory while NVIDIA has this nvcamerasrc which actually works well but is just not finished.

OK it works in argus and in some NVIDIA repositories I find a mention to something called nvargussrc but this one also does not seem to support exposure control and appears to be black-box and totally closed source.

Again in the context of this DeepStream SDK that NVIDIA is promoting I imagine that control over gain and exposure time is important in many real-time video processing applications so it would be nice to have better support for this from the provided sdks.

---

<div class="post-metadata">

**Author:** ![ShaneCCC](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/shaneccc/32/14043_2.png) [@ShaneCCC](https://forums.developer.nvidia.com/u/ShaneCCC)\
**Post date:** [October 23, 2018, 8:45am UTC](https://forums.developer.nvidia.com/t/nvcamerasrc-exposure-time-not-working/66314/6 "2018-10-23T08:45:57Z")

</div>

For the argus the API setExposureCompensation() may help.

```auto
virtual Status Argus::IAutoControlSettings::setExposureCompensation	(	float ev	)

```

---

<div class="post-metadata">

**Author:** ![Beerend](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Beerend](https://forums.developer.nvidia.com/u/Beerend)\
**Post date:** [October 25, 2018, 6:09am UTC](https://forums.developer.nvidia.com/t/nvcamerasrc-exposure-time-not-working/66314/7 "2018-10-25T06:09:58Z")

</div>

I had already successfully used the Argus functions:

```auto
virtual Status Argus::ISourceSettings::setExposureTimeRange(const Range<uint64_t> &exposureTimeRange)
virtual Status Argus::ISourceSettings::setGainRange(const Range<float>& gainRange)

```

So these work but this **does not solve the problem** of the topic starter or myself because we need DeepStream/gstreamer pipelines. I guess I can try to figure out how to make a gstreamer source out of this Argus application but you at NVIDIA already have this and have probably implemented a lot of nice optimizations using zero-copy memory, buffer re-use, etc.

Also: I have asked this same question to some people from the DeepStream team at GTC Europe this year and they seemed to never even have heard about Argus.
