Jetson-tx2 mulitmedia api has high latency of capture and display

Hi,
We test video latency on jetson-tx2 use multimedia api, it turns out the latency of the video is about 70ms. The data stream is called NVARGUS API for video capture(1080p@30fps) and called EGL for display on the LCD screen.

CameraStream* pCamStream = (CameraStream*)data;
Ins_OsalMsgHndl msgHndl = NULL;
OSAL_BOOL quit = FALSE;
IBufferOutputStream* stream = NULL;
int64_t delta = pCamStream->parent->getDeltaTime();

LOGDBG(TAG, "capture task%d crated, waiting startup msg.", pCamStream->streamId);
Ins_OsalTaskWaitMsg(&pCamStream->task, &msgHndl);

stream = interface_cast<IBufferOutputStream>(pCamStream->outputStream.get());
if (!stream) {
    LOGERR(TAG, "capture task%d got stream failed, quit");
    return NULL;
}
Buffer* buffer = stream->acquireBuffer();

DmaBuffer *dmabuf =  DmaBuffer::fromArgusBuffer(buffer);
int dmabuf_fd = dmabuf->getFd();

pCamStream->renderer->render(dmabuf_fd);

have any suggestions?

Hi,
We have checked glass-to -glass latency and see 2-3 frame latency:
CSI latency is over 80 milliseconds...? - #4 by DaneLLL

You run in 30fps and 70ms looks close to 2-3 frame latency. The result looks expected.

Hi DaneLLL,
I want to known this latency caused by ISP or the underlying capture driver?

Hi,
Please check
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/jetson_xavier_camera_soft_archi.html#wwpID0E0LC0HA

It is from ISP block to libargus.

Hi,
Is there a way to reduce the latency (such as 1 frame) ??

Hi,

We are not able to do further reduction in camera capture. You may execute sudo nvpmodel -m 0 and sudo jetson_clocks to run system at max performance. See if this brings some improvement.

Hi,
run jetson_clocks has no effect

Hi,
We may not be able to give further improvement on this. Your result is expected.