uvcc
uvcc copied to clipboard
Logitech BRIO: Additional features (non-standard fields)
This is a fantastic tool for controlling webcams, thanks!
I am using Logitech BRIO 4K webcam, where additional controls are possible such as
- (i) FOV (Field of View): 65, 78, 90 degrees
- (ii) Image Size: Standard vs Widescreen (this looks like a webcam's resolution mode): 4x3 vs 16x9
Would it be possible to control those settings as well?
FYI, the following is an output of V4L2 control for BRIO (Source: https://www.kurokesu.com/main/2016/01/16/manual-usb-camera-settings-in-linux/)
brightness (int) : min=0 max=255 step=1 default=128 value=128
contrast (int) : min=0 max=255 step=1 default=128 value=128
saturation (int) : min=0 max=255 step=1 default=128 value=128
white_balance_temperature_auto (bool) : default=1 value=1
gain (int) : min=0 max=255 step=1 default=0 value=0
power_line_frequency (menu) : min=0 max=2 default=2 value=2
white_balance_temperature (int) : min=2000 max=7500 step=10 default=4000 value=2770 flags=inactive
sharpness (int) : min=0 max=255 step=1 default=128 value=128
backlight_compensation (int) : min=0 max=1 step=1 default=1 value=1
exposure_auto (menu) : min=0 max=3 default=3 value=3
exposure_absolute (int) : min=3 max=2047 step=1 default=250 value=625 flags=inactive
exposure_auto_priority (bool) : default=0 value=1
pan_absolute (int) : min=-36000 max=36000 step=3600 default=0 value=0
tilt_absolute (int) : min=-36000 max=36000 step=3600 default=0 value=0
focus_absolute (int) : min=0 max=255 step=5 default=0 value=20 flags=inactive
focus_auto (bool) : default=1 value=1
zoom_absolute (int) : min=100 max=500 step=1 default=100 value=100
led1_mode (menu) : min=0 max=3 default=0 value=3
led1_frequency (int) : min=0 max=255 step=1 default=0 value=0
@wookayin: custom (per device model) controls would be cool, if implemented correctly. I do not have a Logitech Brio 4K, so cannot test/confirm/implement any custom handling. Perhaps the UVC standard controls covers these cases though?
- Changing the FOV might just be a variant of "zooming", as hinted by the standard. (A custom Logitech Brio camera application might know about this hardware-level detail and label it FOV?) The standard mentions relative zoom though, which isn't listed in the provided control output. Can you confirm by testing some different zoom values using
uvccorv4l2-ctl? - Changing the resolution (in WxH pixels, be it 4:3 or 16:9) sounds like something which is handled by the software initializing and consuming the actual photo/video stream. That is out of scope for
uvcc, which currently only deals with the device's Camera Terminal (CT) and Processing Unit (PU). Perhaps your can test this usingffmpeg+v4l2or equivalent on your system?
# NOTE: using a linux system.
v4l2-ctl --list-devices
ffmpeg -f v4l2 -list_formats all -i /dev/video0
Example output using a Logitech HD Pro Webcam C920.
Raw : yuyv422 : YUYV 4:2:2 : 640x480 160x90 160x120 176x144 320x180 320x240 352x288 432x240 640x360 800x448 800x600 864x480 960x720 1024x576 1280x720 1600x896 1920x1080 2304x1296 2304x1536
Compressed: h264 : H.264 : 640x480 160x90 160x120 176x144 320x180 320x240 352x288 432x240 640x360 800x448 800x600 864x480 960x720 1024x576 1280x720 1600x896 1920x1080
Compressed: mjpeg : Motion-JPEG : 640x480 160x90 160x120 176x144 320x180 320x240 352x288 432x240 640x360 800x448 800x600 864x480 960x720 1024x576 1280x720 1600x896 1920x1080
From UVC 1.5 Class specification.pdf.
Appendix D. Optical and Digital Zoom
Optical and digital zoom are functionally independent, so each will be discussed separately in the following sections. Although functionally independent, users will expect a single zoom control that integrates both. [---]
D.4. Absolute vs. Relative Zoom
The equations and examples given in the previous sections describe independent, absolute optical and digital zoom controls. However, based on users’ expectations that devices provide a single relative zoom control allowing them to move across the entire zoom range (from wide to telephoto and back again), many cameras will implement a relative zoom control that supports increasing and decreasing the zoom parameters without actually specifying the parameter values. Devices that allow only relative zoom control should still report the optical focal lengths and maximum digital multiplier in their respective descriptors, as well as maintain read-only absolute optical and digital zoom controls. This way, the host software will always be able to determine the current state of the zoom values.