LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

flac

free lossless audio codec encoder and decoder

TLDR

Encode WAV to FLAC
$ flac [audio.wav]
copy
Decode FLAC to WAV
$ flac -d [audio.flac]
copy
Maximum compression
$ flac -8 [audio.wav]
copy
Fast compression
$ flac --fast [audio.wav]
copy
Test file integrity
$ flac -t [audio.flac]
copy
Add metadata tags during encoding
$ flac -T "ARTIST=[Name]" -T "TITLE=[Song]" [audio.wav]
copy
Output to specific file
$ flac -o [output.flac] [input.wav]
copy

SYNOPSIS

flac [options] files...

DESCRIPTION

flac encodes and decodes audio in the Free Lossless Audio Codec format. FLAC provides lossless compression, meaning the audio is identical to the original after decoding.The tool handles encoding, decoding, testing, and metadata operations. FLAC files are typically 50-60% of the original size while maintaining perfect audio fidelity.

PARAMETERS

-d, --decode

Decode FLAC to WAV.
-t, --test
Test file integrity.
-a, --analyze
Analyze file.
-0 to -8
Compression level (0=fast, 8=best).
--fast
Same as -0.
--best
Same as -8.
-o file
Output file name.
-c, --stdout
Write output to stdout.
-f, --force
Force overwriting of output files.
-T, --tag= FIELD=VALUE
Add a Vorbis comment tag (may be repeated).
--tag-from-file= FIELD=FILENAME
Read the tag value from a file.
--delete-input-file
Delete input after successful encoding/decoding.
-s, --silent
Suppress runtime statistics.
-V, --verify
Verify by decoding in parallel during encoding.
-w, --warnings-as-errors
Treat all warnings as errors.

CAVEATS

Higher compression levels slower but not much smaller. Decoding speed consistent regardless of level. Some players don't support all FLAC features.

HISTORY

FLAC was created by Josh Coalson starting in 2000. It became the leading open source lossless audio format, gaining support in most media players and devices. The project became part of the Xiph.Org Foundation alongside Ogg Vorbis.

SEE ALSO

sox(1), lame(1), ffmpeg(1), metaflac(1)

Copied to clipboard
Kai