~2012

Control your webcam from the command line

I've alwasy been happy with the default settings of my webcams but now I got me a situation where the camera tries to refocus in low light conditions. Time for some controlling and since I don't have a gui I need a cli tool. Well just found me one: uvcdynctrl

//Note: this only applies to UVC cameras! //

To install do:

sudo apt-get install uvcdynctrl

To list available devices:

$ uvcdynctrl -l

To see what controls are available:

$ uvcdynctrl -d video4 -c

To get current focus:

$ uvcdynctrl -d video4 -g "Focus (absolute)"
0

To get Auto focus setting:

$ uvcdynctrl -d video4 -g "Focus, Auto"
1

To disable auto focus:

$ uvcdynctrl -d video4 -s "Focus, Auto" 0

To set focus manually at 200:

uvcdynctrl -d video4 -s "Focus (absolute)" 200

More...

uvcdynctrl -d video4 -s "Exposure (Absolute)" 80
uvcdynctrl -d video4 -s "Exposure, Auto Priority" 0
#50Hz power frequency... 0=disabled 1=50 2=60
uvcdynctrl -d video4 -s "Power Line Frequency" 1
man uvcdynctrl