PyFFmpegCore
The safe, explainable FFmpeg task runner for the terminal, Python, and CI.
Diagnose the machine. Preview the exact plan. Run a maintained workflow. Keep a privacy-redacted receipt.
Explore the docs · Five-minute proof · 63-second terminal proof · Task-first recipes · Measured evidence · Security
PyFFmpegCore is for developers and technical creators who want repeatable
local media automation without owning a growing pile of fragile FFmpeg strings.
It supports Python 3.10–3.14 on Linux, macOS, and Windows; ffmpeg and
ffprobe remain explicit system dependencies.
review before prove after
│ │
input ──> preflight ──> deterministic plan ──> run ──> receipt ──> output
│ │
└─ fail before mutation └─ timeout / cancel / cleanup
Install and prove one useful result
Install the exact public beta from PyPI in an isolated environment:
pipx install "pyffmpegcore==0.2.2"
pyffmpegcore doctor
pyffmpegcore smoke-test
doctor identifies the real binaries and indexed capabilities. smoke-test
generates synthetic media, performs a complete transform, probes the result,
and cleans up—no checkout and no personal media required.
Watch the real 63-second proof
This is a validated terminal recording, not edited sample output. It installs
0.2.1 from public PyPI, runs doctor, creates synthetic media, explains the
exact plan, shows structured progress, probes the output, and validates the
privacy-redacted receipt.
Now turn a camera/editor MOV into a conservative web MP4. Inspect first; write only when the plan is acceptable:
pyffmpegcore profile run web/mp4-compatible \
--input input.mov \
--output web.mp4 \
--explain
pyffmpegcore profile run web/mp4-compatible \
--input input.mov \
--output web.mp4 \
--receipt web.receipt.json
A successful run reports output facts—not just process exit zero:
Output: web.mp4
Container: mov,mp4,m4a,3gp,3g2,mj2
Duration: 6.00 seconds
Size: 542.1 KB
Video: h264 640x360
Receipt: web.receipt.json
Those numbers come from the deterministic proof fixture. Your duration and size will reflect your input.
What it owns
| PyFFmpegCore owns | It deliberately does not own |
|---|---|
| Capability-aware preflight before mutation | Downloading or bundling FFmpeg |
| Deterministic argument vectors and explanations | Every possible FFmpeg filter graph |
| Typed profiles, tasks, batches, and pipelines | Packet/frame internals or NumPy frame I/O |
| Overwrite, timeout, cancellation, and cleanup policy | Hosted transcoding or hostile-media sandboxing |
| Stable exit categories and redacted run receipts | Shell interpolation of paths or untrusted values |
Raw FFmpeg remains right when you already own and review the complete command. Graph builders fit arbitrary filter graphs. PyAV fits packet/frame access. PyFFmpegCore occupies the operational layer between intent and evidence. See the factual comparison.
Proof, not promises
These runs were made on 2026-08-25 with generated first-party fixtures. The repository publishes the commands, input/output probes, redacted receipts, and receipt checksums.
| Workflow | Input | Verified output |
|---|---|---|
| Web-compatible video | 688,662-byte MOV | 555,083-byte H.264 MP4; 19.4% smaller |
| Fit under 256 KiB | 4,042,503-byte MP4 | 248,417 bytes; target passed |
| Podcast loudness | −22.0 LUFS WAV | −16.2 LUFS MP3 for a −16.0 LUFS target |
Inspect the complete evidence or read the real-media test methodology, including fixture generation, capability skips, failure contracts, and artifact validation.
Pick an outcome
Ship a portable web video
pyffmpegcore profile run web/mp4-compatible \
--input source.mov --output web.mp4 --receipt web.receipt.json
Input contract, plan, and verification →
Hit an upload limit
pyffmpegcore compress \
--input upload.mp4 --output upload-small.mp4 \
--target-size 24MiB --two-pass --receipt upload.receipt.json
Feasibility, quality floor, and measured proof →
Preserve every track while remuxing
pyffmpegcore convert \
--input multilingual.mkv --output preserved.mkv \
--preserve-all-streams --receipt preserved.receipt.json
Stream-selection contract and verification →
Normalize spoken-word audio
pyffmpegcore normalize-audio \
--input episode.wav --output episode.mp3 \
--method loudnorm --receipt episode.receipt.json
Loudness targets and listening checks →
More tested recipes cover audio extraction, subtitles, thumbnails, and image batches. Every CLI surface is generated into the command reference.
Build repeatable media pipelines
Compose existing typed workflows in strict JSON or TOML—never raw shell strings—then validate, visualize, dry-run, execute, resume, or cache the DAG:
pyffmpegcore pipeline validate pipelines/web-publish.json
pyffmpegcore pipeline graph pipelines/web-publish.json --format mermaid
pyffmpegcore pipeline run pipelines/web-publish.json \
--receipt-dir receipts \
--state pipeline-state.json \
--events events.jsonl
source ──> web_video ──> poster
└─────> captions ────┘
│
└─ resume state + redacted receipts + JSONL progress
CI users can adopt the digest-pinned GitHub Action.
Container users get public linux/amd64 and linux/arm64 images with a
non-root runtime, SBOM, provenance, Sigstore attestation, and a scan that blocks
fixed high/critical vulnerabilities. The verified digest lives in the
container guide.
Python API
The CLI and Python layer share the same typed planner, preflight, runner, and result model:
from pyffmpegcore import WorkflowEngine
engine = WorkflowEngine()
plan = engine.planner.extract_audio("video.mp4", "audio.mp3")
prepared = engine.prepare(plan)
if not prepared.preflight.ok:
raise RuntimeError(prepared.preflight.render())
result = engine.run(plan).items[0].result
print(result.status, result.elapsed_seconds, result.outputs)
Public types, exceptions, and stability rules are documented in the Python API reference.
The support contract
| Environment | Continuously tested claim |
|---|---|
| Python | 3.10–3.14 package contract on Linux |
| Ubuntu | Exact-wheel media smoke on Python 3.10 and 3.14 |
| macOS | Exact-wheel media smoke on Python 3.10 and 3.14 |
| Windows | Exact-wheel media smoke on Python 3.10 and 3.14 |
| FFmpeg | Current runner packages; exact versions captured in CI evidence |
The compatibility policy separates tested cells from combinations merely expected to work. Preflight can still reject missing encoders, filters, muxers, protocols, streams, writable destinations, or disk requirements before mutation.
Trust is part of the product
- Current CI and exact-artifact matrix
- Compatibility matrix
- Security policy and private reporting
- Command-execution threat model
- Release, provenance, and recovery procedure
- Contribution ladder and test tiers
- Support and triage expectations
- Changelog
The public 0.2.2 beta was built once from a protected SSH-signed tag, tested
as the exact wheel on Linux, macOS, and Windows, published without a long-lived
PyPI token, and reinstalled from the public index before the matching GitHub
Release was created.
- PyPI package and files
- Signed GitHub Release, checksums, and artifact report
- Exact release workflow evidence
- Wheel Trusted Publisher attestation
- Source distribution Trusted Publisher attestation
Help make media automation less fragile
Good first contributions include a missing capability diagnostic, a real-media fixture edge case, a task-first recipe, or a new compatibility observation. Start with the contribution ladder or one of the labeled good first issues.
If PyFFmpegCore replaces one command string you no longer want to maintain, star the repository so the next person searching for a safer FFmpeg layer can find the proof.
Metadata
Release files for pyffmpegcore 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyffmpegcore-0.2.2.tar.gz | 245.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyffmpegcore-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 332.9 kB
Release files / pyffmpegcore-0.2.2.tar.gz
| Download URL | pyffmpegcore-0.2.2.tar.gz |
|---|---|
| Size | 245.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc65d4c11e85147f00270d9b086d281a656494597ec27b0b68f3ec9789fad89a
|
|
BLAKE2b-256 checksum How to use checksums |
c438d7de9b8cba606540349a1dc4bd42ee091dc18e76cbd8db20e9c157580418
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / pyffmpegcore-0.2.2-py3-none-any.whl
| Download URL | pyffmpegcore-0.2.2-py3-none-any.whl |
|---|---|
| Size | 87.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbc30605bd39a4cd7aa40cdf3e5e2bd59c5a1a88ee5cb9fe1678644a98c2c3f8
|
|
BLAKE2b-256 checksum How to use checksums |
5f5d78c62125a3aa327699bed37faf21aea731c31360aaa1144602c81e21477f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency log