1
0
Fork
You've already forked drmeter
0
forked from janw/drmeter
Dynamic Range (DR) meter
  • Python 95.7%
  • Dockerfile 4.3%
dependabot[bot] 6f9aac61d2
build(deps): bump bump-my-version from 0.11.0 to 0.27.0 in the development-dependencies group ( #18 )
build(deps): bump bump-my-version in the development-dependencies group
Bumps the development-dependencies group with 1 update: [bump-my-version](https://github.com/callowayproject/bump-my-version).
Updates `bump-my-version` from 0.11.0 to 0.27.0
- [Release notes](https://github.com/callowayproject/bump-my-version/releases)
- [Changelog](https://github.com/callowayproject/bump-my-version/blob/master/CHANGELOG.md)
- [Commits](https://github.com/callowayproject/bump-my-version/compare/0.11.0...0.27.0)
---
updated-dependencies:
- dependency-name: bump-my-version
 dependency-type: direct:development
 update-type: version-update:semver-minor
 dependency-group: development-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024年10月12日 21:54:18 +02:00
.github build(ci): Misc workflows improvements ( #17 ) 2024年10月12日 21:48:52 +02:00
drmeter bump: version 0.3.1 → 0.3.2 2024年10月12日 12:46:28 +00:00
tests Replace black with ruff format 2023年11月03日 14:04:37 +01:00
.dockerignore Add docker build 2023年07月26日 22:36:59 +02:00
.gitignore Add docker build 2023年07月26日 22:36:59 +02:00
.pre-commit-config.yaml build(ci): Misc workflows improvements ( #17 ) 2024年10月12日 21:48:52 +02:00
.tool-versions feat: Update project ( #14 ) 2024年10月12日 13:32:35 +02:00
CHANGELOG.md bump: version 0.3.1 → 0.3.2 2024年10月12日 12:46:28 +00:00
codecov.yml build: Add codecov config 2024年10月12日 13:44:21 +02:00
Dockerfile fix: Restore and modernize docker build ( #15 ) 2024年10月12日 14:06:21 +02:00
LICENSE Refresh repo scaffolding 2023年07月16日 23:12:24 +02:00
poetry.lock build(deps): bump bump-my-version from 0.11.0 to 0.27.0 in the development-dependencies group ( #18 ) 2024年10月12日 21:54:18 +02:00
pyproject.toml build(deps): bump bump-my-version from 0.11.0 to 0.27.0 in the development-dependencies group ( #18 ) 2024年10月12日 21:54:18 +02:00
README.md build: Update docker build badge 2024年10月12日 14:49:25 +02:00
tox.ini Add mypy workflow 2023年11月03日 14:04:37 +01:00

Dynamic Range (DR) meter 🎧

The algorithm has been reverse-engineered using the available information and officially endorsed software to calcuate the DR value. The analysis results of drmeter are verified to be within a ±0.5 absolute tolerance from the results produced by officially endorsed software (see #testing).

This project is in no way affiliated with the Pleasurize Music Foundation or its Dynamic Range Project.

Installation

The recommended method for installing drmeter is pipx:

pipx install drmeter

Any regular pip install drmeter will do, too. The drmeter requires Python 3.9+ to run.

To use drmeter without installation, consider the dockerized approach below

Usage

See drmeter --help for usage instructions. drmeter expects a single path to a file or a directory to analyze, and defaults to an "animated" progress display, emitting the results to stdout in the process.

$ drmeter 'Nobody There (Beautiful Scars).wav'
Analyzing Dynamic Range of Nobody There (Beautiful Scars).wav ...
╭──────────────────────────────────────────────────────────────────────╮
│ DR Peak RMS Filename │
├──────────────────────────────────────────────────────────────────────┤
│ DR12 -0.10 dB -15.02 dB Nobody There (Beautiful Scars).wav │
╰──────────────────────────────────────────────────────────────────────╯

Using the --quiet/-q flag will silence most of the output and only print the calculated DR score to stdout:

$ drmeter 'Nobody There (Beautiful Scars).wav' -q
DR12

Alternatively drmeter supports a more detailed JSON-formatted output using the --output/-o json parameter, including both per-channel and totaled results. Using the --output parameter redirects the progress display to stderr, so that the formatted output can be piped to other applications or to file. If you do not require the progress display, it can be silenced using --quiet/-q here, too.

# Save a copy to file
$ drmeter -ojson -q 'Nobody There (Beautiful Scars).wav' | tee dr.json
{
 "filename": "/.../Nobody There (Beautiful Scars).wav",
 "dr_score": [
 11.93,
 11.63
 ],
 "peak_db": [
 ...
 ]
}
# Parse JSON using jq
$ drmeter -ojson -q 'Nobody There (Beautiful Scars).wav' | jq '.[].overall_dr_score'
11.78

Dockerized

A container image of drmeter is available at ghcr.io/janw/drmeter with the latest tag pointing to the latest commit on the main branch. The following command (with the files you're looking to analyze in/below the current working directory) behaves very similarly to an installed version, accepting arguments directly as expected:

docker run --rm --tty --workdir /src -v "$PWD:/src" \
 ghcr.io/janw/drmeter --output json path/to/files