CSI latency is over 80 milliseconds...?

Seems the egltransform + nveglglessink was responsible for this extra latency ?
What if you use nvoverlaysink:

gst-launch-1.0 -e nvcamerasrc ! 'video/x-raw(memory:NVMM), width=640, height=480, framerate=120/1' ! nvoverlaysink

[EDIT: also note that 640x480 is not a natively supported mode of the sensor. You may also try to capture from a native mode, and if required convert with nvvidconv.]

Onboard camera has three sensor modes:

Available Sensor modes :
2592 x 1944 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
2592 x 1458 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1280 x 720 FR=120.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10

Please ensure 1280x720p120 is selected:

NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 2 WxH = 1280x720 FrameRate = 120.000000 ...

Hi there, I posted a related question (what is the best camera setup for lowlatency) into this thread: https://devtalk.nvidia.com/default/topic/1029472/jetson-tx2/low-latency-camera-for-jetson-tx2/post/5266690/#5266690

Any help / answers are very much appreciated. Thanks so much

I was using jetson-util code from Nvidia (GitHub - dusty-nv/jetson-utils: C++/Python Linux utility wrappers for NVIDIA Jetson - camera, codecs, CUDA, GStreamer, HID, OpenGL/XGL) to display images captured with the Tx2 dev kit onboard camera.

When the gst camera was initialized, it print-out some config as:

Available Sensor modes :
2592 x 1944 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
2592 x 1458 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1280 x 720 FR=120.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10

However, I want just 640x360, so I create my c++ camera object as

myCamera = Nvidia_gstCamera(640, 360);

I can see the image was definitely 640*360. However, I really do not know which mode was initialized and what the frame rate was.

Could anyone help?

Hi,
On r32.2.1, it shows which sensor mode is picked in launching nvarguscamerasrc:

GST_ARGUS: Running with following settings:
   Camera index = 0
   Camera mode  = 2
   Output Stream W = 1280 H = 720
   seconds to Run    = 0
   Frame Rate = 120.000005

Looks like you use r28 release. Please share the version by executing ‘head -1 /etc/nv_tegra_release’

Yes, I am using r28:

# R28 (release), REVISION: 1.0, GCID: 9379712, BOARD: t186ref, EABI: aarch64, DATE: Thu Jul 20 07:59:31 UTC 2017

However, after change the launch string to the following, I got 60 FPS

nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)640, height=(int)360, format=(string)NV12, framerate=(fraction)120/1 ! nvvidconv flip-method=0 !

However, my application requires r28 so I can not upgrade. Can I ever achieve 120 FPS on r28?

Yes, I am using r28:

# R28 (release), REVISION: 1.0, GCID: 9379712, BOARD: t186ref, EABI: aarch64, DATE: Thu Jul 20 07:59:31 UTC 2017

However, after change the launch string to the following, I got 60 FPS

nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)640, height=(int)360, format=(string)NV12, framerate=(fraction)120/1 ! nvvidconv flip-method=0 !

However, my application requires r28 so I can not upgrade. Can I ever achieve 120 FPS on r28?

Hi @AutoCar,

You could try the following GStreamer pipeline to specify the 120 fps framerate in the nvcamerasrc properties:

DISPLAY=:0 gst-launch-1.0 nvcamerasrc fpsRange='120 120' ! "video/x-raw(memory:NVMM),width=640,height=360,format=NV12,framerate=120/1" ! nvoverlaysink

Another option is to capture at 1280 x 720 FR=120.000000 mode and use nvvidconv to perform a downscale from 1280x720 to 640x360 as the following pipeline:

DISPLAY=:0 gst-launch-1.0 nvcamerasrc fpsRange='120 120' ! "video/x-raw(memory:NVMM),width=1280,height=720,format=NV12,framerate=120/1" ! nvvidconv ! "video/x-raw(memory:NVMM),width=640,height=360,format=NV12,framerate=120/1" ! nvoverlaysink

You can use “perf” element to measure the framerate of the pipeline:

I hope the above information helps you.