I am currently using Jetson TX2 and LI IMX185 camera to my project and the following are the available sensor modes that the camera can provide. When the sensor mode is set to resolution at 1080p, everything seems to work fine in terms of frame rate (ie. FR=30.000000, Frame rate is around 30 and when FR=60.000000, the frame rate is around 60). However, when I set the Sensor mode to the one at 720p, trying to achieve the frame rate of 120 fps, it seems that it has been limited to around 58 to 60 fps (same results as when using 1080p with 60 fps but it can be seen that the resolution has been updated from inspection) with nothing else running. Is there a way to check what is limiting my frame rate at 60 fps?
I am using R28.2.
Available Sensor modes :
1920 x 1080 FR=30.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=12 DynPixelBitDepth=12
1920 x 1080 FR=30.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1920 x 1080 FR=60.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=12 DynPixelBitDepth=12
1920 x 1080 FR=60.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1920 x 1080 FR=30.000000 CF=0x1009208a10 SensorModeType=5 CSIPixelBitDepth=12 DynPixelBitDepth=16
1280 x 720 FR=120.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 5 WxH = 1280x720 FrameRate = 120.000000 …
hello vision2,
nvcamerasrc cannot specify the sensor modes, it choose depend-on the resolution in the caps.
could you please share your commands for launching camera sensor to 720p@120-fps for checking.
also, may I know how did you verify your streaming frame-rate?
did you checking with timestamps?
thanks
Hello JerryChang,
Thank you for your quick reply, I was actually using the Argus API to set my camera sensor mode
SensorMode *sensorMode = sensorModes[sensorModeIndex];
ISensorMode *iSensorMode = interface_cast<ISensorMode>(sensorModes[sensorModeIndex]);
For the frame rate, I did the following calculation in my code with the number of frames divided the time interval between the first frame and the current frame to get the average fps:
Argus::UniqueObj<EGLStream::Frame> frame(iFrameConsumer->acquireFrame());
EGLStream::IFrame *iFrame = Argus::interface_cast<EGLStream::IFrame>(frame);
EXIT_IF_NULL(iFrame, "Failed to get IFrame interface");
uint64_t FrameNum = iFrame->getNumber();
uint64_t FrameTime = iFrame->getTime();
cout << "Frame Rate " << (FrameNum)/((FrameTime-firstFrameTime)/1000000.0) << endl;
The following are the results after a few run of my code with different sensorModeIndex value
#######Sensor Mode: 0 (30fps)
Resolution: 1080p
FrameReadoutTime 32000000.000000
FrameDuration 2000000.000000
Frames Dropped Between Previous Acquired 1
Frame Rate 30.695131
#######Sensor Mode: 1 (30fps)
Resolution: 1080p
FrameReadoutTime 32000000.000000
FrameDuration 2000000.000000
Frames Dropped Between Previous Acquired 1
Frame Rate 30.215237
#######Sensor Mode: 2 (60fps)
Resolution: 1080p
FrameReadoutTime 16000000.000000
FrameDuration 2000000.000000
Frames Dropped Between Previous Acquired 1
Frame Rate 59.690302
#######Sensor Mode: 3 (60fps)
Resolution: 1080p
FrameReadoutTime 16000000.000000
FrameDuration 2000000.000000
Frames Dropped Between Previous Acquired 1
Frame Rate 59.932104
#######Sensor Mode: 4 (120fps)
Resolution: 720p
FrameReadoutTime 8000000.000000
FrameDuration 2000000.000000
Frames Dropped Between Previous Acquired 2
Frame Rate 60.040692
FrameReadoutTime and FrameDuration are obtained using:
float FrameReadoutTime = iMetadata->getFrameReadoutTime();
float FrameDuration = iMetadata->getFrameDuration();
hello vision2,
you implementation calculate the frame-rate by EGL, suspect this may limited by display side.
could you please check with v4l2 standard controls,
for example,
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1000
Hi JerryChang,
Here is my output…
nvidia@tegra-ubuntu:~$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1000
<< 1.00 fps
< 1.00 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
< 0.99 fps
Similar results when I used width=1920,height=1080, do you know what is going on here? I can stream the video
hello vision2,
there are some known issue with R28.2 VI drivers.
please refer to Topic 1038067 and apply the patch to fix FE syncpt wait for R28.2 TX2 VI driver.
please also check Topic 1020202 to apply the patch to fix missing timestamp for vi4.
thanks