Fake Lossless Audio Detector
Operator: Abdulla Al Fahad. How tools are built and checked
A FLAC file can be a perfect copy of a CD or a decoded MP3 in a bigger container, and the container does not say which; the spectrum does. MP3 and AAC encoders throw away everything above a bitrate-dependent frequency and decoding does not bring it back, so a fake lossless file shows a sharp horizontal edge in its spectrogram. This page checks whole folders for that edge, giving each file a spectrogram, the frequency where its sound stops, and a verdict with a confidence figure and the reasons behind it.
Key features
- Up to 200 files, analysed two at a time; each is read at its own sample rate, up to 12 minutes at 44.1 kHz and shorter at higher rates
- Cutoff search from 12 kHz to just under the Nyquist frequency, reporting the cutoff, the size of the drop and how flat the floor above it is
- A check, run on each channel separately, for 16-bit data stored in a 24-bit WAV, FLAC or AIFF, and a flag for files that are lossy formats to begin with (an M4A is called lossy only when its codec is AAC or another lossy one; ALAC files are analysed)
- A spectrogram and a smoothed average spectrum for any file you select, and a CSV report of the whole folder
How the cutoff and the verdict are decided
The file is decoded to mono and a spectrum is taken with 4,096-point windows, at up to 1,200 evenly spaced positions, so a 12-minute track is sampled across its length. Positions quieter than -70 dB relative to full scale are left out so silence between songs does not flatten the average. The remaining power is averaged and smoothed over about 160 Hz. The Audio Spectrogram page here draws one file for you to judge; this page searches for the edge, scores it, and works through a folder.
The detector slides along the average from 12 kHz and, at each frequency, compares the level in the 400 Hz band just below it with the 400 Hz band just above it. The steepest fall is the candidate cutoff. A fall of 30 dB or more with a floor that varies by under 12 dB is taken as a lowpass. A fall of 20 to 30 dB, or a less flat floor, is called possible. At 44.1 and 48 kHz a cutoff at 20.8 kHz or higher is treated as the converter's own anti-alias filter, not as evidence.
How it works
The verdict is one of four: lossy source, possible lossy source, no cutoff found, or inconclusive when the file is almost silent or its sample rate stops below 16 kHz. Confidence for a lossy verdict is the drop in dB minus 20, divided by 25, capped at 1. A cutoff between 19.7 and 20.8 kHz at 44.1 or 48 kHz is only ever reported as possible, with the confidence halved, because some genuine masters are low-passed there too.
In a file sampled at 88.2 kHz or higher, a cutoff between 20.5 and 24.8 kHz is reported as upsampled content: the file's extra bandwidth is empty because the audio began at 44.1 or 48 kHz. That is not proof of a lossy source, only of an upsample.
Common use cases
- A collector with 400 FLAC albums from forums checks each folder and sorts the CSV by verdict to find the files that need replacing.
- A buyer of a 24-bit/96 kHz download finds a cutoff at 22.3 kHz and sees it flagged as upsampled, so the hi-res label adds nothing over a CD rip.
- A '24-bit/48 kHz' FLAC album from a small label: the claimed bit depth column says 24, but Samples fit 16 bits says yes, which means every sample lies on the 16-bit grid and the extra 8 bits are padding from a 16-bit master.
How to use this tool
- Choose files or a folder; files that are not audio are skipped.
- Let the analysis run; the table fills in file by file and Cancel stops the queue.
- Select a file name to see its spectrogram, its average spectrum with the cutoff marked, and the reasoning.
- Download the CSV report for the folder.
Example
A FLAC whose spectrum looks like a 128 kbps MP3: music-like content up to 16 kHz and almost nothing above (an illustrative case)
44.1 kHz FLACThe row and the reasoning it shows
Cutoff 16.3 kHz, drop 39 dB, floor above it within 6.5 dB, verdict Likely from a lossy source, confidence 76%.
"The spectrum falls 39 dB within about 400 Hz at 16.3 kHz and stays flat above it." The hint beside it says a cutoff near 16 kHz is the classic lowpass of a 128 kbps-class MP3 or AAC file.
The same shape at 19.3 kHz also scores 76% and the hint changes to a 192 to 224 kbps class.Tips for best results
- Look at a file whose verdict is Possible yourself: a true lowpass is a clean horizontal edge across the whole spectrogram, while natural roll-off is a soft fade that varies from passage to passage.
- Check a track with loud, full-band content (cymbals, strings) rather than a quiet intro; with little energy near 16 kHz, a cutoff cannot be told from silence.
- A 16-bit-padded flag on a file that claims 24 bits is a separate, simpler finding than the cutoff: every sample sits on the 16-bit grid. Chromium scales 16-bit samples by 32767 when they are positive and 32768 when they are negative, other browsers by 32768, so the check accepts a sample on either grid.
Common pitfalls
A low cutoff does not prove a file is fake. Some recordings, tape transfers and old digital masters are band-limited by choice, and a lowpass near 20 kHz is only a weak sign.
A clean result does not prove a file is first generation. A lossy source can be decoded, then boosted, re-filtered or mixed with noise until the edge is gone.
Loud noise above the lowpass, such as hiss added by a restoration step, fills the edge in and can hide it.
Common errors and how to fix them
- The file is almost entirely silent, so there is no spectrum to judge
- Fewer than 4 positions in the file were louder than -70 dB. Check that the file plays and has content.
- "track.flac" is 15 minutes long; this tool takes up to 12 minutes
- Cut the file to a shorter section from the middle of a loud track; the page only needs enough audio for a representative spectrum.
Best practices
- Run the whole folder, then open the Possible and Inconclusive rows and judge those by eye; the Likely and clean rows rarely need it.
- Keep files from one source in one folder so the CSV groups them, and note the claimed bit depth column for hi-res downloads.
Why the shelf sits where it does
A lossy encoder removes content above a lowpass to save bits for the part of the spectrum most listeners hear, and the lowpass is chosen from the bitrate. A cutoff near 16 kHz usually goes with a 128 kbps-class file, near 19 kHz with 192 to 224 kbps, and near 20 kHz with 256 or 320 kbps. Those are common settings, not a table: encoders and versions differ, so the page words them as typical.
A genuine CD rip has content up to about 20 to 21 kHz and then falls into the anti-alias filter of the converter, which is steep too. That is why the 19.7 to 20.8 kHz range gets less confidence and why a cutoff of 20.8 kHz or higher at 44.1 or 48 kHz is not counted.
Frequently asked questions
What does the Samples fit 16 bits column mean?
It says whether nearly every sample, in every channel, is a whole number of 16-bit steps. A genuine 16-bit file says yes. A 24-bit file that says yes was padded up from 16-bit audio, and one that says no carries real 24-bit detail. It is a check on the sample values, so it cannot tell a 16-bit master that was later volume-adjusted in 24 bits.
Can it tell MP3 from AAC?
No. Both leave a lowpass, and the cutoff only suggests a bitrate class. The page does not identify the codec of a file that has already been decoded.
Why is a real MP3 file reported as a lossy format?
A file whose container is MP3, AAC, Opus or Vorbis is lossy by definition, so the verdict column says Lossy format and the spectrum is shown for information only. An M4A is called lossy only when its codec is read as lossy; an ALAC file is analysed like any other lossless file, whether its codec information sits at the start or the end of the file.