https://github.com/whomwah/pi-camera-capture
Deno script that takes captures and image, syncs to S3 and generates an time lapse movie.
https://github.com/whomwah/pi-camera-capture
deno
Last synced: 7 days ago
JSON representation
Deno script that takes captures and image, syncs to S3 and generates an time lapse movie.
- Host: GitHub
- URL: https://github.com/whomwah/pi-camera-capture
- Owner: whomwah
- Created: 2024-09-12T11:25:40.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-02-05T09:46:15.000Z (5 months ago)
- Last Synced: 2025-04-06T06:09:58.329Z (3 months ago)
- Topics: deno
- Language: TypeScript
- Homepage: https://stmaryswharf-webcam.deno.dev/
- Size: 882 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webcam
A collection of Deno programs that use a Raspberry Pi camera to take snapshots,
upload it to S3, and optiontionally create a time-lapse video with the results.- uses a
[Raspberry Pi 4 Model B](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/)
and
[Pi HQ Camera](https://www.raspberrypi.com/products/raspberry-pi-high-quality-camera/)
- uses `libcamera-still` to create a snapshot
- uses `convert` to annotate the snapshot with the current time
- uses `s3` to upload the snapshot to S3
- uses `ffmpeg` to create a time-lapse video## Usage
The idea is it runs via a cron job that runs at various times during the day.
```
0 10 * * * /home/webcam/_dev/webcam/webcam >> /var/log/webcam/webcam.log 2>&1
0 16 * * * /home/webcam/_dev/webcam/webcam >> /var/log/webcam/webcam.log 2>&1
*/5 * * * * /home/webcam/_dev/webcam/webcam-live >> /var/log/webcam/webcam-live.log 2>&1
```You can use this logrotate configuration to keep the log files in check if you
need.```
# /var/logrotate.d/webcam/var/log/webcam/webcam.log /var/log/webcam/webcam-live.log {
daily
rotate 7
compress
delaycompress
missingok
notifempty
create 644 webcam webcam
}
```You can though of course run it manually. Type `deno task` to see the available
tasks it can run. There are 4. The `build` tasks create an executable file you
can use with `cron` for ease.### webcam.ts
1. Takes photo
2. Adds a label
3. Uploads to S3
4. Optionally created TimeLapse movie### webcam-live.ts
1. Takes photo
2. Adds a label
3. Uploads to S3 and replaces previousCurrently running on a camera situated in the [Kyan office](https://kyan.com/)
of the development of the StMarys Wharf project.- https://stmaryswharf-webcam.deno.dev/
- https://www.youtube.com/playlist?list=PLLNZI-dmwJyj45BKexQVYLdbpj4xv_ZnB