Compare commits

..

No commits in common. "f30b7837e8b87a36e1c2e042b61f0e6eeb8a1890" and "aacaa068b054b3ed8e806a60a7736c3bde15d999" have entirely different histories.

2 changed files with 1 additions and 31 deletions

View File

@ -1,30 +0,0 @@
# Linux Webcam Time Lapse Script
This is a simple set of scripts to easily capture images on a set interval using a webcam attached to a Linux machine. For my use case I have built and tested this on a Raspberry Pi 3 with a Logitech C90 1080p webcam.
## How it works
* This script depends on `fswebcam` and `rsync` to work. An image is captured with `fswebcam` and stored locally, then synced to a remote device (ie. NAS).
* Everything should be easily configurable from variables at the top of each file.
* The install script just copies the script files to an install directory of your choice and does `chmod +x` on them.
* Right now the script needs `root`/`sudo` permission as it syncs the files to a device that requires root for me. An adaptation of the script would negate the need for `root` permissions.
* `tl-control` creates a cron file in `/etc/cron.d` named `timelapse` with a job that runs `tl-capture` as root and redirects the output to `/var/log/timelapse.log`
## Explanation of Variables
#### `install.sh`
```
INSTALL_DIR -- Directory to install the script files to
FILE_LIST -- List of file names to be installed, shouldn't change unless you're modifying the script or names
```
#### `tl-control`
```
INSTALL_DIR -- Directory that the script files were installed to, must match install.sh
FILE_LIST -- List of file names installed as part of the script, must match install.sh
IMG_DIR -- Directory to save timelapse images to before syncing
SYNC_DES_PATH -- Complete path to sync destination directory
# Cron
CRON_DIR -- Complete path to your system's cron.d directory
CRON_FILE -- What to name the cron job file.
CRON_FREQUENCY -- Will get set by the script when starting a time lapse
CRON_LOG_PATH -- Complete path to output log location, including filename
CRON_JOB -- Text of the cron job, starting with the user, do not include frequency here
```

View File

@ -3,7 +3,7 @@
# Configuration Variables # Configuration Variables
INSTALL_DIR="/usr/local/bin" INSTALL_DIR="/usr/local/bin"
FILE_LIST=("tl-capture" "tl-control") FILE_LIST=("tl-capture" "tl-clean" "tl-control")
IMG_DIR="/tmp/TL" IMG_DIR="/tmp/TL"
SYNC_DES_PATH="/mnt/media/TL/to-process" SYNC_DES_PATH="/mnt/media/TL/to-process"
# Cron # Cron