Skip to main content

High-performance Rust-backed video encoding and batch processing engine

Project description

⚓ 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 cropdetect logic 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:

  1. Install Rust/Cargo.
  2. Run uv run maturin develop to compile the Rust extension into your local Python environment.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anchorr-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl (407.9 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.39+ x86-64

File details

Details for the file anchorr-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl.

File metadata

  • Download URL: anchorr-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl
  • Upload date:
  • Size: 407.9 kB
  • Tags: CPython 3.14, manylinux: glibc 2.39+ x86-64
  • Uploaded using 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}

File hashes

Hashes for anchorr-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 2aeb7828863b567eb6440dda64660dae6a205392fb39ad8bf85c4db1f1788bcf
MD5 cf5a6a0ed1a22b2cf06e57e67e81a587
BLAKE2b-256 391ba7b65bafd4d111ab33cb50caf806cf36beca2e363445ee751f7e981ddafb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page