3

I need a simple script that can change my webcam settings. I want the changes to be applied globally, just like with guvcview. Most importantly, I want to be able to turn on the auto exposure setting.

I have checked the man page and I don't think guvcview allows that from CLI.

Jezor
  • 155

1 Answers1

1

From @Jezor comment above and the linked tutorial.

Installing the v4l-utils or v4l2-utils (depending on your distro) provides the v4l2-ctl tool that defaults to using /dev/video0

Running

v4l2-ctl --list-ctrls

will list all the settings that can be changed along with their min, max and current values.

you can then set these values with the --set-ctrl command e.g.

v4l2-ctl --set-ctrl contrast=40
v4l2-ctl --set-ctrl brightness=100
v4l2-ctl --set-ctrl saturation=80

These were run on a laptop with built in webcam during a Teams video call using Google Chrome and the camera feed was updated instantly.

To use a different video device pass the --device option e.g.

v4l2-ctl -d /dev/video3 --list-ctrls
rob
  • 375