LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Change default webcam settings (https://www.linuxquestions.org/questions/linux-hardware-18/change-default-webcam-settings-4175521422/)

opul 10-08-2014 05:09 AM

Change default webcam settings
 
Hi

I have a webcam connected via USB that I connect/ disconnect quite frequently. I also need to change the settings (shutter speed, gain etc..), every time, which I do in guvcview for Ubuntu 14.

But at some point this becomes a bit of a hassle. Does someone know what files I have to change so that when I reconnect a webcam, it will automatically have the preferred settings?

j-ray 10-09-2014 02:09 AM

I do not know whether there is config file you could edit but you could set the values in a script like below.

Quote:

#!/usr/bin/perl

# Logitech HD 720p Autofocus
system("uvcdynctrl -s 'Brightness' 120");
system("uvcdynctrl -s 'Contrast' 35");
system("uvcdynctrl -s 'Saturation' 50");
system("uvcdynctrl -s 'Sharpness' 100");
system("uvcdynctrl -s 'Focus, Auto' 1");
Then call the script when the webcam has started. It must be executable. (chmod 0755 /path/file.pl)


All times are GMT -5. The time now is 12:44 AM.