Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/meinside/rpi-camera-timelapse-go

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/meinside/rpi-camera-timelapse-go

  • v0.1.3
  • Source
  • Go
  • Socket score

Version published
Created
Source

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
  • 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.

$ 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:

"storages": [
	{
		"type": "local",
		"path": "/home/meinside/photos/timelapse"
	},
	{
		"type": "smtp",
		"smtp_recipients": "recipient-email-address1@outlook.com,recipient-email-address2@yahoo.com",
		"smtp_email": "sender-email-address@email.com",
		"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

$ 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
$ docker-compose build
b. Raspberry Pi 2
$ docker-compose build --build-arg RPI=raspberry-pi2
c. Raspberry Pi B / Zero
$ docker-compose build --build-arg RPI=raspberry-pi

4. How can I run it?

A. Manually

Just execute the compiled binary:

$ ./rpi-camera-timelapse-go

If nothing goes wrong, images will be captured and stored periodically as you configured.

B. With docker-compose

$ docker-compose up

4. How can I run it as a service?

A. With systemd

$ 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:

$ sudo systemctl enable rpi-camera-timelapse-go.service

B. With docker-compose

$ docker-compose up -d

5. How do I merge captured images to a timelapse video?

Use ffmpeg:

$ ffmpeg -framerate 30 -pattern_type glob -i '*.jpg' -c:v libx264 timelapse.mp4

998. Any trouble?

Please open an issue.

999. License?

MIT

FAQs

Package last updated on 17 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc