Changing brightness / contrast at specific time of day

Forum for questions and support relating to the 1.25.x releases only.
Post Reply
Posts: 46
Joined: Wed Feb 06, 2013 1:50 pm

Changing brightness / contrast at specific time of day

Post by axelm » Wed Feb 06, 2013 2:09 pm


I am setting up a surveillance system for my home based on ZM 1.25 on Fedora 18. The capture card I am using is a GV600 with a single BT878a, but it will soon be replaced by two Kodicom 4400R so I have a total of eight BT878a chips, one for each camera I plan to use for this home installation. Multiplexed 2FPS image is unacceptable in 2013 and the two 4400R cards only cost me 25 dollars each, used with shipping included. Pretty cheap considering the rip off prices of electronics in Argentina. IP cameras with decent sensors and lenses cost an arm and a leg here, so I am settling for average analog cameras for the next 2-3 years until the price goes down.

At my front porch I installed a Nixzen analog dome 600 TVL Sony SuperHAD II CCD with 30 5mm IR LEDs. The image is decent during daytime, but at night it is way overexposed. I would love to be able to turn on only half the IR LEDs or to diffuse them a bit. The IR lighting is way too strong in the center of the image.

I have tried playing with the ZM brightness and contrast settings during nighttime and the image gets considerably better. Is there a way to change these settings automatically at at certain time? Maybe a daily cron job?

Thanks in advance,

Posts: 25
Joined: Sat Dec 04, 2010 5:21 pm

Re: Changing brightness / contrast at specific time of day

Post by mythedoff » Wed Feb 06, 2013 5:51 pm

I have two cron jobs, one for morning and the other for evening which I manually alter throughout the year to adjust for sunrise/sunset. The cron jobs run or which contain the commands to adjust a webcam and a cctv cam but no adjustments for a ip cam.

The scripts use v4l2-ctl and adjustments are going to depend on the camera model. More adjustments can be made to the webcam. The adjustments are most noticeable at dawn and dusk but not much help at night. I don't recall the package needed that v4l2-ctl is part of but it will be need to be installed.

To get started from a command line:

Code: Select all

v4l2-ctl -l -d /dev/video0
will return paramaters that can be adjusted with their current and default values.

As an example I have in my

Code: Select all

# webcam
v4l2-ctl -d /dev/video0 -c contrast=24
v4l2-ctl -d /dev/video0 -c brightness=80
v4l2-ctl -d /dev/video0 -c exposure_auto=3
v4l2-ctl -d /dev/video0 -c gain=0

# clover cam
v4l2-ctl -d /dev/video1 -c brightness=125
and my

Code: Select all

# webcam
v4l2-ctl -d /dev/video0 -c contrast=40
v4l2-ctl -d /dev/video0 -c exposure_auto=1
v4l2-ctl -d /dev/video0 -c exposure_absolute=1
v4l2-ctl -d /dev/video0 -c brightness=150
v4l2-ctl -d /dev/video0 -c gain=255

# clover cam
v4l2-ctl -d /dev/video1 -c brightness=150
Perhaps you will be able to make adjustments suitable for your daytime conditions.

Posts: 46
Joined: Wed Feb 06, 2013 1:50 pm

Re: Changing brightness / contrast at specific time of day

Post by axelm » Fri Feb 08, 2013 1:17 pm

Thanks for the help. I'll try your suggestion.

Btw, I got the two Kodicom 4400R cards yesterday and now I have reasonable FPS in all the cameras. Took a while to figure out which device + input to use. I ended up with this setup:

/dev/video0 (0)
/dev/video1 (1)
/dev/video2 (2)
/dev/video3 (3)
/dev/video4 (0)
/dev/video5 (1)
/dev/video6 (2)
/dev/video7 (3)

I am going to need chipset heatsinks because the cards are getting pretty hot with 4 bt878a chips on each board.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests