For one session/multiple cameras, why SensorTimestamp is early than exposure start time?

We are using one session, multiple camera mode for stereo camera.
But found ICaptureMetadata::getSensorTimestamp() is early than exposure start time. Why?

How do you get the exposure start time?

Hi, ShaneCCC:

We calculate acquire delay by :
Acquire_delay = acquireFrame_Timestamp - sensorTimestamp.

When one session, multiple camera mode, Acquire delay is too long, is about 130ms.

Ps, we get exposure start time by taking picture against running timer on display…


130ms is current know performance it about 4 ~ 5 frames.

Hi, ShaneCCC:
What is the bottleneck of latency?
Is the long latency is unavoidable when using one-session, multiple cameras mode?


I believe single camera have the same behavior.

Hi, ShaneCCC:

By our test:

  • 2 camera(one-session, multi-cameras): 130ms
  • 2 camera(multi-session, multi-cameras): 30-50ms
  • single camera: 28ms


Thanks for your confirm. Any reason to use single session?

One session mode is recommanded by @JerryChang. How to acquire images from stereo cameras simultaneously? - #4 by superlvjf

Please check if one session will cause acquire long delay???


What’s the version? And could you share your binary to check the delay?

Hi, ShaneCCC:

single_camera (1.2 MB)
one_session_2_camera (1.2 MB)
Our L4T version is 32.4.3 and test binary uploaded:
- single_camera: single camera using camera0, with width=1280, height=720, fmt=YCbCr_420
- one_session_2_camera: one session using camera id=0 and id=1, with width=1280, height=720, fmt=YCbCr_420.

Running output as following:
You can calculate acquire delay by: AcquireTime - SensorTimestamp.

#   Acquire time                                                      sensor timestamp
[I] 1517182994.127 | 1091.383 frame in, camera=1, number=277, timestamp=1517182994.004ms, exposure=1.000ms
[I] 1517182994.175 | 1091.431 frame in, camera=0, number=278, timestamp=1517182994.054ms, exposure=1.000ms
[I] 1517182994.175 | 1091.432 frame in, camera=1, number=278, timestamp=1517182994.054ms, exposure=1.000ms
[I] 1517182994.225 | 1091.482 frame in, camera=0, number=279, timestamp=1517182994.104ms, exposure=1.000ms

Please check if test binary work.


I got below result.
BTW I run it on r32.5

[I] connect stream 0…
[I] connect stream 1…
[I] 1625024154.849 | 4562.429 frame in, camera=0, number=1, timestamp=545.662ms, exposure=545662.176ms, lux=0.95
[I] 1625024154.869 | 4562.449 frame in, camera=1, number=1, timestamp=545.662ms, exposure=545662.176ms, lux=0.95
[I] 1625024154.882 | 4562.462 frame in, camera=0, number=2, timestamp=545.662ms, exposure=545662.176ms, lux=0.95
[I] 1625024154.942 | 4562.522 frame in, camera=1, number=4, timestamp=545.662ms, exposure=545662.176ms, lux=0.95
[I] 1625024155.000 | 4562.580 frame in, camera=0, number=6, timestamp=545.662ms, exposure=545662.176ms, lux=0.95
[I] 1625024155.067 | 4562.646 frame in, camera=1, number=8, timestamp=545.662ms, exposure=545662.176ms, lux=0.95
[I] 1625024155.128 | 4562.708 frame in, camera=0, number=9, timestamp=545.662ms, exposure=545662.176ms, lux=0.95
[I] 1625024155.191 | 4562.771 frame in, camera=1, number=11, timestamp=545.662ms, exposure=545662.176ms, lux=0.95
[I] 1625024155.244 | 4562.824 frame in, camera=0, number=13, timestamp=545.662ms, exposure=545662.176ms, lux=0.95
[I] 1625024155.300 | 4562.880 frame in, camera=1, number=15, timestamp=545.662ms, exposure=545662.176ms, lux=0.95
[I] 1625024155.357 | 4562.937 frame in, camera=0, number=16, timestamp=545.662ms, exposure=545662.176ms, lux=0.95

Hi, ShaneCCC:

Can you test it on r32.4 too?
I’ll try to run it on r32.5 and check later.


I got below result from r32.4.4
Does the result is 306.129 - 306.043 ? It about 86ms?

[I] 1625038414.012 | 306.129 frame in, camera=0, number=6468, timestamp=306.043ms, exposure=1.000ms, lux=657.84
[I] 1625038414.043 | 306.159 frame in, camera=1, number=6469, timestamp=306.077ms, exposure=1.000ms, lux=657.80
[I] 1625038414.054 | 306.171 frame in, camera=0, number=6469, timestamp=306.077ms, exposure=1.000ms, lux=657.80
[I] 1625038414.079 | 306.196 frame in, camera=1, number=6470, timestamp=306.110ms, exposure=1.000ms, lux=658.28
[I] 1625038414.090 | 306.207 frame in, camera=0, number=6470, timestamp=306.110ms, exposure=1.000ms, lux=658.28
[I] 1625038414.110 | 306.227 frame in, camera=1, number=6471, timestamp=306.143ms, exposure=1.000ms, lux=658.38
[I] 1625038414.121 | 306.237 frame in, camera=0, number=6471, timestamp=306.143ms, exposure=1.000ms, lux=658.38
[I] 1625038414.148 | 306.265 frame in, camera=1, number=6472, timestamp=306.177ms, exposure=1.000ms, lux=658.08
[I] 1625038414.160 | 306.277 frame in, camera=0, number=6473, timestamp=306.210ms, exposure=1.000ms, lux=657.72
[I] 1625038414.174 | 306.291 frame in, camera=1, number=6473, timestamp=306.210ms, exposure=1.000ms, lux=657.72
[I] 1625038414.191 | 306.308 frame in, camera=0, number=6474, timestamp=306.243ms, exposure=1.000ms, lux=657.00

Hi, ShaneCCC:
Do you test the single_camera test binary?
Does one-session-two-camera acquire delay longer than single camera?


Yes, the delay is about 86ms.

The single_camera is about about 37 - 39 ms
By the way the output frame rate is 60fps

[I] 1625104929.232 | 243.401 frame in, camera=0, number=3373, timestamp=243.364ms, exposure=1.000ms, lux=709.56
[I] 1625104929.268 | 243.436 frame in, camera=0, number=3374, timestamp=243.397ms, exposure=1.000ms, lux=709.37
[I] 1625104929.301 | 243.469 frame in, camera=0, number=3375, timestamp=243.430ms, exposure=1.000ms, lux=707.53
[I] 1625104929.333 | 243.501 frame in, camera=0, number=3376, timestamp=243.464ms, exposure=1.000ms, lux=707.51
[I] 1625104929.366 | 243.534 frame in, camera=0, number=3377, timestamp=243.497ms, exposure=1.000ms, lux=707.92
[I] 1625104929.400 | 243.568 frame in, camera=0, number=3378, timestamp=243.530ms, exposure=1.000ms, lux=708.78
[I] 1625104929.434 | 243.602 frame in, camera=0, number=3379, timestamp=243.564ms, exposure=1.000ms, lux=709.26
[I] 1625104929.467 | 243.636 frame in, camera=0, number=3380, timestamp=243.597ms, exposure=1.000ms, lux=708.56
[I] 1625104929.499 | 243.668 frame in, camera=0, number=3381, timestamp=243.630ms, exposure=1.000ms, lux=709.70
[I] 1625104929.534 | 243.702 frame in, camera=0, number=3382, timestamp=243.664ms, exposure=1.000ms, lux=710.07
[I] 1625104929.566 | 243.734 frame in, camera=0, number=3383, timestamp=243.697ms, exposure=1.000ms, lux=709.93
[I] 1625104929.600 | 243.768 frame in, camera=0, number=3384, timestamp=243.730ms, exposure=1.000ms, lux=711.37
[I] 1625104929.633 | 243.801 frame in, camera=0, number=3385, timestamp=243.764ms, exposure=1.000ms, lux=711.55

Therefore, we want to confirm two issues:

  1. What is the internal reason for the difference of delay?
  2. Is there a way to avoid it?

It’s could be need sync work for multiple sensors.
Maybe using high frame rate mode and boost the system to check if any improve.


It’s could be need sync work for multiple sensors.

  • So, the delay is unavoidable. Yes?

Maybe using high frame rate mode and boost the system to check if any improve.

  • Is high frame rate mode is a setting mode of libnvargus? How to set it.
  • We have boost CPU and ISP, but it doesn’t work.