Skip to content

Instantly share code, notes, and snippets.

@bjackerman
Created August 19, 2022 06:34
Show Gist options
  • Save bjackerman/389ca23bce1841402b50f522def98deb to your computer and use it in GitHub Desktop.
Save bjackerman/389ca23bce1841402b50f522def98deb to your computer and use it in GitHub Desktop.
Take a picture using the attached USB webcam in full 1080 resolution, exposing and averaging 10 shots to get more light in my dime office, names file the timestamp and if taking multiple per minute, add a counter $1
#!/bin/bash
DATE=$(date +"%Y-%m-%d_%H%M")
if [ -z "$1" ]
then
fswebcam -S 20 -F 10 -r 1920x1080 --no-banner /home/brian/webcam/$DATE.jpg
fi
if ["$1" ]
then
fswebcam -S 20 -F 10 -r 1920x1080 --no-banner /home/brian/webcam/$DATE$1.jpg
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment