A tool for processing video files using opencv numpy matplotlib vidgear pyffmpeg moviepy and vidgear.
Project description
FFTrix
FFTrix is a high-performance video surveillance and analysis platform utilizing classical Computer Vision (CV) and pattern recognition techniques for real-time monitoring and event detection.
Features
- Real-time Monitoring: Multi-camera streaming with low-latency processing via
vidgear. - Classical CV Analytics:
- Motion Detection: Background subtraction using the MOG2 (Mixture of Gaussians) algorithm.
- Person Detection: Histogram of Oriented Gradients (HOG) with Linear SVM.
- Face Detection: Local Binary Patterns (LBP) and Haar Feature-based Cascade Classifiers.
- LPR (License Plate Recognition): Morphology-based plate localization combined with Tesseract OCR.
- Zone Monitoring: User-defined exclusion and inclusion zones for targeted event triggering.
- 24/7 Recording: Continuous background recording with automatic retention management.
- Interactive Dashboard: Modern web-based interface built with NiceGUI for camera management, live viewing, and event playback.
- Automated Alerts: Event-driven notifications via Email (SMTP) and JSON Webhooks.
- PTZ & Discovery: ONVIF-compatible device discovery and Pan-Tilt-Zoom control.
- Privacy Controls: Dynamic privacy masking with Gaussian blurring.
Architecture
FFTrix is built on a "Classic CV" architecture, prioritizing deterministic behavior and low resource overhead:
- Vision Engine: Pure OpenCV-based pipeline (no GPU/Deep Learning dependencies).
- OCR Engine: Tesseract (via
pytesseract) for text and plate recognition. - Database: SQLite for configuration, user management, and event logging.
- GUI: NiceGUI (FastAPI + Vue.js + Quasar) for a responsive management interface.
Installation
FFTrix can be installed directly from PyPI:
pip install fftrix
Or using uv as a tool:
uv tool install fftrix
Prerequisites
- Python 3.14 or higher.
- Tesseract OCR: Required for LPR and OCR features. Install it via your system package manager (e.g.,
apt install tesseract-ocrorbrew install tesseract). - Docker (for secure deployment): NOTE: Although you can replicate the deployment process without Docker, it will not be supported by me or anyone else from my team.
- ngrok: Can be implemented for remote access. While not officially supported, you can contact the developer for guidance.
Quick Start
Launch the FFTrix surveillance server:
fftrix serve --ui
The dashboard will be available at http://localhost:8080.
Default Credentials
- Username:
admin - Password:
admin(Note: A password change is required upon first login)
CLI Usage
FFTrix includes a Click-based CLI for server control and user management.
# Start headless server (no local browser launch)
fftrix serve --no-ui # ***NOTE: The UI is REQUIRED for configuration of watermarking and zone configuration but once configured the server can be run headless***
# Provision a new operator
fftrix user add <username> --role [admin|viewer]
# Emergency reset (wipes all users, restores admin:admin)
fftrix user reset-admin
Configuration
Configure the notification engine via environment variables:
| Variable | Description |
|---|---|
FFTRIX_SMTP_HOST |
SMTP server address |
FFTRIX_SMTP_PORT |
SMTP port (e.g., 587) |
FFTRIX_SMTP_USER |
SMTP username |
FFTRIX_SMTP_PASSWORD |
SMTP password |
FFTRIX_ALERT_FROM |
Sender email address |
Tech Stack
Development
If you want to contribute to FFTrix start by forking the repository then checking the requirements listed in the CONTRIBUTING.md file.
# Clone the repository
git clone https://github.com/yourusername/fftrix.git
cd fftrix
# Sync dependencies using uv
uv sync
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fftrix-1.4.0.tar.gz.
File metadata
- Download URL: fftrix-1.4.0.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a98ba592f94ba82e95854cec321799c8ce5e7a0f832211779c4f3edcba1fb51
|
|
| MD5 |
12effe1becfd41bd6f8d5ff18793c2e9
|
|
| BLAKE2b-256 |
ccd61845ffe93f4af74fd9ed3d5efbe5e7d9890d68d239058d2bf44cee0ebe63
|
File details
Details for the file fftrix-1.4.0-py3-none-any.whl.
File metadata
- Download URL: fftrix-1.4.0-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dde76e7adeeca9caad71c94c64c3d66a5543e759bb55c8811ea47cd98da43f86
|
|
| MD5 |
3d9d2996b4c2b8c6b95b3e96d98493b6
|
|
| BLAKE2b-256 |
69da4d74e9a21a5589e0c8d2b94ab2446e2d2c79fe01ecd191db9a79e7d3473b
|