fakeflac-go

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: GPL-3.0 Imports: 27 Imported by: 0

README

fakeflac-go

A command-line tool to detect "fake" lossless audio files and optionally plot their frequency distribution. Analysis of lossy files is also supported.

fakeflac-go detects the percentage of the audio spectrum effectively remaining after a lossy transcode's low-pass filter

Algorithm ported from mevdschee/fakeflac

Requirements

Go >= v1.21

Note: ffmpeg is embedded in fakeflac-go and thus not required

Installation

go install github.com/drichline/fakeflac-go@latest

Usage

fakeflac-go accepts a space-separated list of filenames, and will ignore unsupported (e.g. text) files. Both lossless (e.g. .flac, .alac, .wav) and lossy (e.g. .mp3) formats are supported. For each file, fakeflac-go will output a score of 0-100 to the terminal, with 100 being a perfect flac.

The numeric score represents the percentage of "real" frequencies up to 22 kHz present in the input file.

With -plot, the spectra plot of each file will be saved to the current directory.


Usage: fakeflac-go [OPTIONS] [FILE]
Options:
  -plot
    	Enable spectrum plot output
  -boxcardx int
    	Boxcar filter window size (default 500) (default 500)
  -diff float
    	Lowpass cutoff magnitude drop test limit (default 1.25) (default 1.25)
  -dx int
    	Lowpass cutoff  (default 441)
  -limit float
    	Lowpass cutoff magnitude ratio test limit (default 1.1) (default 1.1)

Supported file extensions

".flac", ".wav", ".w64", ".aif", ".aiff", ".aifc", ".au", ".snd",
".mp3", ".mp2", ".aac", ".m4a", ".m4b", ".mp4", ".ac3", ".eac3",
".ogg", ".oga", ".opus", ".spx", ".mka", ".weba", ".webm",
".wma", ".ape", ".wv", ".tta", ".tak", ".shn", ".mpc",
".caf", ".amr", ".dts", ".voc", ".dsf", ".dff", ".alac"

Example output

$ fakeflac-go Centerfold.flac Sugar\ Sugar.flac 
Centerfold.flac: 73
Sugar Sugar.flac: 100

Screenshots

realfake

fakeflac-go plot of "fake" versus real flac


realfakespec

Example spectrograms of "fake" and real flacs

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL