Raspberry Pi client for the Tidskott video streaming system.
Tidskott Pi is a minimal Raspberry Pi client that captures video from the Raspberry Pi camera, maintains a rolling buffer of the most recent video frames, and uploads snapshots to a remote server.
Warning
- Wire dependencies
- Tests
- CI Pipeline
- Secure HTTP Snapshots (Triggering mechanism)
- Observability (Grafana/Prometheus integration)
# build for raspberry pi
make build-pi
# build for local development
make build# run with default configuration
./bin/tidskott-pi
# or, with custom config
./bin/tidskott-pi --config /path/to/config.tomlThe client uses a single configuration file named config.toml in the current directory. Use --config to point to a different file.
| Section | Option | Description | Default |
|---|---|---|---|
| device | id | Device identifier | "tidskott-pi-device" |
| device | name | Human-readable device name | "tidskott Pi Camera" |
| camera | width | Frame width in pixels | 1920 |
| camera | height | Frame height in pixels | 1080 |
| camera | fps | Frames per second | 30 |
| camera | bitrate | Target bitrate in bits per second | 25000000 |
| camera | codec | Video codec | "libx265" |
| buffer | window_seconds | Rolling window size in seconds (5-60) | 30 |
| buffer | snapshot_duration | Snapshot duration in seconds | 5 |
| buffer | snapshot_interval | Interval between snapshots in seconds | 5 |
| upload | endpoint | Server endpoint for uploads | "http://localhost:8080/upload" |
| upload | max_retries | Maximum retry attempts for failed uploads | 3 |
| upload | max_concurrent | Maximum concurrent uploads | 2 |
| upload | delete_after_upload | Delete snapshots after successful upload | true |
| auth | enabled | Enable authentication | false |
| auth | endpoint | Authentication endpoint | "/auth/token" |
| auth | client_id | Client ID for authentication | "tidskott-client" |
| auth | client_secret | Client secret for authentication | "tidskott-secret" |
The Raspberry PI client consists of:
- camera source: built-in Raspberry Pi camera support using
rpicam-vid - video buffer: maintains a rolling window of video frames using
tidskott-core - snapshot generator: extracts video segments from the buffer on demand
- uploader: uploads snapshots to a remote server using
tidskott-uploader
- hardware:
- raspberry pi with camera module (for raspberry pi)
- built-in or usb camera (for macos)
- software:
rpicam-vid(raspberry pi camera utility, for raspberry pi only)ffmpeg(for macos camera support)tidskott-core(core video buffering library)tidskott-uploader(snapshot uploader)
To use tidskott-pi on macOS for local development:
-
Install FFmpeg with
avfoundationsupport:brew install ffmpeg
-
Grant camera permissions to your terminal app in: System Preferences > Security & Privacy > Camera.
-
Run
tidskott-pi:./bin/tidskott-pi