Skip to main content

Lightweight NVR: watches folders, transcodes to H.264/MP4, serves a FastAPI web UI.

Project description

cang

Cang (藏) — Minimal Python Network Video Recorder

Licence: AGPL-3.0-or-later Status: Late beta Python 3.12+ Documentation Woodpecker CI

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 NVR that does as little as possible: cameras handle motion detection and object recognition themselves, deposit video clips and snapshot images into a watched folder, and Cang transcodes, indexes, and serves them through a clean web UI grouped by day and hour.

Inspired by LazyNVR, written in Python.

What it does

  • Watches incoming/<camera>/ directories for clips deposited by cameras
  • Transcodes to H.264/MP4 with -movflags +faststart (browser-seekable)
  • Indexes clips in SQLite: camera, timestamp, duration, thumbnail
  • Serves a FastAPI + Jinja2 web UI: day → hour view, click-to-play
  • Keeps clips marked as important; auto-expires the rest after configurable days
  • Runs anywhere Python is available; can also be deployed in a container

What it does not do

  • No RTSP / live-stream pulling
  • No motion detection or object recognition (delegated to cameras)
  • No multi-user roles or cloud sync

Status

Late beta — core functionality (Dahua adapter, transcode pipeline, 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cang-0.3.12.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cang-0.3.12-py3-none-any.whl (35.2 kB view details)

Uploaded Python 3

File details

Details for the file cang-0.3.12.tar.gz.

File metadata

  • Download URL: cang-0.3.12.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cang-0.3.12.tar.gz
Algorithm Hash digest
SHA256 89313858c6fe0122fd53b5fa0b9a94dfd239b168db2a1b6bb8a378a50624effb
MD5 2e669bdc0caee7bdce501425b7b59b93
BLAKE2b-256 27157081d5b3bd6c52bae0098f9342692c5311b93b93c8647d5618485476c527

See more details on using hashes here.

File details

Details for the file cang-0.3.12-py3-none-any.whl.

File metadata

  • Download URL: cang-0.3.12-py3-none-any.whl
  • Upload date:
  • Size: 35.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cang-0.3.12-py3-none-any.whl
Algorithm Hash digest
SHA256 8c2dbaeff00bd2389c6df14f954498d968d5389c5b8d07bd4ae08e69fd57317e
MD5 9c3dc8eddce404a6f229373a32408ef2
BLAKE2b-256 f9cb3b7eda3a45faf4f8ce4db4a588a5f933c84865041e7e98d0509f8334c2de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page