Skip to main content

blurbox

A small desktop tool to hide parts of a video: draw one or more rectangles on the frame and cover each with a black box, a blur or pixelation, for the whole video or only during chosen time ranges. It is a GUI around ffmpeg and runs on Windows and Linux.

Requirements

  • Python 3.11 or newer
  • ffmpeg and ffprobe on PATH (they are separate programs, not installed with blurbox); a full build is recommended, so the encoders used to keep the source codec (libx265, libsvtav1, libvpx-vp9, libopus) are available. On Windows, e.g. the "full" build from gyan.dev; on Linux, your distribution's ffmpeg package
  • Tk: included with Python on Windows; on Linux pacman -S tk (Arch) or apt install python3-tk (Debian/Ubuntu)

Installing

With uv or pipx, which put the blurbox command on your PATH in an environment of its own:

uv tool install blurbox
# or
pipx install blurbox

Then start it, optionally with a video or a project file to open:

blurbox [video | project.json]

On Windows the command starts without a console window.

Running from a source checkout

uv run --script blurbox.py [video | project.json]

On Windows, blurbox_shortcut.ps1 creates blurbox.lnk, a shortcut that starts the tool without a console window; add -Desktop for a copy on the Desktop. Drop a video or a project onto the shortcut to open it. Rerun the script after reinstalling uv or moving this folder, since a shortcut stores absolute paths.

Using it

  • Areas: drag on the frame to draw the selected area, drag inside any area to select and move it, drag an edge or corner of the selected area (it shows white handles) to resize it, "New area" to add another. The mouse cursor shows which of these a drag will do. Each area has its own effect, strength and time ranges; with no ranges it covers the whole video.
  • Whole frame: tick it to make the selected area cover the entire picture (e.g. blur everything from 0:12 to 0:15); untick it to get its rectangle back.
  • Seeking: click or drag the timeline, use the step buttons (hold them to repeat), or the keys ←/→ (1 s) and Shift+←/→ (one frame).
  • Time ranges: I and O put the current time in Start and End, Enter adds the range, a double-click on a range edits it, Esc cancels the edit. The timeline shows the selected area's ranges in red, the others' in grey.
  • Show effect (E) draws every active area's effect on the frame, using the same ffmpeg filters as the render.
  • Projects: Ctrl+S saves the areas, quality and position as JSON, Ctrl+O opens a project. The video is found relative to the project file first, so a folder with both can be moved to another PC.

Output

The render keeps the source's codec family (H.264, HEVC, VP9, AV1), bit depth and colour metadata (HDR included), every audio track, subtitles and chapters. Anything the chosen container cannot hold is converted (losslessly where possible) or left out, and a dialog lists it before rendering starts.

The quality setting is x264/x265-style CRF: lower means better and larger. The same number looks better with HEVC than with H.264, so 22–24 is usually enough for HEVC sources.

Development

uv sync            # creates .venv with the dependencies and pytest
uv run pytest      # the test suite, about 20 s

pyproject.toml repeats the dependencies of the script's inline metadata (which uv run --script and the shortcut use); keep the two in sync.

The tests are in three files:

  • tests/test_logic.py: time parsing, areas, filtergraphs and the stream plan, with no ffmpeg run
  • tests/test_media.py: builds small videos with ffmpeg once per session, then checks probing, frame reading against a plain sequential decode, the live preview against the real render frame by frame, 10-bit and HDR preservation, and the streams in rendered files
  • tests/test_app.py: drives the GUI through real Tk events (areas, ranges, keys, seeking, projects); needs a display

Tests that need ffmpeg or a display are skipped when these are missing; -m "not gui" or -m "not media" deselects them explicitly.

Release files for blurbox 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blurbox 0.1.0
File Size Uploaded
blurbox-0.1.0.tar.gz 35.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blurbox 0.1.0
File Interpreter ABI Platform
blurbox-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 58.7 kB

Release files / blurbox-0.1.0.tar.gz

Download URL blurbox-0.1.0.tar.gz
Size 35.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c2923b4d2844f8970130d526ad7088ad165977ec5195876aa8032702400c23e3
BLAKE2b-256 checksum
How to use checksums
0bb5fdbc97ad94b62a91331f11c0004a86f8a9933f1bdaeee37f7423840a85fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / blurbox-0.1.0-py3-none-any.whl

Download URL blurbox-0.1.0-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2dbbb4d159035338ba13b3b1a3162b425f44ca812f727292d6e560af41a2a05e
BLAKE2b-256 checksum
How to use checksums
6f377720244ca0bf6f036308f8717de65ff1fa98cda67bb0f9019721b880cd2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page