Skip to content

Command line

trueflac check <file or folder>... [--json]
trueflac --version

check takes files, folders, or both. Folders are searched with their subfolders for .flac, .wav, .aiff and .aif files, in name order.

Terminal window
$ trueflac check Album/
ok 01 - Echoplex (CD).flac No sign of a lossy source
suspect 02 - Echoplex (from MP3 128).flac Highs cut at 16.6 kHz, like a lossy file
suspect 03 - Echoplex (from MP3 V0).flac Block grid of a lossy encoder (MP3)
suspect 04 - Echoplex (from AAC 256).flac Block grid of a lossy encoder (AAC)
suspect 05 - Echoplex (from Vorbis q6).flac Block grid of a lossy encoder (Vorbis)

This is a real run on one clip of the bench (Nine Inch Nails, The Slip) and four fakes made from it. Each line holds the status, the file name and the clue:

Line Meaning
No sign of a lossy source Nothing found.
Highs end at 21.0 kHz, as on a CD The highs stop sharply, but high enough for a CD master.
Highs cut at 16.6 kHz, like a lossy file Suspect: the highs stop where an encoder stops them.
Block grid of a lossy encoder (MP3) Suspect: the block grid of an MP3, AAC or Vorbis encoder is in the sound.
Unreadable: … The file could not be decoded; the reason follows.

--json prints one JSON object per file and per line, with the fields of the verdict:

Terminal window
$ trueflac check --json "Album/02 - Echoplex (from MP3 128).flac"
{"path": "Album/02 - Echoplex (from MP3 128).flac", "status": "suspect", "clue": "cut", "codec": null, "cutoff_hz": 16618.24951171875, "grid_contrast": null, "sample_rate": 44100, "bit_depth": 16, "channels": 2, "seconds": 60.0, "error": null}
Code When
0 No file is suspect (unreadable files do not count).
1 At least one file is suspect.
2 The command line is wrong.

So a script can stop on the first suspect album:

Terminal window
trueflac check "$album" > /dev/null || echo "$album: suspect files"

About 1.5 s for a genuine track on an Apple Silicon Mac, less for a suspect one: a file cut in the highs needs no grid search. The command checks one file at a time; the library can use several threads.

Built with Kiln