Local Django web app for privacy redaction in YouTube videos. Originals never leave the workstation. Licensed MIT.
Current slice: project upload, SHA-256 + FFprobe metadata, model registry, allowlist scaffold, in-DB job queue, completed face analysis, manual draft review overrides, and final redaction export.
Blurrinator currently uses OpenCV-based face analysis, not Ultralytics YOLO.
- Django for the web app and admin-facing workflows.
- Django-Q2 for the local database-backed job queue.
- FFmpeg / FFprobe for video metadata, transcoding and browser-compatible exports.
- OpenCV with CUDA for YuNet face detection, SFace face embeddings and optional GPU blur operations.
- OpenCV Zoo YuNet weights registered as MIT licensed model artifacts.
- OpenCV Zoo SFace weights registered as Apache-2.0 licensed model artifacts.
- Pillow and NumPy for supporting image and array operations.
The model registry stores license, provenance, file path and SHA-256 hash for each downloaded model file.
Requires Python 3.12+ and ffmpeg / ffprobe on PATH. GPU (NVIDIA + CUDA) is required for YuNet/SFace inference. cv2 must come from a CUDA-enabled OpenCV build prepared on the host; installing stock opencv-python is not sufficient.
python -m venv venv
# Make sure a CUDA-enabled OpenCV Python build is already installed in this venv.
venv/bin/pip install -e .
venv/bin/python manage.py migrate
venv/bin/python manage.py createsuperuserTwo processes: web and worker. Open a terminal each:
venv/bin/python manage.py runserver 0.0.0.0:8000
venv/bin/python manage.py qclusterOpen http://localhost:8000/.
Environment variables (all optional):
| Variable | Default | Purpose |
|---|---|---|
BLURRINATOR_SECRET_KEY |
dev placeholder | Set before exposing publicly. |
BLURRINATOR_DEBUG |
1 |
Set to 0 for production-style serving. |
BLURRINATOR_ALLOWED_HOSTS |
* |
Comma-separated host list. |
BLURRINATOR_STORAGE_ROOT |
./storage |
Originals, exports and analysis artifacts. |
BLURRINATOR_MAX_UPLOAD_BYTES |
85899345920 (80 GiB) |
Hard upload ceiling. |
BLURRINATOR_FFPROBE_BINARY |
ffprobe |
Override if not on PATH. |
BLURRINATOR_FFMPEG_BINARY |
ffmpeg |
Override if not on PATH. |
BLURRINATOR_REQUIRE_GPU_PIPELINE |
1 |
Refuse analysis/export unless runtime has CUDA-ready OpenCV for GPU inference. |
This project now fails fast when the runtime is not actually ready for GPU inference. Having an NVIDIA card alone is not enough:
- OpenCV must expose CUDA devices (
cv2.cuda.getCudaEnabledDeviceCount() > 0)
FFmpeg hardware decode is optional in the current pipeline. Video decode can stay on CPU; the critical part is that YuNet/SFace inference runs through CUDA-enabled OpenCV.
Current limitation:
- Face analysis runs on OpenCV DNN CUDA when available.
- Final blur compositing uses GPU only when the OpenCV Python binding exposes
cv2.cuda.resizeandcv2.cuda.createGaussianFilter. - The export job log now reports which blur backend is actually used.
The local issue was caused by an OpenCV BUILD_LIST that included dnn and cudev, but omitted the CUDA image modules needed for blur. Rebuild with:
./scripts/rebuild_opencv_cuda.shThat script configures OpenCV from the checked-out sources under .build/ with:
BUILD_LIST=core,imgproc,imgcodecs,videoio,dnn,objdetect,python3,cudev,cudaarithm,cudafilters,cudaimgproc,cudawarpingWITH_CUDA=ONWITH_CUDNN=ONOPENCV_DNN_CUDA=ONWITH_GTK=OFF,WITH_GSTREAMER=OFF,WITH_QT=OFF,WITH_OPENGL=OFFto avoid GTK/GIO conflicts with Homebrew PythonCUDA_ARCH_BIN=9.0andCUDA_ARCH_PTX=9.0by default, so CUDA 12.0 can JIT PTX on newer Blackwell GPUs even thoughsm_120is not supported by that toolkit yet
The script also stages a repo-local cv2 package. This is intentional: the venv already contains a root-owned site-packages/cv2, so the project shadows it from the repo root instead of trying to overwrite it.
To validate the result without rebuilding:
./venv/bin/python scripts/validate_opencv_cuda.pyblurrinator/ Django project (settings, urls, context)
projects/ Project, SourceVideo, AnalysisJob, ExportJob + pipeline services
registry/ Model registry (license + hash bookkeeping)
allowlist/ AllowedPerson + EnrollmentImage
templates/ Hand-rolled UI templates
static/css/app.css Single CSS file, no build step
storage/ Local artifact tree (gitignored)
- Author: https://github.com/SmolinskiP
- Support: https://buymeacoffee.com/smolinskip
- Ashes Fireshow: https://ashes.pl - a fire arts collective creating precise, emotional shows built around light, movement and story. Ashes also runs workshops and performances for children and young people facing difficult circumstances.
- Daily Stoic PL: https://dailystoic.pl - a newsletter that sends Polish daily Stoic reflections inspired by Ryan Holiday's "The Daily Stoic".
Blurrinator is MIT licensed. The current codebase does not include Ultralytics YOLO or other AGPL-only runtime dependencies; third-party model artifacts keep their own licenses in the model registry.