I am trying to set the exposure time for the ELP 4K USB3.0 HDMI USB Camera (ELP-USB4KCAM30H-CFV
). Unlike the cameras I previously dealt with, it does not support V4L2_EXPOSURE_MANUAL
where exposure time could be set with V4L2_CID_EXPOSURE_ABSOLUTE
. Instead, it supports V4L2_EXPOSURE_SHUTTER_PRIORITY
, but how to set the exposure time for this control method?
Here is the output of v4l2-ctl --device /dev/video4 --list-ctrls-menus
:
User Controls
brightness 0x00980900 (int) : min=0 max=200 step=1 default=100 value=100
contrast 0x00980901 (int) : min=0 max=200 step=1 default=100 value=100
saturation 0x00980902 (int) : min=0 max=200 step=1 default=100 value=100
hue 0x00980903 (int) : min=0 max=360 step=1 default=0 value=0
white_balance_automatic 0x0098090c (bool) : default=1 value=1
gamma 0x00980910 (int) : min=0 max=100 step=1 default=50 value=50
gain 0x00980913 (int) : min=0 max=40 step=1 default=0 value=0
power_line_frequency 0x00980918 (menu) : min=0 max=2 default=1 value=1 (50 Hz)
0: Disabled
1: 50 Hz
2: 60 Hz
white_balance_temperature 0x0098091a (int) : min=0 max=150 step=1 default=70 value=70 flags=inactive
sharpness 0x0098091b (int) : min=0 max=200 step=1 default=100 value=100
backlight_compensation 0x0098091c (int) : min=0 max=32 step=1 default=16 value=16
Camera Controls
auto_exposure 0x009a0901 (menu) : min=0 max=3 default=0 value=2 (Shutter Priority Mode)
0: Auto Mode
2: Shutter Priority Mode
exposure_time_absolute 0x009a0902 (int) : min=625 max=320000 step=1 default=5000 value=80000 flags=inactive
Enabling shutter priority mode succeeds:
v4l2-ctl --device /dev/video4 --set-ctrl=auto_exposure=2
Setting exposure_time_absolute
fails. I also tried sudo
and the most recent v4l2-ctl
1.28.1 but got the same output.
v4l2-ctl --device /dev/video4 --set-ctrl=exposure_time_absolute=625
VIDIOC_S_EXT_CTRLS: failed: Permission denied
Error setting controls: Permission denied
Setting V4L2_CID_EXPOSURE_ABSOLUTE
via ioctl
also fails (returns -1
). I tried values from 0 to 1,000,000.
I even contacted the ELP support, who suggested to use the program AMCap on Windows, which, surprisingly, can set the exposure time (range from -3 to 3). The setting persists when connecting the camera to a different computer. However, I am looking for a less inconvenient solution.
Lastly, I tried enumerating hidden camera controls and found the “Zoom, Absolute” setting at 0x9a090d
with range from 0 to 200, which v4l2-ctl
did not list for some reason. Unfortunately, I did not find a hidden setting for exposure time. AMCap listed both “Exposure” and “Zoom” under “Camera Controls”.