Skip to content

Troubleshooting

My measurement differs from another tool by ~0.5 LUFS

Check which standard the other tool implements. The 2015 revision of BS.1770-4 (which this package uses) requires the absolute gate at -70 LKFS; the earlier draft gated at -70differently or omitted it. Also check whether the other tool reports LKFS (integrated) vs LUFS (they are the same unit) and whether it applies true-peak oversampling or plain sample peak. A quick sanity check: a full-scale 1 kHz sine must read -3.01 LUFS and 0 dBTP.

44.1 kHz input gives different loudness than the same file at 48 kHz

It shouldn't — this package resamples everything to 48 kHz internally. The difference should be below 0.1 LU. If it's larger, make sure you're passing the actual sample rate and not guessing; passing 48000 for a 44.1 kHz file shifts every K-weight filter.

True peak reads 0 dBTP on files that clearly clipped

True peak interpolates between samples. If your file was generated with sample-accurate peaks (e.g. a synthesized sine), 0 dBTP is correct. Real codec/dither chains can exceed 0 dBTP at the reconstruction stage — that's exactly what true-peak limiting prevents.

The CLI takes a while on long files

bin/dsp-audio-metrics.mjs resamples to 48 kHz (polyphase sinc, 64 taps per phase) and oversamples for true peak at 4× — this is deliberately accurate rather than fast. For batch use, run it once per file and cache the --json output.

"Potential syntax error" when importing in an app

Make sure the file you import is src/index.mjs (or the package root), not a random file from bin/ or script/ — those are CLI and CI entry points. If your bundler struggles with ESM .mjs, import the named exports explicitly:

js
import { integratedLufs } from "dsp-audio-metrics";