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
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
but a minute later the camera captured this image and continued to do so…
Is this a problem of the particular webcam I am using? I don’t know.
Latest Comments