LinuxCommandLibrary

reflac

Re-encode FLAC audio files

TLDR

Re-encode FLAC files

$ reflac [path/to/music]
copy
Maximum compression
$ reflac -8 [path/to/music]
copy
Verify after encoding
$ reflac --verify [path/to/music]
copy
Preserve file times
$ reflac --preserve-modtime [path/to/music]
copy
Dry run
$ reflac --dry-run [path/to/music]
copy
Recursive processing
$ reflac -r [path/to/directory]
copy

SYNOPSIS

reflac [-0..-8] [--verify] [options] path

DESCRIPTION

reflac is a batch tool for re-encoding FLAC audio files with updated compression settings. It recursively processes directories of FLAC files, applying the specified compression level while preserving all metadata tags, ensuring no audio data is lost during the process.
The tool supports parallel processing via the -j option, significantly speeding up operations on large music libraries. Compression levels range from -0 (fastest) to -8 (smallest file size), matching the standard FLAC encoder options. The --verify flag enables integrity checking by decoding each re-encoded file and comparing it against the original audio data.
This is particularly useful when upgrading a FLAC collection encoded with older or suboptimal compression settings to take advantage of improved encoding in newer FLAC versions, reducing storage requirements without any quality loss.

PARAMETERS

-0 to -8

Compression level.
--verify
Verify after encode.
--preserve-modtime
Keep file times.
--dry-run
Show what would happen.
-r, --recursive
Process subdirectories.
-j N
Parallel jobs.

CAVEATS

Requires FLAC encoder. CPU intensive at high levels. No quality improvement possible.

HISTORY

reflac was created to batch re-encode FLAC files with modern compression settings while preserving all metadata.

SEE ALSO

flac(1), metaflac(1), sox(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community