I have been idly attempting to get a utility to grab a frame from my laptop webcam (an Acer Crystal Eye).
Whilst the webcam works fine with the likes of Cheese, the act of perfoming an automated grab with the likes of CamE was unsuccessful. There is, I believe a problem with CamE, Ubuntu, the web cam and V4l2 working in harmony.
After trawling through the repositories, I finally found fswebcam which worked a treat.
sudo apt-get install fswebcam
In your home directory, create a file .fswc.conf
title "Prawn Cam"
timestamp "%d-%m-%Y %H:%M:%S (%Z)"
To demonstrate the flexibility of fswebcam, I generated a shell script to save a time-stamped file and copy the time-stamped file to another machine using scp.
if [ ! -d $TARGET_DIR ]; then
fswebcam -c $CONFIG_FILE --save $FILE_NAME
scp $FILE_NAME $OFFSITE_DIR/$FILE_NAME
That's it. Setup crontab to run the task as frequently as you wish.
crontab -eWill run the task every minute. (A little extreme, perhaps).
*/1 * * * * /usr/local/bin/webcap.sh