Calendar

September 2018
M T W T F S S
« Feb    
 12
3456789
10111213141516
17181920212223
24252627282930

Categories

Active supporter of WikiPedia
Support Wikipedia

Geocaching

Profile for uwezi

Setting up webcam exposure under linux

I had some problems with fswebcam to set the automatic exposure. The exact way how to enter certain parameters is not clear from the lacking documentation, but it works fine if you set parameters through another command line tool.

This is the script behind BirdCam:

#!/bin/bash

DATE=$(date +"%Y-%m-%d_%H%M")

v4l2-ctl -c exposure_auto=1
v4l2-ctl -c gamma=5
v4l2-ctl -c brightness=128
v4l2-ctl -c contrast=67
v4l2-ctl -c exposure_auto=2

fswebcam -c fswebcam.cfg /var/tmp/image.jpg
curl -T /var/tmp/image.jpg -u <username>:<password> ftp://<ftp-server address>/<directory>/$DATE.jpg

At least I thought so, but suddenly and without any intervention the exposure settings stopped working again. Everything was fine until 14:50 local time
2016-04-11_1250
but a minute later the camera captured this image and continued to do so…
2016-04-11_1251

Is this a problem of the particular webcam I am using? I don’t know.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>