Library: advisory audio quality diagnostics (effective bandwidth, loudness) #278

Open
opened 2026-09-27 03:01:31 +00:00 by yonlu · 0 comments
Owner

Phase 3 of .planning/plans/active/022-audio-fingerprinting.md, deliberately deferred and advisory. Depends on #96 (it rides the same decode).

The problem

Bitrate and format are read from headers, so a 128 kbps MP3 re-wrapped as FLAC reports itself as lossless, and nothing in the library can tell.

What it would be

On the decode fingerprinting already pays for: effective bandwidth (a cutoff and slope from the averaged spectrum) and optionally EBU R128 loudness (exaring/ebur128, MIT, pure Go). Stored as Derived data in an audio_analysis table; surfaced as information about a file, never a reason to refuse an import or flag a library.

Why it is last

It has a real accuracy ceiling. D'Alessandro & Shi (ACM MM&Sec 2009) report 97% bitrate classification / 99% transcode detection from the 16–20 kHz band, but a vinyl needledrop and a legitimately low-passed master both roll off at 16–18 kHz. The UI copy must say so.

Done when

A known transcode fixture (generated by make testdata from a lossy intermediate) reports a bandwidth well under its container's claim, a true lossless fixture does not, and the copy shown to the user states the needledrop caveat.

Phase 3 of `.planning/plans/active/022-audio-fingerprinting.md`, deliberately deferred and advisory. Depends on #96 (it rides the same decode). ## The problem Bitrate and format are read from headers, so a 128 kbps MP3 re-wrapped as FLAC reports itself as lossless, and nothing in the library can tell. ## What it would be On the decode fingerprinting already pays for: effective bandwidth (a cutoff and slope from the averaged spectrum) and optionally EBU R128 loudness (`exaring/ebur128`, MIT, pure Go). Stored as `Derived` data in an `audio_analysis` table; surfaced as information about a file, **never** a reason to refuse an import or flag a library. ## Why it is last It has a real accuracy ceiling. D'Alessandro & Shi (ACM MM&Sec 2009) report 97% bitrate classification / 99% transcode detection from the 16–20 kHz band, but a vinyl needledrop and a legitimately low-passed master both roll off at 16–18 kHz. The UI copy must say so. ## Done when A known transcode fixture (generated by `make testdata` from a lossy intermediate) reports a bandwidth well under its container's claim, a true lossless fixture does not, and the copy shown to the user states the needledrop caveat.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: yonlu/yellowjacket#278