Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logitech BRIO: Additional features (non-standard fields) #9

Open
wookayin opened this issue Oct 23, 2020 · 1 comment
Open

Logitech BRIO: Additional features (non-standard fields) #9

wookayin opened this issue Oct 23, 2020 · 1 comment

Comments

@wookayin
Copy link

wookayin commented Oct 23, 2020

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
@joelpurra
Copy link
Owner

@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?

  1. 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 uvcc or v4l2-ctl?
  2. 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 using ffmpeg+v4l2 or 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants