Skip to content

Instantly share code, notes, and snippets.

@UncleTallest
Created April 2, 2022 16:33
Show Gist options
  • Save UncleTallest/f4865a0bb7dff9d37d08dff8ea77ea87 to your computer and use it in GitHub Desktop.
Save UncleTallest/f4865a0bb7dff9d37d08dff8ea77ea87 to your computer and use it in GitHub Desktop.

Webcam Setup

First, we query the available cameras.

$ v4l2-ctl --list-devices
OBSBOT Tiny: OBSBOT Tiny Camera (usb-0000:5a:00.3-2.4.1.1):
	/dev/video0
	/dev/video1
	/dev/media0

Logitech BRIO (usb-0000:5a:00.3-2.4.3):
	/dev/video2
	/dev/video3
	/dev/video4
	/dev/video5
	/dev/media1

Let's get the settings for the OBSBOT Tiny first.

$ v4l2-ctl -d /dev/video0 --list-ctrls

User Controls

                     brightness 0x00980900 (int)    : min=0 max=255 step=1 default=128 value=50
                       contrast 0x00980901 (int)    : min=0 max=255 step=1 default=128 value=159
                     saturation 0x00980902 (int)    : min=0 max=255 step=1 default=128 value=128
        white_balance_automatic 0x0098090c (bool)   : default=1 value=0
                           gain 0x00980913 (int)    : min=0 max=255 step=1 default=0 value=78
           power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=2 value=2 (60 Hz)
      white_balance_temperature 0x0098091a (int)    : min=2000 max=7500 step=10 default=4000 value=4080
                      sharpness 0x0098091b (int)    : min=0 max=255 step=1 default=128 value=128
         backlight_compensation 0x0098091c (int)    : min=0 max=1 step=1 default=1 value=1

Camera Controls

                  auto_exposure 0x009a0901 (menu)   : min=0 max=3 default=3 value=3 (Aperture Priority Mode)
         exposure_time_absolute 0x009a0902 (int)    : min=3 max=2047 step=1 default=250 value=312 flags=inactive
     exposure_dynamic_framerate 0x009a0903 (bool)   : default=0 value=0
                   pan_absolute 0x009a0908 (int)    : min=-36000 max=36000 step=3600 default=0 value=0
                  tilt_absolute 0x009a0909 (int)    : min=-36000 max=36000 step=3600 default=0 value=7200
                 focus_absolute 0x009a090a (int)    : min=0 max=255 step=5 default=0 value=0 flags=inactive
     focus_automatic_continuous 0x009a090c (bool)   : default=1 value=1
                  zoom_absolute 0x009a090d (int)    : min=100 max=500 step=1 default=100 value=100

Now, let's get the settings for the Brio 4K.

$ v4l2-ctl -d /dev/video2 --list-ctrls

User Controls

                     brightness 0x00980900 (int)    : min=0 max=100 step=1 default=50 value=50
                       contrast 0x00980901 (int)    : min=0 max=100 step=1 default=50 value=50
                     saturation 0x00980902 (int)    : min=0 max=100 step=1 default=50 value=50
                            hue 0x00980903 (int)    : min=0 max=100 step=1 default=50 value=50
        white_balance_automatic 0x0098090c (bool)   : default=1 value=1
                    red_balance 0x0098090e (int)    : min=0 max=0 step=0 default=0 value=0 flags=inactive
                   blue_balance 0x0098090f (int)    : min=0 max=0 step=0 default=0 value=0 flags=inactive
                           gain 0x00980913 (int)    : min=1 max=48 step=1 default=1 value=1
           power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=3 value=0 (Disabled)
      white_balance_temperature 0x0098091a (int)    : min=2800 max=6500 step=1 default=4000 value=0 flags=inactive
                      sharpness 0x0098091b (int)    : min=0 max=4 step=1 default=2 value=2
         backlight_compensation 0x0098091c (int)    : min=0 max=18 step=1 default=9 value=9

Camera Controls

                  auto_exposure 0x009a0901 (menu)   : min=0 max=3 default=0 value=0 (Auto Mode)
         exposure_time_absolute 0x009a0902 (int)    : min=1 max=2500 step=1 default=330 value=330 flags=inactive
     exposure_dynamic_framerate 0x009a0903 (bool)   : default=0 value=0
                   pan_absolute 0x009a0908 (int)    : min=-468000 max=468000 step=3600 default=0 value=533736
                  tilt_absolute 0x009a0909 (int)    : min=-324000 max=324000 step=7200 default=0 value=310788
                  zoom_absolute 0x009a090d (int)    : min=0 max=100 step=1 default=0 value=100
                zoom_continuous 0x009a090f (int)    : min=0 max=100 step=1 default=70 value=70
                      pan_speed 0x009a0920 (int)    : min=-1 max=160 step=1 default=20 value=0
                     tilt_speed 0x009a0921 (int)    : min=-1 max=120 step=1 default=20 value=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment