pypi loudcheckstdioupdated 2mo ago
A loudness compliance verdict, not raw meter output. loudcheck measures a media file with ffmpeg and answers the question that actually matters โ does this file pass the spec? โ against formal published standards:
What can you do with loudcheck?
loudcheck
A loudness compliance verdict, not raw meter output. loudcheck measures
a media file with ffmpeg and answers the question that actually matters โ
does this file pass the spec? โ against formal published standards:
Agents start here โ SKILL.md โ when to call this, worked examples, MUST/MUST NOTs. Family contract: FAMILY.md.
- EBU R 128 (European broadcast: โ23.0 LUFS ยฑ0.5 LU, max โ1 dBTP)
- ATSC A/85 (US television: โ24 LKFS ยฑ2 dB, true peak below โ2 dBTP)
- BS.1770 (measure-only: BS.1770 defines no compliance target, so this
mode returns verdict
measuredwith the numbers and no judgment)
$ loudcheck master.wav --standard EBU_R128
FAIL โ EBU R 128
โ integrated -19.4 LUFS (target -23.0 ยฑ0.5, delta +3.6)
โ true peak -16.3 dBTP (max -1.0)
ยท LRA 0.0 LU (informational)
โ apply -3.6 LU gain to reach -23.0 LUFS (e.g. ffmpeg -af volume=-3.6dB, or loudnorm I=-23)
Ships as a CLI and an MCP tool over one engine, so agents and humans get the identical verdict.

Why this exists
An agent (or an engineer) can run ffmpeg's ebur128 filter and get numbers.
What it can't get from a shell is the verdict โ that requires knowing the
standard's target, tolerance, and gating, and interpreting integrated
loudness vs. LRA vs. true peak against them. Loudness is one of the most
common causes of delivery rejection, and the gap is not measurement โ it's
the standards-aware answer. That's the whole tool.
Install
Requires Python 3.10+ and ffmpeg 5.0+ on PATH.
uvx loudcheck file.wav # zero-install run (requires ffmpeg >= 5.0 on PATH)
pip install loudcheck # CLI
pip install "loudcheck[mcp]" # + MCP server
From a clone: pip install -e ".[mcp,dev]".
CLI
loudcheck file.wav # EBU R128 by default
loudcheck file.mp4 --standard ATSC_A85 # first audio stream of a video
loudcheck file.wav --json # full structured verdict
loudcheck file.wav --standard BS_1770 # measurement only, no gates
loudcheck file.mov --all-streams # verdict every audio track
loudcheck file.mov --stream 1 # a specific audio track
loudcheck file.wav --detailed # + max momentary / short-term
loudcheck masters/ --standard EBU_R128 # batch a directory -> table
loudcheck a.wav b.wav c.wav # batch multiple files
loudcheck --schema # print the tool definition
Batch mode prints one line per file (plus remediation for fails) and a
summary; --json in batch emits an array. Exit code is 1 if any file
fails.
For agents
- Exit codes carry the verdict:
0= pass,1= fail (non-compliant),2= error (missing file, no audio stream, no ffmpeg). Gate a delivery on the exit code alone. --jsonis the full contract: overallverdict, per-metricmeasured/target/tolerance/delta/passwith the spec citation attached to every gated metric,failuresin plain English, andremediationwith the exact correction โ a fail 2.3 LU over target tells you to apply โ2.3 LU gain and hands you the ffmpeg incantation. This tool never applies the fix (measurement and verdict only); the agent one-shots it withloudnormusing the delta provided.- MCP: register
loudcheck-mcp(stdio; orloudcheck --mcp, orpython -m loudcheck.mcp_server). Zero-install:uvx --from 'loudcheck[mcp]' loudcheck --mcp. Tools:check_loudness(path, standard)โ same JSON as the CLI, andlist_standards()โ the catalog with citations. Verified againstmcp==1.28.1. tool.jsonat the repo root describes the surface machine-readably โ or fetch it live from any install withloudcheck --schema(the file ships inside the package; a test keeps the two copies in sync).- ffmpeg version is part of the contract: every verdict includes
measurement_context.ffmpeg_version. Minimum supported: 5.0. Developed and verified against 8.1.
The scope guardrail (read before contributing)
Only formal, stable standards live in this repo; per-platform delivery templates (Netflix, DPP, Apple TV+, Amazon, broadcaster specs) never do. Platform specs change unilaterally and cover far more than loudness โ the moment they enter, this stops being a near-zero-maintenance community tool and becomes a yearly-maintenance product. If a PR adds a target that a platform can change on its own, it belongs in a separate template layer built on top of this primitive, not here.
Contributions of additional formal standards (e.g. a plain ITU-R BS.1770
mode) are welcome: a standard is pure data in
loudcheck/standards.py โ targets, tolerances, and
citations. No code changes required.
How it measures
One ffmpeg pass with loudnorm=print_format=json (analysis mode) yields
integrated loudness, loudness range, true peak (oversampled dBTP per
BS.1770), and the gating threshold. The test suite cross-checks loudnorm's
reading against ffmpeg's independent ebur128 implementation โ the two must
agree within 1 LU for CI to pass, so an ffmpeg release that changes filter
behavior is caught by the suite, not by users.
Verification corpus
pytest generates calibrated test tones on the fly (no binaries in the
repo): per BS.1770's calibration statement, a mono 997 Hz sine at 0 dBFS
reads โ3.01 LKFS, so tones are generated at exact known loudness โ compliant,
too loud, too quiet, and true-peak-hot โ and every verdict must match its
known expectation.
Out of scope, permanently
Loudness correction (use ffmpeg loudnorm with the delta this tool gives
you) ยท full-file QC (codec/colour/cadence) ยท real-time monitoring ยท GUIs ยท
platform delivery templates (see guardrail).
License
MIT
Install
Add loudcheck to your client. Pick the one you use.
claude mcp add loudcheck -- uvx loudcheckcodex mcp add loudcheck -- uvx loudcheckamp mcp add loudcheck -- uvx loudcheck{
"mcpServers": {
"loudcheck": {
"command": "uvx",
"args": [
"loudcheck"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"loudcheck": {
"command": "uvx",
"args": [
"loudcheck"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"loudcheck","command":"uvx","args":["loudcheck"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"loudcheck": {
"command": "uvx",
"args": [
"loudcheck"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"loudcheck": {
"command": "uvx",
"args": [
"loudcheck"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"loudcheck": {
"command": "uvx",
"args": [
"loudcheck"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"loudcheck": {
"type": "local",
"command": "uvx",
"args": [
"loudcheck"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"loudcheck": {
"command": {
"path": "uvx",
"args": [
"loudcheck"
]
}
}
}
}Add to your Zed `settings.json`.
uvx loudcheckRun `goose configure`, choose **Add Extension โ Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation20/25
- Maintenance16/25
- Trust6/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 59 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint โ no local install
Version history
| Versions | Published |
|---|---|
| 0.3.1Latest | Jul 3, 2026 |