How to set camera sensor framerate

Hi:

We have written IMX274 sensor driver. This driver supports 1920x1080p60 and 1920x1080p30.
If I use the follwoing command to set camera to 1920x1080p60. Sensor is set to exactly 1920x1080p60:

gst-launch-1.0 nvcamerasrc sensor-id=0 fpsRange="60 60" ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)I420, framerate=60/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), width=640, height=480, format=(string)I420, framerate=60/1' ! nvegltransform ! nveglglessink -e

If I change “60 60” to “30 30”, and “60/1” to “30/1”, sensor enters 1920x1080p30 first, but then it switches to 1920x1080p60 immediately. I don’t know why.

Is there any way to force sensor to stay at 1920x1080p30 ?
Thanks.

If you add debug information in your driver when write_tbl function is called, you may find if the 60FPS table is sent to IMX-274 when 30FPS is selected by gst-launch.

Do you use TX1 ISP? Have you tried using v4l2-ctl for RAW capture?

Leopard Imaging IMX274 driver with argus_camera can change frame rates in 1 FPS incremental for 8MP and 1920x1080.

Hi yahoo2016:

Thanks for you comment.
Yes, I use TX1 ISP, and gstreamer works fine. I can see the correct color image from IMX274.

I use the following commands to see the preview of IMX274 at 1920x1080p30:

gst-launch-1.0 nvcamerasrc sensor-id=0 fpsRange="30 30" ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)I420, framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), width=640, height=480, format=(string)I420, framerate=30/1' ! nvegltransform ! nveglglessink -e

The following is the messages from gstreamer:

Setting pipeline to PAUSED ...

Available Sensor modes : 
3864 x 2218 FR=30.000000 CF=0xf09208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1932 x 1102 FR=60.000000 CF=0xf09208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1932 x 1102 FR=30.000000 CF=0xf09208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1288 x 738 FR=60.000000 CF=0xf09208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1288 x 738 FR=30.000000 CF=0xf09208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock

NvCameraSrc: Trying To Set Default Camera Resolution. Selected 1920x1080 FrameRate = 30.000000 ...

It seems that everything is fine. gstreamer uses 30fps. But the messages from sensor show that gstreamer actually uses 60fps:

[   87.906858] imx274my 6-001a: imx274_power_on: power on
[   87.922424] imx274my 6-001a: power on done
[   87.926597] imx274my 6-001a: imx274_power_off: power off
[   87.931926] imx274my 6-001a: power off done
[   87.936345] imx274my 6-001a: imx274_power_on: power on
[   87.951899] imx274my 6-001a: power on done
[   87.956087] imx274my 6-001a: imx274_power_off: power off
[   87.961421] imx274my 6-001a: power off done
[   87.966015] imx274my 6-001a: imx274_power_on: power on
[   87.972843] imx274my 6-001a: power on done
[   87.977021] imx274my 6-001a: imx274_power_off: power off
[   87.982355] imx274my 6-001a: power off done
[   88.003597] imx377my 2-001a: imx377_power_on: power on
[   88.012938] imx377my 2-001a: power on done
[   88.017070] imx377my 2-001a: imx377_power_off: power off
[   88.022395] imx377my 2-001a: power off done
[   88.026762] imx377my 2-001a: imx377_power_on: power on
[   88.042321] imx377my 2-001a: power on done
[   88.046498] imx377my 2-001a: imx377_power_off: power off
[   88.051826] imx377my 2-001a: power off done
[   88.056331] imx377my 2-001a: imx377_power_on: power on
[   88.071884] imx377my 2-001a: power on done
[   88.076723] imx377my 2-001a: imx377_power_off: power off
[   88.082127] imx377my 2-001a: power off done
[   88.124325] imx274my 6-001a: imx274_power_on: power on
[   88.138002] imx274my 6-001a: power on done
[   88.142381] imx274my 6-001a: try: size 3864 x 2218, fps 30, code 12303
[   88.153588] imx274my 6-001a: set: size 3864 x 2218, fps 30, code 12303
[   88.160202] imx274my 6-001a: try: size 1932 x 1102, fps 30, code 12303
[   88.167494] imx274my 6-001a: set: size 1932 x 1102, fps 30, code 12303
[   88.177359] imx274my 6-001a: imx274_s_stream mode[2]
[   88.182383] imx274my 6-001a: write mode table
[   88.204111] imx274my 6-001a: write mode table done
[   88.251347] imx274my 6-001a: write start table
[   88.255959] imx274my 6-001a: set stream 2 done
[   88.432134] imx274my 6-001a: write stop table
[   88.436909] imx274my 6-001a: disable stream done
[   88.441765] imx274my 6-001a: try: size 1932 x 1102, fps 60, code 12303
[   88.448455] imx274my 6-001a: set: size 1932 x 1102, fps 60, code 12303
[   88.456663] imx274my 6-001a: imx274_s_stream mode[1]
[   88.461679] imx274my 6-001a: write mode table
[   88.475374] imx274my 6-001a: write mode table done
[   88.529273] imx274my 6-001a: write start table
[   88.534408] imx274my 6-001a: set stream 1 done

We can see that sensor enters 1920x1080p30 first, but then it switches to 1920x1080p60 automatically.

The following is the messages from nvcamera-daemon:

Thread 1 getting next capture
Thread 2 getting next capture


Thread 3 getting next capture

Thread 1 is waiting

Thread 2 is waiting

Thread 3 is waiting

Thread 4 getting next capture

Thread 4 is waiting

Starting services...

getInstance: s_instance(0x7f751a2e80)

doCreateSensor: create SensorType(gyroscope) sensor(0x7f751a2f80)

doCreateSensor: create SensorType(accelerometer) sensor(0x7f751a32c0)

doCreateSensor: create SensorType(magnetometer) sensor(0x7f751a3350)

doCreateSensor: create SensorType(temperature) sensor(0x7f7521f5f0)

doCreateSensor: create SensorType(proximity) sensor(0x7f752229d0)

doCreateSensor: create SensorType(rotation vector) sensor(0x7f75225db0)

doCreateSensor: create SensorType(linear acceleration) sensor(0x7f75229190)

getInstance: s_instance(0x7f751a2e80)

AC plugin not present: dlopen "acplugin.so", acplugin.so: cannot open shared object file: No such file or directory

Services are started

NvPclSetHotplugCallback: ++++++++++++++++++++++
###### Imager: Calibration blob file handling NOT supported in this build ######
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclHwMatchPartNum: Found calibration Part#:4BA815P2, imx219:"A815P2"
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: imx274my_rear_A815P2
NvPclHwPrintModuleDefinition -- Position: 0
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: imx274my 6-001a
NvPclHwMatchPartNum: Found calibration Part#:4BA815P2, imx219:"A815P2"
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: imx377my_front_A815P2
NvPclHwPrintModuleDefinition -- Position: 1
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: imx377my 2-001a
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: NvPclModule list[0]: imx274my_rear_A815P2 position0
NvPclModuleListInitialize: NvPclModule list[1]: imx377my_front_A815P2 position1
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
initialize: /dev/video0
initialize: /dev/video1
getHotplugMonitor: Getting hotplug monitor instance
 initializeHotplug++
 addWatch: Watch added wd='1' hotPlugfunc ++ 

setHotplugCallback: Registered new callback client
NvPclSetHotplugCallback: ----------------------
NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 0 match at index[0]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f7525b030
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f7524b370
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f7524b400
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16
CheckOverridesPermissions: cannot stat file [/Calib/camera_override.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16
CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16
CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16
CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16
CheckOverridesPermissions: cannot stat file [/data/nvcam/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/imx274my_rear_A815P2.isp] 6/16
CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/imx274my_rear_A815P2.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/imx274my_rear_A815P2.isp] 7/16
CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/imx274my_rear_A815P2.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/imx274my_rear_A815P2.isp] 8/16
CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/imx274my_rear_A815P2.isp]
LoadOverridesFile: looking for override file [(null)] 9/16
LoadOverridesFile: looking for override file [(null)] 10/16
LoadOverridesFile: looking for override file [(null)] 11/16
LoadOverridesFile: looking for override file [(null)] 12/16
LoadOverridesFile: looking for override file [(null)] 13/16
LoadOverridesFile: looking for override file [(null)] 14/16
LoadOverridesFile: looking for override file [(null)] 15/16
LoadOverridesFile: looking for override file [(null)] 16/16
LoadOverridesFile: No override file found.
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
initialize: imx274my 6-001a
OFDPropertyGetString: could not read property [use_decibel_gain]
OFDPropertyGetString: could not read property [use_sensor_mode_id]
OFDPropertyCopyToLong: could not read property [has-eeprom]
Control Fuse ID not found
Control OTP Data not found
Control Frame Rate not found
Control Exposure not found
Control Coarse Time Short not found
Control Coarse Time Short not found
Sensor_FindCustomCIDs: calculated MaxCoarseDiff -4609
OFDPropertyGetString: could not read property [type]
Sensor_LoadSubType: Sensor type missing in DT, 510
OFDPropertyCopyToLong: could not read property [mode0.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode0.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode0.mode_type]
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode0.pixel_phase]
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode0.x_start]
OFDPropertyGetString: could not read property [mode0.y_start]
OFDPropertyGetString: could not read property [mode0.x_end]
OFDPropertyGetString: could not read property [mode0.y_end]
OFDPropertyGetString: could not read property [mode0.h_scaling]
OFDPropertyGetString: could not read property [mode0.v_scaling]
OFDPropertyCopyToLong: could not read property [mode1.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode1.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode1.mode_type]
Sensor_LoadModeModeType: mode 1: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode1.pixel_phase]
Sensor_LoadModePixelPhase: mode 1: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode1.x_start]
OFDPropertyGetString: could not read property [mode1.y_start]
OFDPropertyGetString: could not read property [mode1.x_end]
OFDPropertyGetString: could not read property [mode1.y_end]
OFDPropertyGetString: could not read property [mode1.h_scaling]
OFDPropertyGetString: could not read property [mode1.v_scaling]
OFDPropertyCopyToLong: could not read property [mode2.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode2.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode2.mode_type]
Sensor_LoadModeModeType: mode 2: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode2.pixel_phase]
Sensor_LoadModePixelPhase: mode 2: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode2.x_start]
OFDPropertyGetString: could not read property [mode2.y_start]
OFDPropertyGetString: could not read property [mode2.x_end]
OFDPropertyGetString: could not read property [mode2.y_end]
OFDPropertyGetString: could not read property [mode2.h_scaling]
OFDPropertyGetString: could not read property [mode2.v_scaling]
OFDPropertyCopyToLong: could not read property [mode3.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode3.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode3.mode_type]
Sensor_LoadModeModeType: mode 3: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode3.pixel_phase]
Sensor_LoadModePixelPhase: mode 3: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode3.x_start]
OFDPropertyGetString: could not read property [mode3.y_start]
OFDPropertyGetString: could not read property [mode3.x_end]
OFDPropertyGetString: could not read property [mode3.y_end]
OFDPropertyGetString: could not read property [mode3.h_scaling]
OFDPropertyGetString: could not read property [mode3.v_scaling]
OFDPropertyCopyToLong: could not read property [mode4.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode4.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode4.mode_type]
Sensor_LoadModeModeType: mode 4: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode4.pixel_phase]
Sensor_LoadModePixelPhase: mode 4: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode4.x_start]
OFDPropertyGetString: could not read property [mode4.y_start]
OFDPropertyGetString: could not read property [mode4.x_end]
OFDPropertyGetString: could not read property [mode4.y_end]
OFDPropertyGetString: could not read property [mode4.h_scaling]
OFDPropertyGetString: could not read property [mode4.v_scaling]
NvPclDriver_V4L2_Sensor_Initialize: Loaded Driver: 5 Modes Available--------------
NvPclInitializeDrivers: v4l2_sensor ------------------
NvPclOpen: ----------------------
populateStaticProperties

populateStaticProperties

NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 1 match at index[1]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f7525c590
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f7525c620
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f7525c6b0
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16
CheckOverridesPermissions: cannot stat file [/Calib/camera_override.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16
CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16
CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16
CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16
CheckOverridesPermissions: cannot stat file [/data/nvcam/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/imx377my_front_A815P2.isp] 6/16
CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/imx377my_front_A815P2.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/imx377my_front_A815P2.isp] 7/16
CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/imx377my_front_A815P2.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/imx377my_front_A815P2.isp] 8/16
CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/imx377my_front_A815P2.isp]
LoadOverridesFile: looking for override file [(null)] 9/16
LoadOverridesFile: looking for override file [(null)] 10/16
LoadOverridesFile: looking for override file [(null)] 11/16
LoadOverridesFile: looking for override file [(null)] 12/16
LoadOverridesFile: looking for override file [(null)] 13/16
LoadOverridesFile: looking for override file [(null)] 14/16
LoadOverridesFile: looking for override file [(null)] 15/16
LoadOverridesFile: looking for override file [(null)] 16/16
LoadOverridesFile: No override file found.
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
initialize: imx377my 2-001a
OFDPropertyGetString: could not read property [use_decibel_gain]
OFDPropertyGetString: could not read property [use_sensor_mode_id]
OFDPropertyCopyToLong: could not read property [has-eeprom]
Control Fuse ID not found
Control OTP Data not found
Control Frame Rate not found
Control Exposure not found
Sensor_FindCustomCIDs: calculated MaxCoarseDiff -7357
OFDPropertyGetString: could not read property [type]
Sensor_LoadSubType: Sensor type missing in DT, 510
OFDPropertyCopyToLong: could not read property [mode0.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode0.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode0.mode_type]
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode0.pixel_phase]
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode0.x_start]
OFDPropertyGetString: could not read property [mode0.y_start]
OFDPropertyGetString: could not read property [mode0.x_end]
OFDPropertyGetString: could not read property [mode0.y_end]
OFDPropertyGetString: could not read property [mode0.h_scaling]
OFDPropertyGetString: could not read property [mode0.v_scaling]
OFDPropertyCopyToLong: could not read property [mode1.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode1.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode1.mode_type]
Sensor_LoadModeModeType: mode 1: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode1.pixel_phase]
Sensor_LoadModePixelPhase: mode 1: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode1.x_start]
OFDPropertyGetString: could not read property [mode1.y_start]
OFDPropertyGetString: could not read property [mode1.x_end]
OFDPropertyGetString: could not read property [mode1.y_end]
OFDPropertyGetString: could not read property [mode1.h_scaling]
OFDPropertyGetString: could not read property [mode1.v_scaling]
OFDPropertyCopyToLong: could not read property [mode2.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode2.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode2.mode_type]
Sensor_LoadModeModeType: mode 2: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode2.pixel_phase]
Sensor_LoadModePixelPhase: mode 2: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode2.x_start]
OFDPropertyGetString: could not read property [mode2.y_start]
OFDPropertyGetString: could not read property [mode2.x_end]
OFDPropertyGetString: could not read property [mode2.y_end]
OFDPropertyGetString: could not read property [mode2.h_scaling]
OFDPropertyGetString: could not read property [mode2.v_scaling]
OFDPropertyCopyToLong: could not read property [mode3.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode3.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode3.mode_type]
Sensor_LoadModeModeType: mode 3: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode3.pixel_phase]
Sensor_LoadModePixelPhase: mode 3: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode3.x_start]
OFDPropertyGetString: could not read property [mode3.y_start]
OFDPropertyGetString: could not read property [mode3.x_end]
OFDPropertyGetString: could not read property [mode3.y_end]
OFDPropertyGetString: could not read property [mode3.h_scaling]
OFDPropertyGetString: could not read property [mode3.v_scaling]
OFDPropertyCopyToLong: could not read property [mode4.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode4.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode4.mode_type]
Sensor_LoadModeModeType: mode 4: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode4.pixel_phase]
Sensor_LoadModePixelPhase: mode 4: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode4.x_start]
OFDPropertyGetString: could not read property [mode4.y_start]
OFDPropertyGetString: could not read property [mode4.x_end]
OFDPropertyGetString: could not read property [mode4.y_end]
OFDPropertyGetString: could not read property [mode4.h_scaling]
OFDPropertyGetString: could not read property [mode4.v_scaling]
OFDPropertyCopyToLong: could not read property [mode5.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode5.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode5.mode_type]
Sensor_LoadModeModeType: mode 5: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode5.pixel_phase]
Sensor_LoadModePixelPhase: mode 5: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode5.x_start]
OFDPropertyGetString: could not read property [mode5.y_start]
OFDPropertyGetString: could not read property [mode5.x_end]
OFDPropertyGetString: could not read property [mode5.y_end]
OFDPropertyGetString: could not read property [mode5.h_scaling]
OFDPropertyGetString: could not read property [mode5.v_scaling]
NvPclDriver_V4L2_Sensor_Initialize: Loaded Driver: 6 Modes Available--------------
NvPclInitializeDrivers: v4l2_sensor ------------------
NvPclOpen: ----------------------
populateStaticProperties

populateStaticProperties

sourceRegistry[0] assigned

ispRegistry[0] assigned

Using Source GUID 0

NvPclPowerOn: +++++++++++
NvPclPowerOn: -----------
Using ISP A

AC plugin not present: dlopen "acplugin.so", acplugin.so: cannot open shared object file: No such file or directory

No library found, disabling AC plugin.

NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
NvPclDriver_V4L2_Sensor_Write:+++++++++++++++++++++++
Sensor_WriteMode: Target mode Id(2): Resolution 1932x1102
setActiveBufferMemory: 2
setActivePixelFormat: 808535890
INPUT: Width 3864 Height 2218 pixelformat RG10
INPUT: Width 1932 Height 1102 pixelformat RG10
Sensor_WriteFrameRate:	INPUT frameLength:4615, frameRate:30.000000
Sensor_WriteGain:	INPUT gainCtrl:100 analogGain:1.000000
Sensor_WriteExposure:	INPUT coarseTime:9224, expTime:0.066618
NvPclDriver_UpdateOutputSettings:	OUTPUT frameLength:4615, frameRate:30.002501
NvPclDriver_UpdateOutputSettings:	OUTPUT analogGain:1.000000
NvPclDriver_UpdateOutputSettings:	OUTPUT coarseTime:9224, expTime:0.066618
NvPclDriver_V4L2_Sensor_Write:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
NvPclDriver_V4L2_Sensor_Write:+++++++++++++++++++++++
NvPclDriver_V4L2_Sensor_Write:-----------------------
NvPclSettingsApply: Reading PCL settings
populateStaticProperties

InstructionList:

  + GraphSettings
      | SensorMode: 1932x1102 BayerS16RGGB 60.0fps
      | output 0: 1920x1080 BL Y8 420
      | downscaleForPostProcessing

  + Instruction List
      | id: 0
      +  0: CCDataSetupStage
          | EstimatedIspOutLatencyFrames: 5
          | NumConcurrentCaptures: 1
          | UnprocessedYuvBufferMask: 0
      +  1: ACSynchronizeStage
      +  2: AeAfApplyStage
      +  3: AcPluginStage
          | operation: opApplyPreCapture
      +  4: AcMergeStage
      +  5: TempBufferAcquireStage
          | Buffer Index: 2
          | BufferRequirements: 1920x1096 BL Y8 420
      +  6: TempBufferAcquireStage
          | Buffer Index: 3
          | BufferRequirements: 1932x1 Pitch NonColor8
      +  7: SensorISPCaptureStage
          | Source GUID: 0
          | Output A Buffer: 2
          | SensorMetadata Buffer: 3
      +  8: StatsBufferAcquireStage
          | Buffer Index: 1
          | BufferRequirements: 640x366 Pitch Y8 420
      +  9: BlitStage
          | Input Buffer: 2
          | Output Buffer: 1
          | Filter: Nearest
          | Transform: None
          | Src Rect: Not used
          | Dst Rect: Not used

      + 10: StatsUpdateStage
          | Outut Meta Buffer: 3
      + 11: BufferReturnStage
          | Output A Buffer: 3
      + 12: AcPluginStage
          | operation: opAnalyzePostCapture
      + 13: AfAnalysisStage
      + 14: BlitStage
          | Input Buffer: 2
          | Output Buffer: 0
          | Filter: Smart
          | Transform: None
          | Src Rect: [0, 0, 1920, 1096]
          | Dst Rect: Not used
      + 15: MonitorStage
      + 16: ExifStage
      + 17: MakerNoteStage
      + 18: BufferReturnStage
          | Output A Buffer: 0
      + 19: MetadataReturnStage
      + 20: BufferReturnStage
          | Output A Buffer: 2

populateStaticProperties

Created fiber 0x7f2c0008c0 for CC 101

Created fiber 0x7f2c000d00 for CC 102

Thread 1 is working on CC 101

Thread 2 is working on CC 102

CC 101 completed step 0 in fiber 0x7f2c0008c0

CC 102 completed step 0 in fiber 0x7f2c000d00

CC 102 processing step 1 in fiber 0x7f2c000d00

FiberScheduler: cc 102, fiber 0x7f2c000d00 in progress...

Thread 2 getting next capture

Thread 2 is waiting

cc 101(0) runCount=0 runIspOut=0, latest ccId=0
CC 101 processing step 1 in fiber 0x7f2c0008c0

populateStaticProperties

Thread 3 is waiting

FiberScheduler: cc 101, fiber 0x7f2c0008c0 succeeded async operation

cc 102(1) runCount=1 runIspOut=0, latest ccId=0
FiberScheduler: cc 102, fiber 0x7f2c000d00 succeeded async operation

Thread 4 is working on CC 102

CC 102 processing step 2 in fiber 0x7f2c000d00

Thread 2 is waiting

FiberScheduler: cc 101, fiber 0x7f2c0008c0 in progress...

Thread 1 getting next capture

Thread 1 is working on CC 101

FiberScheduler: cc 102, fiber 0x7f2c000d00 in progress...

Thread 4 getting next capture

Thread 3 is waiting

Thread 2 is waiting

CC 101 processing step 2 in fiber 0x7f2c0008c0

FiberScheduler: cc 101, fiber 0x7f2c0008c0 in progress...

NV AE and AfApply algorithms are active.
Thread 3 is waiting
Thread 1 getting next capture



Thread 4 is waiting

Thread 1 is waiting

FiberScheduler: cc 101, fiber 0x7f2c0008c0 succeeded async operation

NV AE and AfApply algorithms are active.

Thread 2 is working on CC 101

CC 101 processing step 3 in fiber 0x7f2c0008c0

FiberScheduler: cc 101, fiber 0x7f2c0008c0 in progress...

Thread 2 getting next capture

Thread 2 is waiting

FiberScheduler: cc 101, fiber 0x7f2c0008c0 succeeded async operation

Thread 3 is working on CC 101

FiberScheduler: cc 102, fiber 0x7f2c000d00 succeeded async operation

Thread 4 is working on CC 102

Thread 1 is waiting

FiberScheduler: cc 102, fiber 0x7f2c000d00 succeeded async operation

CC 102 processing step 3 in fiber 0x7f2c000d00

FiberScheduler: cc 102, fiber 0x7f2c000d00 in progress...

Thread 4 getting next capture

Thread 1 is working on CC 102

CC 102 processing step 4 in fiber 0x7f2c000d00

Thread 4 is waiting

FiberScheduler: cc 102, fiber 0x7f2c000d00 in progress...

Thread 1 getting next capture

Thread 4 is waiting

Thread 1 is waiting

CC 101 processing step 4 in fiber 0x7f2c0008c0

FiberScheduler: cc 101, fiber 0x7f2c0008c0 in progress...

Thread 3 getting next capture

Thread 4 is waiting

Thread 3 is waiting

Thread 2 is waiting

FiberScheduler: cc 101, fiber 0x7f2c0008c0 succeeded async operation

FiberScheduler: cc 102, fiber 0x7f2c000d00 succeeded async operation

Thread 4 is working on CC 101

Thread 1 is working on CC 102

CC 101 completed step 5 in fiber 0x7f2c0008c0

CC 101 completed step 6 in fiber 0x7f2c0008c0

CC 101 processing step 7 in fiber 0x7f2c0008c0

FiberScheduler: cc 101, fiber 0x7f2c0008c0 in progress...

Thread 4 getting next capture

Thread 4 is waiting

Thread 3 is waiting

PowerServiceUtils:calculateReqClock: entered

PowerServiceHw:addRequest: table size: before: 0, after:1

	request table for VI 0:
	req[0]: guID=0, stageID=SensorIspCapture
	req[0]: inW=1932, inH=1102, inBpp = 10, fps=60
	req[0]: outW=0, outH=0, outBpp=0
	req[0]: clock=288000000, pixelRate=288000000, timeout=450
	req[0]: isoBw=0, timeout=450
	req[0]: non_isoBw=0, timeout=450
PowerServiceHw:addRequest: table size: before: 0, after:1

	request table for CSI 0:
	req[0]: guID=0, stageID=SensorIspCapture
	req[0]: inW=1932, inH=1102, inBpp = 10, fps=60
	req[0]: outW=0, outH=0, outBpp=0
	req[0]: clock=0, pixelRate=288000000, timeout=450
	req[0]: isoBw=0, timeout=450
	req[0]: non_isoBw=0, timeout=450
PowerServiceHw:setClock: PowerServiceHw[1]: requested_clock_Hz=288000000

PowerServiceUtils:calculateReqClock: entered

PowerServiceHw:addRequest: table size: before: 0, after:1

	request table for ISP 0:
	req[0]: guID=0, stageID=SensorIspCapture
	req[0]: inW=1932, inH=1102, inBpp = 10, fps=60
	req[0]: outW=1920, outH=1096, outBpp=12
	req[0]: clock=288000000, pixelRate=288000000, timeout=450
	req[0]: isoBw=432000, timeout=450
	req[0]: non_isoBw=0, timeout=450
PowerServiceHw:setClock: PowerServiceHw[2]: requested_clock_Hz=288000000

CC 102 completed step 5 in fiber 0x7f2c000d00

PowerServiceHwIsp:setLaBw: m_bwVal_Iso=432000 and m_bwVal_NonIso=0

PowerServiceCore:setCameraBw: totalIsoBw=432000

CC 102 completed step 6 in fiber 0x7f2c000d00

CC 102 processing step 7 in fiber 0x7f2c000d00

FiberScheduler: cc 102, fiber 0x7f2c000d00 in progress...

Thread 1 getting next capture

Thread 1 is waiting

Thread 2 is waiting

NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
NvPclDriver_V4L2_Sensor_Write:+++++++++++++++++++++++
Sensor_WriteMode: Target mode Id(1): Resolution 1932x1102
deallocateBuffers: success
INPUT: Width 1932 Height 1102 pixelformat RG10
Sensor_WriteFrameRate:	INPUT frameLength:2307, frameRate:60.000000
Sensor_WriteGain:	INPUT gainCtrl:100 analogGain:1.000000
Sensor_WriteExposure:	INPUT coarseTime:6916, expTime:0.049949
NvPclDriver_UpdateOutputSettings:	OUTPUT frameLength:2307, frameRate:60.018005
NvPclDriver_UpdateOutputSettings:	OUTPUT analogGain:1.000000
NvPclDriver_UpdateOutputSettings:	OUTPUT coarseTime:6916, expTime:0.049949
NvPclDriver_V4L2_Sensor_Write:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
NvPclDriver_V4L2_Sensor_Write:+++++++++++++++++++++++
NvPclDriver_V4L2_Sensor_Write:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
NvPclDriver_V4L2_Sensor_Write:+++++++++++++++++++++++
Sensor_WriteFrameRate:	INPUT frameLength:2307, frameRate:60.000000
Sensor_WriteGain:	INPUT gainCtrl:100 analogGain:1.000000
Sensor_WriteExposure:	INPUT coarseTime:6916, expTime:0.049949
NvPclDriver_UpdateOutputSettings:	OUTPUT frameLength:2307, frameRate:60.018005
NvPclDriver_UpdateOutputSettings:	OUTPUT analogGain:1.000000
NvPclDriver_UpdateOutputSettings:	OUTPUT coarseTime:6916, expTime:0.049949
NvPclDriver_V4L2_Sensor_Write:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
NvPclDriver_V4L2_Sensor_Write:+++++++++++++++++++++++
Sensor_WriteFrameRate:	INPUT frameLength:2307, frameRate:60.000000
Sensor_WriteGain:	INPUT gainCtrl:100 analogGain:1.000000
Sensor_WriteExposure:	INPUT coarseTime:6916, expTime:0.049949
NvPclDriver_UpdateOutputSettings:	OUTPUT frameLength:2307, frameRate:60.018005
NvPclDriver_UpdateOutputSettings:	OUTPUT analogGain:1.000000
NvPclDriver_UpdateOutputSettings:	OUTPUT coarseTime:6916, expTime:0.049949
NvPclDriver_V4L2_Sensor_Write:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
NvPclDriver_V4L2_Sensor_Write:+++++++++++++++++++++++
Sensor_WriteFrameRate:	INPUT frameLength:2307, frameRate:60.000000
Sensor_WriteGain:	INPUT gainCtrl:100 analogGain:1.000000
Sensor_WriteExposure:	INPUT coarseTime:2302, expTime:0.016632
NvPclDriver_UpdateOutputSettings:	OUTPUT frameLength:2307, frameRate:60.018005
NvPclDriver_UpdateOutputSettings:	OUTPUT analogGain:1.000000
NvPclDriver_UpdateOutputSettings:	OUTPUT coarseTime:2302, expTime:0.016626
NvPclDriver_V4L2_Sensor_Write:-----------------------
NvPclSettingsApply: Reading PCL settings
Created fiber 0x7f2c000f20 for CC 103
populateStaticProperties
Thread 4 is working on CC 103

CC 103 completed step 0 in fiber 0x7f2c000f20


CC 103 processing step 1 in fiber 0x7f2c000f20

FiberScheduler: cc 103, fiber 0x7f2c000f20 in progress...

Thread 4 getting next capture

Thread 4 is waiting

cc 103(2) runCount=2 runIspOut=0, latest ccId=0
Thread 3 is waiting


FiberScheduler: cc 103, fiber 0x7f2c000f20 succeeded async operation

Thread 1 is working on CC 103

CC 103 processing step 2 in fiber 0x7f2c000f20

NV AE and AfApply algorithms are active.

FiberScheduler: cc 103, fiber 0x7f2c000f20 in progress...

Thread 1 getting next capture

Thread 1 is waiting

Thread 2 is waiting

FiberScheduler: cc 103, fiber 0x7f2c000f20 succeeded async operation

Thread 4 is working on CC 103

CC 103 processing step 3 in fiber 0x7f2c000f20

FiberScheduler: cc 103, fiber 0x7f2c000f20 in progress...

Thread 4 getting next capture

Thread 4 is waiting

FiberScheduler: cc 103, fiber 0x7f2c000f20 succeeded async operation

Thread 3 is working on CC 103

CC 103 processing step 4 in fiber 0x7f2c000f20

FiberScheduler: cc 103, fiber 0x7f2c000f20 in progress...

Thread 3 getting next capture

Thread 3 is waiting

Thread 2 is waiting

FiberScheduler: cc 103, fiber 0x7f2c000f20 succeeded async operation

Thread 1 is working on CC 103

Thread 4 is waiting

CC 103 completed step 5 in fiber 0x7f2c000f20

CC 103 completed step 6 in fiber 0x7f2c000f20

CC 103 processing step 7 in fiber 0x7f2c000f20

FiberScheduler: cc 103, fiber 0x7f2c000f20 in progress...

Thread 1 getting next capture

Thread 3 is waiting

Thread 1 is waiting

Created fiber 0x7f2c001140 for CC 104

Thread 2 is working on CC 104

populateStaticProperties

CC 104 completed step 0 in fiber 0x7f2c001140

CC 104 processing step 1 in fiber 0x7f2c001140

cc 104(3) runCount=3 runIspOut=0, latest ccId=0NvPclSettingsUpdate: Sending Updated Settings through PCL

FiberScheduler: cc 104, fiber 0x7f2c001140 in progress...

FiberScheduler: cc 104, fiber 0x7f2c001140 succeeded async operation

Thread 2 getting next capture

Thread 2 is working on CC 104

CC 104 processing step 2 in fiber 0x7f2c001140

NV AE and AfApply algorithms are active.

NvPclSettingsApply: Applying last settings through PCL
NvPclDriver_V4L2_Sensor_Write:+++++++++++++++++++++++
Sensor_WriteFrameRate:	INPUT frameLength:2307, frameRate:60.000000
Sensor_WriteGain:	INPUT gainCtrl:201 analogGain:2.004169
Sensor_WriteExposure:	INPUT coarseTime:2302, expTime:0.016632
Thread 3 is waiting

Thread 4 is waiting

FiberScheduler: cc 104, fiber 0x7f2c001140 in progress...

Thread 2 getting next capture

FiberScheduler: cc 104, fiber 0x7f2c001140 succeeded async operation

Thread 1 is working on CC 104

Thread 2 is waiting

CC 104 processing step 3 in fiber 0x7f2c001140

FiberScheduler: cc 104, fiber 0x7f2c001140 succeeded async operation

Thread 3 is waiting

Thread 4 is waiting

FiberScheduler: cc 104, fiber 0x7f2c001140 in progress...

Thread 1 getting next capture

Thread 2 is working on CC 104

CC 104 processing step 4 in fiber 0x7f2c001140

FiberScheduler: cc 104, fiber 0x7f2c001140 in progress...

Thread 1 is waiting

Thread 2 getting next capture
Thread 3 is waiting


Thread 2 is waiting

FiberScheduler: cc 104, fiber 0x7f2c001140 succeeded async operation

Thread 4 is working on CC 104

NvPclDriver_UpdateOutputSettings:	OUTPUT frameLength:2307, frameRate:60.018005
NvPclDriver_UpdateOutputSettings:	OUTPUT analogGain:2.003906
NvPclDriver_UpdateOutputSettings:	OUTPUT coarseTime:2302, expTime:0.016626
NvPclDriver_V4L2_Sensor_Write:-----------------------
NvPclSettingsApply: Reading PCL settings
CC 104 completed step 5 in fiber 0x7f2c001140

CC 104 completed step 6 in fiber 0x7f2c001140

CC 104 processing step 7 in fiber 0x7f2c001140

FiberScheduler: cc 104, fiber 0x7f2c001140 in progress...

Thread 4 getting next capture

Thread 4 is waiting

Thread 1 is waiting

Created fiber 0x7f2c001360 for CC 105

Thread 3 is working on CC 105

CC 105 completed step 0 in fiber 0x7f2c001360

CC 105 processing step 1 in fiber 0x7f2c001360

FiberScheduler: cc 105, fiber 0x7f2c001360 in progress...

Thread 3 getting next capture

Thread 3 is waiting

The following messages show that sensor is set to 30fps first:

Sensor_WriteMode: Target mode Id(2): Resolution 1932x1102
setActiveBufferMemory: 2
setActivePixelFormat: 808535890
INPUT: Width 3864 Height 2218 pixelformat RG10
INPUT: Width 1932 Height 1102 pixelformat RG10 
Sensor_WriteFrameRate:	INPUT frameLength:4615, frameRate:<b>30.000000</b>
Sensor_WriteGain:	INPUT gainCtrl:100 analogGain:1.000000
Sensor_WriteExposure:	INPUT coarseTime:9224, expTime:0.066618

But the following messages show that capture flow is configured at 60fps:

+ GraphSettings
      | SensorMode: 1932x1102 BayerS16RGGB <b>60.0fps</b>
      | output 0: 1920x1080 BL Y8 420
      | downscaleForPostProcessing

Finally gstreamer changes to 60fps:

Sensor_WriteMode: Target mode Id(1): Resolution 1932x1102
deallocateBuffers: success
INPUT: Width 1932 Height 1102 pixelformat RG10
Sensor_WriteFrameRate:	INPUT frameLength:2307, frameRate:<b>60.000000</b>
Sensor_WriteGain:	INPUT gainCtrl:100 analogGain:1.000000
Sensor_WriteExposure:	INPUT coarseTime:6916, expTime:0.049949

Any comment is appreciated.

If you only need 30FPS mode, you could remove 60FPS mode from driver.

Have you tried Leopard Imaging “argus-camera”?

Hi yahoo2016:

It doesn’t sound good because we want 30fps and 60fps at the same time.

I haven’t tried Leopard Imaging “argus-camera”. Is it a public application ?
But I have tried “argus_camera” in tegra_multimedia_api. It is in ~/tegra_multimedia_api/argus/build/apps/camera/ui/camera/argus_camera.
With this application, I can set sensor to 30fps or 60fps without problem. but I don’t have time to learn argus.

I still hope that there is a solution for gstreamer.

We purchased Leopard Imaging IMX274s and TX1 adapters and got free IMX274 driver/apps source and documentation. The documentation includes instructions to run argus_camera, The argus_camera from Leopard Imaging could be modified or unmodified “~/tegra_multimedia_api/argus/build/apps/camera/ui/camera/argus_camera”.

Nvidia mentioned ISP support is provided through Nvidia partners.

The root cause is in device tree.

If I put 60fps before 30fps in device tree, such as:

mode0 {
  active_width=1920;
  active_height=1080;
  min_framerate="60";
  max_framerate="60";
  ...
};
mode1 {
  active_width=1920;
  active_height=1080;
  min_framerate="30";
  max_framerate="30";
  ...
};

sensor is always set to 60fps even though I specify 30fps for gstreamer.

If 30fps is before 60fps, sensor is always set to 30fps.

Hi arthurho
It’s could be a bug for nvcamerasrc.
Generally, the 1080p@60 its framerate range is from 1 ~ 60, so you can remove the 1080p@30 fps the control the framerate in the sensor driver.

Hi ShaneCCC:

Thanks for your suggestion.
My driver also supports 3840x2160 at 30 fps. So I remove 1920x1080p30 and modify the device tree like below:

mode0 {
  active_width=3840;
  active_height=2160;
  min_framerate="1";
  max_framerate="30";
  ...
};
mode1 {
  active_width=1920;
  active_height=1080;
  min_framerate="1";
  max_framerate="60";
  ...
};

When I specify 1920x1080p30 in gstreamer pipeline, actually 3840x2160p30 is used by nvcamerasrc. It seems that nvcamerasrc only uses max_framerate. Min_framerate is ignored. When choosing the sensor mode, nvcamerasrc matches frame rate first, then dimension. That is why 3840x2160p30 is used.

Hi arthurho
That’s how it working. We expect the low resolution will be crop mode from the sensor output that will cause the view angle issue and the low high fps resolution is only for the high speed video use cause. Generally it’ll select full resolution for image capture.