← 返回命令列表

Linux command

flac 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Encode WAV to FLAC

flac [audio.wav]

Decode FLAC to WAV

flac -d [audio.flac]

Maximum compression

flac -8 [audio.wav]

Fast compression

flac --fast [audio.wav]

Test file integrity

flac -t [audio.flac]

Add metadata tags

flac -T "ARTIST=[Name]" -T "TITLE=[Song]" [audio.wav]

Output to specific file

flac -o [output.flac] [input.wav]

说明

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.

参数

-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.

FAQ

What is the flac command used for?

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.

How do I run a basic flac example?

Run `flac [audio.wav]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -d, --decode do in flac?

Decode FLAC to WAV.