Four things separate a file that is what it claims to be from one that is not: where its spectrum stops, whether its peaks are flat, whether it sits off centre, and how quiet its quiet parts are. All four come out of one decode.
Spectral cutoff
Lossy encoders throw away the top of the band to save bits, and the frequency they stop at is close to a signature. The peak spectrum is scanned down from Nyquist until real content appears, and that point is the cutoff.
Rough landmarks, all approximate and encoder-dependent:
- 11 kHz: MP3 near 96 kbps, or a 22 kHz source
- 15 kHz: MP3 near 128 kbps
- 16.5 kHz: MP3 near 160 kbps, AAC near 128 kbps
- 19 kHz: MP3 near 256 kbps, AAC near 192 kbps
- 20.5 kHz: MP3 at 320 kbps
A peak spectrum is used rather than an average because a quiet passage would otherwise pull the top of the band down and read as a wall that is not there.
What a cutoff does not tell you
Plenty of genuine material has no content above 16 kHz. Old tape, AM broadcast, close-miked speech, and anything recorded at 32 kHz all stop early for honest reasons.
The reverse is also true. A file encoded at 320 kbps reaches past 20 kHz, so a high cutoff does not mean the file is lossless.
Clipping
A run of three or more consecutive samples at full scale is counted as a clipped run. Single samples that touch the ceiling are normal and are not counted.
The run length matters more than the count. A handful of two-sample runs on a loud master is inaudible; a 40-sample flat top is a square wave and sounds like one. The first dozen run positions are listed so you can go and listen.
DC offset
A constant offset shifts the whole waveform away from zero. It eats headroom on one side, makes edits click, and wastes level on something no speaker can reproduce.
Anything above roughly 0.01% is worth removing. Anything above 1% points at a broken capture chain.
True peak
True peak is measured to ITU-R BS.1770-4 by oversampling four times, which is the same measurement the loudness meter reports. It is asked for in the same pass, so the file is decoded once for both.
If true peak reads above -1 dBTP and the file is headed for a lossy encoder, expect the encoder’s own output to clip.