Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meinside/rpi-camera-timelapse-go
Timelapse image capture daemon for Raspberry Pi Camera Module, built with Go
https://github.com/meinside/rpi-camera-timelapse-go
golang raspberry-pi raspberry-pi-camera
Last synced: 6 days ago
JSON representation
Timelapse image capture daemon for Raspberry Pi Camera Module, built with Go
- Host: GitHub
- URL: https://github.com/meinside/rpi-camera-timelapse-go
- Owner: meinside
- Created: 2016-07-12T06:00:01.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-17T23:46:39.000Z (7 months ago)
- Last Synced: 2024-09-23T23:30:55.743Z (10 days ago)
- Topics: golang, raspberry-pi, raspberry-pi-camera
- Language: Go
- Size: 84 KB
- Stars: 10
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Raspberry Pi: Timelapse Camera Daemon
## 0. What is it for?
It is for capturing images with some interval, using Raspberry Pi Camera Module.
These captured images can be used as each frame of a timelapse video.
## 1. What do I need before running it?
You need:
* Raspberry Pi
* Raspberry Pi Camera Module enabled, and its cable correctly connected
* [golang installed on Raspberry Pi](https://github.com/meinside/dotfiles/blob/master/bin/install_go.sh)
* and this README.md.## 2. How can I configure it?
You need to create your own config file.
Sample file is included, so feel free to copy it and change values as you want.
```bash
$ cp config.json.sample config.json
$ vi config.json
```You can configure it to save files locally, send via SMTP, upload to Dropbox or S3 like this:
```json
"storages": [
{
"type": "local",
"path": "/home/meinside/photos/timelapse"
},
{
"type": "smtp",
"smtp_recipients": "[email protected],[email protected]",
"smtp_email": "[email protected]",
"smtp_passwd": "sender-email-password",
"smtp_server": "sender.smtp-server.com:587"
},
{
"type": "dropbox",
"path": "/timelapse",
"dropbox_token": "Tttttttt_oOOOOOOO-kkkkkkkk-eeeeeee_NNNNNNNN"
},
{
"type": "s3",
"path": "/optional/directory/in/bucket",
"s3_bucket": "my-s3-bucket-name"
}
]
```When not needed, just remove the unwanted one from __storages__.
## 3. How can I build it?
### A. Manually
```bash
$ go get -d github.com/meinside/rpi-camera-timelapse-go
$ cd $GOPATH/src/github.com/meinside/rpi-camera-timelapse-go
$ go build
```### B. With docker-compose
#### a. Raspberry Pi 3B, 3B+, 4B
```bash
$ docker-compose build
```#### b. Raspberry Pi 2
```bash
$ docker-compose build --build-arg RPI=raspberry-pi2
```#### c. Raspberry Pi B / Zero
```bash
$ docker-compose build --build-arg RPI=raspberry-pi
```## 4. How can I run it?
### A. Manually
Just execute the compiled binary:
```bash
$ ./rpi-camera-timelapse-go
```If nothing goes wrong, images will be captured and stored periodically as you configured.
### B. With docker-compose
```bash
$ docker-compose up
```## 4. How can I run it as a service?
### A. With systemd
```bash
$ sudo cp systemd/rpi-camera-timelapse-go.service /etc/systemd/system/
$ sudo vi /etc/systemd/system/rpi-camera-timelapse-go.service
```and edit **User**, **Group**, **WorkingDirectory**, and **ExecStart** values.
You can simply start/stop it with:
```
$ sudo systemctl start rpi-camera-timelapse-go.service
$ sudo systemctl stop rpi-camera-timelapse-go.service
```If you want to launch it automatically on boot:
```bash
$ sudo systemctl enable rpi-camera-timelapse-go.service
```### B. With docker-compose
```bash
$ docker-compose up -d
```## 5. How do I merge captured images to a timelapse video?
Use ffmpeg:
```bash
$ ffmpeg -framerate 30 -pattern_type glob -i '*.jpg' -c:v libx264 timelapse.mp4
```## 998. Any trouble?
Please open an issue.
## 999. License?
MIT