Page 1 of 1

Can't set Brightness, Contrast, Hue and Colour

Posted: Fri Jul 01, 2005 9:07 pm
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?

Posted: Fri Jul 01, 2005 9:27 pm
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.

Posted: Fri Jul 01, 2005 9:39 pm
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

Posted: Sat Jul 02, 2005 12:12 am
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

Posted: Sat Jul 02, 2005 7:13 pm
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?

Posted: Sat Jul 02, 2005 7:42 pm
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.

Posted: Sun Jul 03, 2005 11:53 am
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]

Posted: Wed Jul 06, 2005 3:45 pm
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

Posted: Sun Jul 17, 2005 1:24 pm
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!

Posted: Sun Jul 17, 2005 7:30 pm
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

Posted: Sun Jul 17, 2005 7:39 pm
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!