Can't set Brightness, Contrast, Hue and Colour

Support and queries relating to all previous versions of ZoneMinder
Locked
semotta
Posts: 20
Joined: Wed Jun 29, 2005 11:39 pm
Location: Sao Paulo, Brazil

Can't set Brightness, Contrast, Hue and Colour

Post by semotta »

I'm using ZM 1.21.2 on FC3. Card is bt878 (4 input) unnamed (!) with options bttv card=77.

Opening a Configuration window (from any Monitor) gives me strange values, like:
Brightness=-1, Contrast=-1, Hue=29660 and Colour=-1.

Then I change the values to something more logical, like
Brightness=20000, Contrast=20000, Hue=20000 and Colour=20000.

Clicking on "save" button reloads configuration window with the following values:
Brightness=20000, Contrast=-1, Hue=-1 and Colour=20000.

Now changing only contrast=15000, windows reloads with the same old values:
Brightness=20000, Contrast=-1, Hue=-1 and Colour=20000.

Let's try to change Brightness=30000. What do we have?
Brightness=-1, Contrast=-1, Hue=29660 and Colour=-1. (!!!!!!)

I know I have to set all 4 inputs with same values, but how can I do that if values
I type don't remain? Am I missing something?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

you definetly have a problem mate. I can change the values on mine and it saves. I will have a look where it saves it to and report back hopefully someone better than me will just know.
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

If all else fails, you can try setting the values before you start zoneminder something like this (assuming you have xawtv installed):

Code: Select all

v4lctl -c /dev/video0
v4lctl list
v4lctl bright 40%
v4lctl contrast 35%
v4lctl color 60%
v4lctl list
Rick Hewett
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Is this a RPM Version or installed from source.
Also the settings can be set in the database in the Monitors table and the default is -1.
I checked both of my servers and the settings function on both.
Check your error logs most likely find something in the apache error log after tring to save diff settings might yeild a clue. If this is the RPM from my site you might want to get the new update I put on the ftp/yum server 1.21.2-2
Regards,
Cordel
semotta
Posts: 20
Joined: Wed Jun 29, 2005 11:39 pm
Location: Sao Paulo, Brazil

Post by semotta »

cordel wrote:Is this a RPM Version or installed from source.
It's installed from source;
cordel wrote:Also the settings can be set in the database in the Monitors table and the default is -1.
Ok, that works, but... not a beautiful solution.
cordel wrote: Check your error logs most likely find something in the apache error log after tring to save diff settings might yeild a clue.
Nothing unusual on /var/log/zm/*log. Apache access logs shows the following:

GET /index.php?view=settings&mid=1 HTTP/1.1" 200 1732

After loading configuration window. Setting Brightness=20000, Contrast=20000,
Hue=20000 and Colour=20000:

POST /index.php HTTP/1.1" 200 1729

But configuration window reloads with Brightness=-1, Contrast=20000,
Hue=-1 and Colour=-1. Setting Brightness=15000, Contrast=15000,
Hue=15000 and Colour=15000:

POST /index.php HTTP/1.1" 200 1732

And configuration window reloads with Brightness=15000, Contrast=-1,
Hue=-1 and Colour=15000.

Are the 4 values "coded" on this "1732"? Now the really strange part:

mysql> select Brightness,Contrast,Hue,Colour from Monitors where Id='1';

Shows:
+------------------+---------------+-------+------------+
| Brightness | Contrast | Hue | Colour |
+------------------+--------------+--------+---------- +
| -1 | 15000 | -1 | -1 |
+------------------+--------------+--------+-----------+

How can I increase Mysql debug level to see if ZM is sending right commands?
semotta
Posts: 20
Joined: Wed Jun 29, 2005 11:39 pm
Location: Sao Paulo, Brazil

Post by semotta »

lazyleopard wrote:If all else fails, you can try setting the values before you start zoneminder something like this (assuming you have xawtv installed):

Code: Select all

v4lctl -c /dev/video0
v4lctl list
v4lctl bright 40%
v4lctl contrast 35%
v4lctl color 60%
v4lctl list
Well, thanks, that was easier than updating mysql. Still searching what's
wrong with my ZM.
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

I think this can be a problem if the card is one of those that share one BT8x8 between several input channels. I just checked my set-up, and it's showing -1 against Contrast and Colour on all the inputs on Video0, but is showing everything just fine on Video1. The database has sane values:

Code: Select all

mysql> select Brightness,Contrast,Hue,Colour from Monitors where Id="5";
+------------+----------+-------+--------+
| Brightness | Contrast | Hue   | Colour |
+------------+----------+-------+--------+
|      27524 |    22937 | 32768 |  39321 |
+------------+----------+-------+--------+
1 row in set (0.00 sec)
but the settings window shows -1 for Contrast and Colour. (zm-1.21.2, btw)[/code]
Rick Hewett
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

The values shown in the dialog box are what bttv has reported to ZM. Not every bit of hardware seems to work with the colour, brightness options etc as some seem to have the management of them set to automatic. It depends on the driver whether you can disable this or not.

You can use zmu directly to query and set these if you want to experiment without the hassle of using the web box.

Phil
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Post by philipt »

Did you find an answer to this? My problem is similar, and I'm pretty sure it's something to do with the bttv driver and not zoneminder. Scenario is :

Brooktree 878 cards : card=77 with no tuner. (Grantec Multi-capture cards).

2 cards in the machine, 6 cameras. 1st card has 4 B&W cameras and I can set brightness, contrast, colour and hue no problem, although the settings are set once for all 4 ports. All fine there.

Second card has 2 cameras which are colour. I try to set the 4 parameters all to 32768 but one sets and the other three revert to -1. The same happens regardless of whether I set the cameras to grey or the RGB24.

I really need to change the setting as the colour cameras give a dark image which needs lightening up a bit - in either colour or B&W.

Any thoughts welcome!
Philip
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Did you configure the cards in modprobe or did it auto detect?
If you added card=77 for two cards it should br card=77,77
Regards,
Cordel
Image
Image
3939663646337

It's better to keep your mouth shut and appear stupid than open it and remove all doubt.
-Mark Twain
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Post by philipt »

I've tried manually configuring the cards in modporbe.conf and using YAST, the SUSE set-up tool. Cards are configured as you say - 77,77 and tuner 4,4. The first card behaves fine and the second doesn't. When I had 3 cards in, the third one wouldn't work at all - I wonder if it's a limitation of resources somewhere - but it's very frustrating!

Thanks for the idea, anyway!
Philip
Locked