Open Source · Apache 2.0 · Built by starside.io

Freeze the world. Keep the clock ticking.

An open-source computer vision pipeline that removes people from security footage while preserving the live timestamp. Frame-perfect, zero-config, fully local.

Scroll to explore

See the difference

Real security footage. Real results. Left side is the original recording. Right side is petrify's output. The timestamp keeps running. The people are gone.

📍 Driveway / Outdoor Camera
◀ Original petrify ▶
Driveway camera: person removed, timestamp preserved
📍 School Corridor / Indoor Camera
◀ Original petrify ▶
School corridor: standing person removed, timestamp preserved

Three detectors. One clean result.

A single detector is never enough. petrify chains three complementary signals so every subject is caught. fast movers, standing-still loiterers, and distant figures barely larger than noise.

01
🌫️
MOG2 Background Subtractor
Gaussian mixture model trained on the first 90 frames. Catches anything moving against the learned background, the primary detection net.
OpenCV MOG2
02
🧍
HOG Person Detector
Histogram of Oriented Gradients shape detector. Catches partial figures and distant silhouettes that produce too little motion for MOG2 to flag.
cv2.HOGDescriptor
03
🔒
Static Background Differ
Locked reference frame diff that never adapts. Finds subjects that stood still long enough for MOG2 to absorb them. The failsafe that never forgets.
BackgroundDiffer
Pass 1 Background Extraction

Scans every frame to identify the cleanest background window. The longest uninterrupted stretch with no detected motion. That window is median-composited into the locked reference frame that persists for the entire render.

Pass 2 Composite Rendering

Every frame is classified as person or not. Person frames swap in the locked background. The timestamp ROI is auto-detected via Laplacian edge scanning and composited live onto each frozen frame so the clock never stops.

Everything you need. Nothing you don't.

Zero-config by default. Every parameter tunable when defaults aren't enough.

🔍
Auto ROI Detection
Automatically locates the timestamp bounding box using a two-pass frequency map + Laplacian edge scan. No manual coordinates needed.
🧠
Three-Detector Pipeline
MOG2 + HOG + static BackgroundDiffer run in sequence. Each catches what the others miss. No false negatives, minimal false positives.
🕐
Live Timestamp Overlay
The burned-in security clock is cropped from each original frame and composited onto every frozen output frame. Time is always authentic.
FFmpeg-Accelerated Output
Raw frames are written to a pipe and re-encoded by FFmpeg with H.264, preserving the original audio and container metadata.
🔧
Fully Tunable CLI
Every threshold, scan window, detector weight, and output codec is exposed as a flag. Start with zero args and tune from there.
🖥️
100% Local. Zero Cloud.
Runs entirely on your machine. No API keys, no upload, no data leaving your environment. Privacy by default, not by policy.

Up and running in 60 seconds.

Install once, run anywhere. petrify puts itself on your PATH via pipx. No virtualenv juggling.

terminal
# 1. Install system FFmpeg
$ brew install ffmpeg         # macOS
$ sudo apt install ffmpeg    # Linux

# 2. Install petrify (adds to PATH)
$ pipx install petrify

# Or from source
$ git clone https://github.com/starside-io/petrify
$ cd petrify && pipx install -e .
usage
# Zero-config. Auto-detects everything
$ petrify input.mp4 output.mp4

# Explicit ROI (faster, skips scan)
$ petrify input.mp4 output.mp4 --roi 0 55 700 60

# Higher sensitivity
$ petrify input.mp4 output.mp4 \
    --threshold 200 \
    --bg-diff-area-threshold 100

# Disable auto-ROI scan
$ petrify input.mp4 output.mp4 --no-roi

Zero config. Real results.

Run petrify input.mp4 output.mp4 and walk away. petrify will auto-detect the timestamp position, build the background reference, and produce a clean output. No flags required.

Read the full docs ↗
██████╗ ███████╗████████╗██████╗ ██╗███████╗██╗ ██╗ Freeze the world. Keep the clock ticking. Made with ❤️ by starside.io · https://starside.io → ROI auto-detect scanning 60 frames… found timestamp x=0 y=55 w=700 h=60 → Pass 1 background building reference… locked window frames 42–312 → Pass 2 render compositing 1847 frames… ✓ Done output.mp4 written

Benchmarks and requirements.

Tested on real security footage. No GPU required. Everything runs on CPU via OpenCV.

Benchmark MacBook Pro · M2 Pro · 16 GB

macOS 26.3 · Python 3.14 · FFmpeg 8.1 · opencv-python 4.13 · numpy 2.4

Video Resolution FPS Duration Wall time Speed
camera.mp4 1920x1080 25 46.8s 45.7s 1.0x real-time
camera2.mp4 640x480 6 109.2s 4.95s 22x real-time
Requirements Minimum to run
Python 3.10+
opencv-python-headless 4.8+
numpy 1.24+
FFmpeg any recent
RAM 2 GB min · 4 GB for 1080p
GPU not required

Any fixed camera. Any subject.

If there's a locked-down camera and a burned-in clock, petrify can strip the subjects while preserving the timeline.

🔏
Privacy compliance
removes Identifiable individuals
keeps Scene context · verified timeline
📦
Footage compression
removes Sparse motion (bird, leaf, flag)
keeps Static background · clean stream
📐
Space & layout analysis
removes People occluding floor plans
keeps Clean geometry · heatmap-ready
⚠️
Hazard detection
removes Humans masking static hazards
keeps Spills, obstacles, trip points
🤖
AI training data
removes Subject identity from scenes
keeps Environment · ground truth labels
🌐
Any fixed camera
removes All foreground subjects
keeps Clean background · live timestamp
ℹ️ Educational & research use. petrify is an open-source tool intended for lawful, authorised applications only. Always ensure you have the legal right to process any footage, including compliance with applicable privacy regulations (PDPA, GDPR, CCPA, and local equivalents). Do not process footage of individuals without proper authorisation, consent, or a lawful basis.