⚓ anchorr-engine
A high-performance Rust-backed video processing engine for Python. Built to handle heavy-duty FFmpeg tasks with parallel execution and Scene-compliant defaults.
Features
- Parallel Processing: Uses Rust/Rayon to run batch encodes concurrently across all CPU threads.
- Scene Compliance: Automates Mod-16 scaling, metadata stripping, and 10-bit HEVC profiles.
- Smart Crop: Integrated
cropdetectlogic to automatically identify and strip black bars. - Low Overhead: Direct binding via PyO3—no shell overhead for metadata extraction.
Prerequisites
You must have ffmpeg and ffprobe installed and available in your system PATH.
Installation
uv pip install anchorr_engine
Quick Start
1. Probe Metadata
from anchorr import AnchEngine
anch = AnchEngine()
info = anch.probe("video.mkv")
print(f"{info.width}x{info.height} using {info.codec}")
2. Auto-Crop & Encode
# Detect black bars automatically
coords = anch.get_blackbar_coords("input.mkv")
# Encode to HEVC 10-bit (mod-16 compliant)
anch.transform(
input="input.mkv",
output="output.mkv",
codec="libx265",
res="1080",
crop=coords,
flags="-crf 18 --preset slow"
)
3. Batch Encode
# List of (input, output, codec, resolution, crop, flags)
tasks = [
("v1.mkv", "v1_out.mkv", "libx265", "1080", "1920:800:0:140", ""),
("v2.mkv", "v2_out.mkv", "libx265", "1080", "1920:1080:0:0", "")
]
# Runs all encodes in parallel
results = anch.batch(tasks)
Development
To build from source:
- Install Rust/Cargo.
- Run
uv run maturin developto compile the Rust extension into your local Python environment.
License
MIT
Release files for anchorr 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anchorr-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.39+ x86-64 | Details |
Release files / anchorr-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl
| Download URL | anchorr-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 407.9 kB |
| Tags | CPython 3.14 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
2aeb7828863b567eb6440dda64660dae6a205392fb39ad8bf85c4db1f1788bcf
|
|
BLAKE2b-256 checksum How to use checksums |
391ba7b65bafd4d111ab33cb50caf806cf36beca2e363445ee751f7e981ddafb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|