still2cloud

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2025 License: BSD-3-Clause Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

still2cloud

Go Report Card

Take a still picture from IP camera and upload to Amazon S3 or S3-compatible object storages.

Download

See Releases page.

Usage

Run executable binary:

./still2cloud -c config.json

Run with Golang toolchain:

go run . -c config.json

Build executable binary:

make build

Sources

HTTP

No authentication

Example configuration:

{
  "src": {
    "type": "http",
    "url": "http://192.168.1.100:81/snapshot.cgi?user=username&pwd=password"
  },
  "dest": {
  }
}
Basic authentication

Example configuration:

{
  "src": {
    "type": "http",
    "url": "http://192.168.1.100:81/snapshot.cgi",
    "auth": "basic",
    "user": "username",
    "password": "password"
  },
  "dest": {
  }
}
Digest authentication

Example configuration for HikVision IP cameras:

{
  "src": {
    "type": "http",
    "url": "http://192.168.1.100/ISAPI/Streaming/channels/101/picture",
    "auth": "digest",
    "user": "username",
    "password": "password"
  },
  "dest": {
  }
}

File

Example configuration:

{
  "src": {
    "type": "file",
    "path": "snapshot.jpg"
  },
  "dest": {
  }
}

RTSP

Example configuration:

{
  "src": {
    "type": "rtsp",
    "url": "rtsp://user:password@192.168.1.100:554/channel1",
    "path": "tmp.jpg"
  },
  "dest": {
  }
}

NOTE: RTSP option requires ffmpeg command.

Raspberry Pi Camera

Example configuration:

{
  "src": {
    "type": "rpi",
    "path": "tmp.jpg"
  },
  "dest": {
  }
}

NOTE: RPi option requires rpicam-jpeg command.

Destinations

Amazon S3

Example configuration for Cloudflare R2:

{
  "src": {
  },
  "dest": {
    "type": "s3",
    "endpoint": "https://xxx.r2.cloudflarestorage.com",
    "bucket": "bucket",
    "path_layout": "still/location-a/camera-1/20060102-150405.jpg",
    "layout_mode": 2,
    "region": "auto",
    "access_key_id": "xxx",
    "secret_access_key": "xxx",
    "create_latest_file": true,
    "latest_file_path": "still/location-a/camera-1/latest.txt"
  }
}

path_layout allows Golang's time layout (20060102-150405 means yyyyMMdd-HHmmss). You can disable with layout_mode to 1 (0: apply to full path, 2: apply to file name).

File

Example configuration:

{
  "src": {
  },
  "dest": {
    "type": "file",
    "path_layout": "snapshot-20060102-150405.jpg"
  }
}

path_layout allows Golang's time layout (20060102-150405 means yyyyMMdd-HHmmss). You can disable with layout_mode to 1 (0: apply to full path, 2: apply to file name).

Converting

The converting (formatting and resizing) feature is currently under development.

License

BSD 3-clause

Author

mikan

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址