LinuxCommandLibrary

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
$ flac --tag="ARTIST=[Name]" --tag="TITLE=[Song]" [audio.flac]
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.
--tag= field=value
Add metadata tag.
--delete-input-file
Delete input after encoding.
-s, --silent
Suppress output.
--verify
Verify during encoding.

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community