- Python 85.3%
- HTML 11.5%
- Just 2.4%
- Dockerfile 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
/ pr-review (push) Has been skipped
/ pr-review (release) Has been skipped
/ gitleaks (push) Successful in 24s
/ gitleaks (release) Successful in 16s
/ checks (push) Successful in 2m13s
/ publish (push) Has been skipped
/ publish-container (push) Has been skipped
/ checks (release) Successful in 2m4s
/ deploy-docs (release) Has been skipped
/ publish (release) Successful in 36s
/ publish-container (release) Successful in 3m1s
/ deploy-docs (push) Successful in 1m11s
|
||
| .forgejo/workflows | ||
| docs | ||
| icon | ||
| src/cang | ||
| tests | ||
| .containerignore | ||
| .editorconfig | ||
| .gitignore | ||
| .gitleaks.toml | ||
| .pre-commit-config.yaml | ||
| AGENTS.md | ||
| AI-DECLARATION.md | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| compose.yaml | ||
| Containerfile | ||
| docs_hooks.py | ||
| justfile | ||
| LICENCE | ||
| LICENSE.md | ||
| mkdocs.yml | ||
| noxfile.py | ||
| pylock.toml | ||
| pyproject.toml | ||
| README.md | ||
| Release-Notes.md | ||
| Release-Notes.md.template | ||
| ruff.toml | ||
| uv.lock | ||
Cang (藏) — Snapshot Archiver for IP Cameras
Cang (藏, cáng, roughly "tsang" with a rising tone) — Chinese for "to store / to archive". Secondary meaning: "hidden", quietly apt for security footage. The name reflects the project's philosophy: cameras do all the clever work; Cang just keeps what they send.
A lightweight snapshot archiver for IP cameras. Cameras handle motion detection and object recognition themselves, deposit snapshot images into watched folders, and Cang indexes, groups, and serves them through a clean FastAPI web UI.
Inspired by LazyNVR, written in Python.
What it does
- Watches camera directories for snapshot JPEGs deposited by cameras
- Ingests all snapshots into SQLite with motion-event metadata
- Groups consecutive motion snapshots into events using a configurable time-gap threshold (60 s)
- Applies tiered retention: motion snapshots (default 30 days), background snapshots (14 days) — both configurable
- Serves a FastAPI + Jinja2 web UI with a scrubber for browsing snapshots by day and camera
- Runs anywhere Python is available; can also be deployed in a container
What it does not do
- No RTSP / live-stream pulling
- No video clip processing or storage
- No multi-user roles or cloud sync
Status
Late beta — core functionality (Dahua adapter, snapshot ingestion, event grouping, tiered retention, web UI) is working. See the documentation for installation and configuration.
Licence
Copyright (C) 2026 Marvin8
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
See LICENCE for the full text.