DEV Community

Timothy Spann.   πŸ‡ΊπŸ‡¦
Timothy Spann. πŸ‡ΊπŸ‡¦

Posted on • Originally published at datainmotion.dev on

Fixing Linux Webcams

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #ffffff; background-color: #224fbc} span.s1 {font-variant-ligatures: no-common-ligatures}

v4l2-ctl --list-devices

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

v4l2-ctl --get-ctrl=white_balance_temperature

v4l2-ctl --set-ctrl=white_balance_temperature=4000

v4l2-ctl --set-ctrl=white_balance_temperature=4000 -d /dev/video0

v4l2-ctl --set-ctrl=white_balance_temperature_auto=1

v4l2-ctl --set-ctrl=white_balance_temperature_auto=0

v4l2-ctl --set-ctrl=white_balance_temperature_auto=4000

v4l2-ctl --set-ctrl=exposure_auto=3

v4l2-ctl --set-ctrl=exposure_auto_priority=0

v4l2-ctl --set-ctrl=exposure_absolute=250

v4l2-ctl --set-ctrl=exposure_absolute=0

v4l2-ctl --set-ctrl=exposure_absolute=250

v4l2-ctl --set-ctrl=gain=0

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

v4l2-ctl --set-ctrl=white_balance_temperature_auto=4000

v4l2-ctl --set-ctrl=white_balance_temperature_auto=0

v4l2-ctl --set-ctrl=white_balance_temperature=4000

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

This article is great: https://www.kurokesu.com/main/2016/01/16/manual-usb-camera-settings-in-linux/

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #ffffff; background-color: #224fbc} span.s1 {font-variant-ligatures: no-common-ligatures}

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

                 brightness 0x00980900 (int)    : min=0 max=255 step=1 default=128 value=128

                   contrast 0x00980901 (int)    : min=0 max=255 step=1 default=128 value=128

                 saturation 0x00980902 (int)    : min=0 max=255 step=1 default=128 value=128
Enter fullscreen mode Exit fullscreen mode

white_balance_temperature_auto 0x0098090c (bool) : default=1 value=0

                       gain 0x00980913 (int)    : min=0 max=255 step=1 default=0 value=0

       power\_line\_frequency 0x00980918 (menu)   : min=0 max=2 default=2 value=2

  white\_balance\_temperature 0x0098091a (int)    : min=2000 max=6500 step=1 default=4000 value=4000

                  sharpness 0x0098091b (int)    : min=0 max=255 step=1 default=128 value=128

     backlight\_compensation 0x0098091c (int)    : min=0 max=1 step=1 default=0 value=0

              exposure\_auto 0x009a0901 (menu)   : min=0 max=3 default=3 value=3

          exposure\_absolute 0x009a0902 (int)    : min=3 max=2047 step=1 default=250 value=83 flags=inactive

     exposure\_auto\_priority 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=0

             focus\_absolute 0x009a090a (int)    : min=0 max=250 step=5 default=0 value=0 flags=inactive

                 focus\_auto 0x009a090c (bool)   : default=1 value=1

              zoom\_absolute 0x009a090d (int)    : min=100 max=500 step=1 default=100 value=100
Enter fullscreen mode Exit fullscreen mode

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #ffffff; background-color: #224fbc} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #ffffff; background-color: #224fbc; min-height: 21.0px} span.s1 {font-variant-ligatures: no-common-ligatures} span.Apple-tab-span {white-space:pre}

v4l2-ctl --list-devices

HD Pro Webcam C920 (usb-70090000.xusb-2.2):

/dev/video0

Top comments (0)