Page 1 of 1

Brightness and Contrast won't stay changed

Posted: Tue Jun 05, 2007 6:05 am
by Telemann
Hopefully this will be an easy one :D

So I have a copy of zm that was working great with a quickcam pro 4000.
I'm trying to set up a Logitech quickcam Chat.

I have it all working and i can view through the camera and everything except that the brightness and contrast insist on being set wrong.

I can click on "settings" from the monitor window and I am provided with a window that lets you change the brightness and contrast by entering largish integers (in the 10 to 20 thousand range). When I change those numbers the camera looks good for about 1 second, then the numbers revert back to what they were (or close to what they were, sometimes it's a little different number).

1) open settings window
2) brightness says (for example) 20000
3) type 10000, hit save
4) picture looks good for 1 second, then brightness number changes to 19673 (for example)
5) picture is crappy again.

It's like something else is changing the numbers back to what they were. Is there some way I can force those brightness/contrast settings to stay as what I set them to be?

OS is Ubuntu Feisty, install was from a tarball (ZoneMinder-1.22.3.tar.gz).

Thanks![/url]

Posted: Tue Jun 05, 2007 7:58 pm
by Telemann
Further reading in this forum and elsewhere tells me that zm is probably being over-ridden by the camera drivers.

Unfortunately I have no idea how to set driver settings. I'm pretty sure this camera uses the gspvav1 driver, and that that driver is installed via modprobe...

Does any kind soul out there have experience with camera drivers?

Getting closer....

Posted: Wed Jun 06, 2007 4:54 pm
by Telemann
I'll keep posting stuff as I figure it out here in hopes it will help someone else some day.

I found some posts on various forums that suggest that the quickcam chat performs better with this line added to /etc/modprobe.conf
options gspca autoexpo=1 usbgrabber=0 lightfreq=50 GRed=256 GBlue=350 GGreen=256 gamma=4
("sudo update-modules" to load it)

Ubuntu doesn't use modprobe.conf, instead I placed the line in /etc/modprobe.d/gspca.modprobe which seems to have worked in that doing one of these
modprobe -c | grep "options gspca"
returns the config line in question.

Setting autoexpo=0 seems to allow me to set the brightness via zm, but I still don't have control of the contrast.

I can't for the life of me find a list of configuration options. I need something like "stopAutomaticallyChangingTheContrast=1".

Is there some way to get modprobe to dump all the legal config options for a module? I haven't found anything in the man pages yet...

Posted: Fri Jun 22, 2007 3:29 am
by untg99
You could possible try set4vl, although I'm having the same problem and it didn't fix mine (I have a Logitech QuickCam Communicate STX).

http://members.chello.nl/~j.vreeken/setv4l/

Just make it and run it, my output was...

root@media:/tmp/setv4l-0.3# ./setv4l /dev/video0 brightness 12000 contrast 12000
device: /dev/video0 name: Logitech QuickCam Communicate S
capabilities: CAPTURE
min-size: 176x144 max-size: 640x480 channels: 1 audios: 0
brightness: 32768 hue: 0 colour: 0 contrast: 32768
whiteness: 0 depth: 24 palette: 4

But it failed to set the contrast and bightness at all.

Drivers

Posted: Sat Jun 23, 2007 3:16 pm
by Telemann
I'm mostly sure the problem is at the driver level. I think it could be fixed in modprobe.conf if I only knew what the available options were.

I think programs like this actually do change the brightness/contrast for a short time, but the driver changes it right back.

Re: Getting closer....

Posted: Thu Jun 28, 2007 9:13 pm
by tuxick
Telemann wrote: Is there some way to get modprobe to dump all the legal config options for a module? I haven't found anything in the man pages yet...

Code: Select all

modinfo gspca
, on this debian box i needed to provide full path to the module though.

Posted: Sun Jul 01, 2007 6:17 pm
by Telemann
Thanks a ton! (Its always obvious after someone tells you.)

Here is the relevant bit. It lookes like autoexpo is what I want, but I've already set that to zero. I'm thinking my problem is here:
(PC-CAM 600/Zc03xx/spca561a/Etoms Only !!!)

I may be out of luck with this camera.

parm: autoexpo:Enable/Disable auto exposure (default=1: enabled) (PC-CAM 600/Zc03xx/spca561a/Etoms Only !!!) (int)
parm: debug:Debug level: 0=none, 1=init/detection, 2=warning, 3=config/control, 4=function call, 5=max (int)
parm: force_rgb:Read RGB instead of BGR (int)
parm: gamma:gamma setting range 0 to 7 3-> gamma=1 (int)
parm: OffRed:OffRed setting range -128 to 128 (int)
parm: OffBlue:OffBlue setting range -128 to 128 (int)
parm: OffGreen:OffGreen setting range -128 to 128 (int)
parm: GRed:Gain Red setting range 0 to 512 /256 (int)
parm: GBlue:Gain Blue setting range 0 to 512 /256 (int)
parm: GGreen:Gain Green setting range 0 to 512 /256 (int)
parm: compress:Turn on/off compression (not functional yet) (int)
parm: usbgrabber:Is a usb grabber 0x0733:0x0430 ? (default 1) (int)
parm: lightfreq:Light frequency banding filter. Set to 50 or 60 Hz, or zero to NoFliker (default=50) (int)

More brightness..

Posted: Wed Jul 18, 2007 1:53 pm
by tuxick
I'm using Logitech Quickcam Express blah blah, USB id 0x92F, with gspca driver, and here too the brightness settings get changed back to bad.
ZM does seem to do some autobrightness, but a poor job at it. I'm getting much better results using xawtv, so IMO you can't really blame the driver.
Especially since the driver doesn't do autoexposure for this camera, which i verified: disabling/enabling it in options didn't make any difference.
Sadly i have no idea where to look in code or hopefully configuration.

Posted: Wed Jul 18, 2007 2:23 pm
by Telemann
Good to know, thanks!

I've since replaced the quickcam chat with a quickcam pro 4000 because i couldn't leave the camera out of commission too long. I'd still like to know what the answer was though :)

Posted: Wed Aug 22, 2007 11:11 am
by tuxick
So getting another/better camera solves the problem?

the same problem

Posted: Tue Dec 18, 2007 1:45 am
by jaromrax
logitech - ID 046d:092f Logitech, Inc.

average, worked fine some hours, but suddenly started to do problems
with brightness contrast.
With mplayer I set b/c ok and it is perfect. Not with zm v1.22.3

I am desperate -
- several hours I solved not-running zm (the program is very complicated
and manual concentrates on web interface = hard to debug), finaly I passed thru.
Selinux + debug statement in Debug.pm.

Now I am out of forces, getting crazy.

thanks

Posted: Tue Dec 18, 2007 8:36 am
by jaromrax
i tried to change the values in 'settings' - they dont change on display :( but the database changes.

So far I found that brightness has almost no influence !!!
and everything must be tuned with contrast. Not nice.

When using v4l i put brightness -5 and contrast -75
but here the negative values dont work.

Actualy - it switches in 2 steps - 1st picture is better, the other goes worse.
Like the program switched 1st brightness
and then 2nd contrast with the brightness reset to 0 or whatever


help?

Posted: Tue Dec 18, 2007 10:45 am
by jameswilson
This is usually because the webcam driver doesnt accept the settings when zm tries to alter the contrast. You may have a setting elsewhere for that cam, but i dont belive its under zm's control