40
36
Decode (the default behavior is to encode)
43
Test a flac encoded file (same as -d
44
except no decoded file is written)
39
Test a flac encoded file (same as -d except no decoded file is written)
46
41
\fB-a, --analyze \fR
47
Analyze a FLAC encoded file (same as -d
48
except an analysis file is written)
42
Analyze a FLAC encoded file (same as -d except an analysis file is written)
50
44
\fB-c, --stdout \fR
51
45
Write output to stdout
53
47
\fB-s, --silent \fR
54
Silent mode (do not write runtime
55
encode/decode statistics to stderr)
48
Silent mode (do not write runtime encode/decode statistics to stderr)
57
50
\fB--totally-silent \fR
58
Do not print anything of any kind,
59
including warnings or errors. The exit
60
code will be the only way to determine
61
successful completion.
51
Do not print anything of any kind, including warnings or errors. The exit code will be the only way to determine successful completion.
53
\fB-w, --warnings-as-errors \fR
54
Treat all warnings as errors (which cause flac to terminate with a non-zero exit code).
64
Force overwriting of output files. By default,
65
flac warns that the output file already exists and
66
continues to the next file.
57
Force overwriting of output files. By default, flac warns that the output file already exists and continues to the next file.
68
59
\fB-o \fIfilename\fB, --output-name=\fIfilename\fB\fR
69
Force the output file name (usually flac just
70
changes the extension). May only be used when
71
encoding a single file. May not be used in
72
conjunction with --output-prefix.
60
Force the output file name (usually flac just changes the extension). May only be used when encoding a single file. May not be used in conjunction with --output-prefix.
74
62
\fB--output-prefix=\fIstring\fB\fR
75
Prefix each output file name with the given
76
string. This can be useful for encoding or decoding
77
files to a different directory. Make sure if your
78
string is a path name that it ends with a trailing
63
Prefix each output file name with the given string. This can be useful for encoding or decoding files to a different directory. Make sure if your string is a path name that it ends with a trailing `/' (slash).
81
65
\fB--delete-input-file \fR
82
Automatically delete the input file after a
83
successful encode or decode. If there was an
84
error (including a verify error) the input file
66
Automatically delete the input file after a successful encode or decode. If there was an error (including a verify error) the input file is left intact.
87
68
\fB--skip={\fI#\fB|\fImm:ss.ss\fB}\fR
88
Skip over the first number of samples of the input.
89
This works for both encoding and decoding, but not
90
testing. The alternative form mm:ss.ss can be used
91
to specify minutes, seconds, and fractions of a
69
Skip over the first number of samples of the input. This works for both encoding and decoding, but not testing. The alternative form mm:ss.ss can be used to specify minutes, seconds, and fractions of a second.
94
71
\fB--until={\fI#\fB|[\fI+\fB|\fI-\fB]\fImm:ss.ss\fB}\fR
95
Stop at the given sample number for each input file.
96
This works for both encoding and decoding, but not testing.
97
The given sample number is not included in the decoded
98
output. The alternative form mm:ss.ss can be used to
99
specify minutes, seconds, and fractions of a second. If a
100
`+' (plus) sign is at the beginning, the --until point is
101
relative to the --skip point. If a `-' (minus) sign is at
102
the beginning, the --until point is relative to end of the
72
Stop at the given sample number for each input file. This works for both encoding and decoding, but not testing. The given sample number is not included in the decoded output. The alternative form mm:ss.ss can be used to specify minutes, seconds, and fractions of a second. If a `+' (plus) sign is at the beginning, the --until point is relative to the --skip point. If a `-' (minus) sign is at the beginning, the --until point is relative to end of the audio.
106
When encoding, generate Ogg FLAC output instead
107
of native FLAC. Ogg FLAC streams are FLAC streams
108
wrapped in an Ogg transport layer. The resulting
109
file should have an '.ogg' extension and will still
110
be decodable by flac.
75
When encoding, generate Ogg FLAC output instead of native FLAC. Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer. The resulting file should have an '.ogg' extension and will still be decodable by flac.
112
When decoding, force the input to be treated as
113
Ogg FLAC. This is useful when piping input from
114
stdin or when the filename does not end in '.ogg'.
77
When decoding, force the input to be treated as Ogg FLAC. This is useful when piping input from stdin or when the filename does not end in '.ogg'.
116
79
\fB--serial-number=\fI#\fB\fR
117
When used with --ogg, specifies the serial number to
118
use for the first Ogg FLAC stream, which is then
119
incremented for each additional stream. When encoding and
120
no serial number is given, flac uses a random number for
121
the first stream, then increments it for each additional
122
stream. When decoding and no number is given, flac uses
123
the serial number of the first page.
80
When used with --ogg, specifies the serial number to use for the first Ogg FLAC stream, which is then incremented for each additional stream. When encoding and no serial number is given, flac uses a random number for the first stream, then increments it for each additional stream. When decoding and no number is given, flac uses the serial number of the first page.
124
81
.SS "ANALYSIS OPTIONS"
126
83
\fB--residual-text \fR
127
Includes the residual signal in the analysis
128
file. This will make the file very big, much
129
larger than even the decoded file.
84
Includes the residual signal in the analysis file. This will make the file very big, much larger than even the decoded file.
131
86
\fB--residual-gnuplot \fR
132
Generates a gnuplot file for every subframe;
133
each file will contain the residual distribution
134
of the subframe. This will create a lot of
87
Generates a gnuplot file for every subframe; each file will contain the residual distribution of the subframe. This will create a lot of files.
136
88
.SS "DECODING OPTIONS"
138
90
\fB--cue=[\fI#.#\fB][-[\fI#.#\fB]]\fR
139
Set the beginning and ending cuepoints to decode.
140
The optional first #.# is the track and index point at
141
which decoding will start; the default is the beginning
142
of the stream. The optional second #.# is the track
143
and index point at which decoding will end; the default
144
is the end of the stream. If the cuepoint does not
145
exist, the closest one before it (for the start point)
146
or after it (for the end point) will be used. If those
147
don't exist, the start of the stream (for the start
148
point) or end of the stream (for the end point) will be
149
used. The cuepoints are merely translated into sample
150
numbers then used as --skip and --until.
91
Set the beginning and ending cuepoints to decode. The optional first #.# is the track and index point at which decoding will start; the default is the beginning of the stream. The optional second #.# is the track and index point at which decoding will end; the default is the end of the stream. If the cuepoint does not exist, the closest one before it (for the start point) or after it (for the end point) will be used. If those don't exist, the start of the stream (for the start point) or end of the stream (for the end point) will be used. The cuepoints are merely translated into sample numbers then used as --skip and --until. A CD track can always be cued by, for example, --cue=9.1-10.1 for track 9, even if the CD has no 10th track.
152
93
\fB-F, --decode-through-errors \fR
153
By default flac stops decoding with an error
154
and removes the partially decoded file if it
155
encounters a bitstream error. With -F, errors are
156
still printed but flac will continue decoding to
157
completion. Note that errors may cause the decoded
158
audio to be missing some samples or have silent
94
By default flac stops decoding with an error and removes the partially decoded file if it encounters a bitstream error. With -F, errors are still printed but flac will continue decoding to completion. Note that errors may cause the decoded audio to be missing some samples or have silent sections.
160
95
.SS "ENCODING OPTIONS"
162
97
\fB-V, --verify\fR
163
Verify a correct encoding by decoding the
164
output in parallel and comparing to the
98
Verify a correct encoding by decoding the output in parallel and comparing to the original
168
Allow encoder to generate non-Subset
169
files. The resulting FLAC file may not be
170
streamable or might have trouble being played
171
in all players (especially hardware devices),
172
so you should only use this option in
173
combination with custom encoding options meant
101
Allow encoder to generate non-Subset files. The resulting FLAC file may not be streamable or might have trouble being played in all players (especially hardware devices), so you should only use this option in combination with custom encoding options meant for archival.
176
103
\fB--replay-gain\fR
177
Calculate ReplayGain values and store in
178
Vorbis comments, similar to vorbisgain. Title
179
gains/peaks will be computed for each input
180
file, and an album gain/peak will be computed
181
for all files. All input files must have the
182
same resolution, sample rate, and number of
183
channels. Only mono and stereo files are
184
allowed, and the sample rate must be one of
185
8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48
186
kHz. Also note that this option may leave a
187
few extra bytes in a PADDING block as the exact
188
size of the tags is not known until all files
189
are processed. Note that this option cannot be
190
used when encoding to standard output (stdout).
104
Calculate ReplayGain values and store them as FLAC tags, similar to vorbisgain. Title gains/peaks will be computed for each input file, and an album gain/peak will be computed for all files. All input files must have the same resolution, sample rate, and number of channels. Only mono and stereo files are allowed, and the sample rate must be one of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48 kHz. Also note that this option may leave a few extra bytes in a PADDING block as the exact size of the tags is not known until all files are processed. Note that this option cannot be used when encoding to standard output (stdout).
192
106
\fB--cuesheet=\fIfilename\fB\fR
193
Import the given cuesheet file and store it in a
194
CUESHEET metadata block. This option may only be used
195
when encoding a single file. A seekpoint will be added
196
for each index point in the cuesheet to the SEEKTABLE
197
unless --no-cued-seekpoints is specified.
107
Import the given cuesheet file and store it in a CUESHEET metadata block. This option may only be used when encoding a single file. A seekpoint will be added for each index point in the cuesheet to the SEEKTABLE unless --no-cued-seekpoints is specified.
109
\fB--picture={\fIFILENAME\fB|\fISPECIFICATION\fB}\fR
110
Import a picture and store it in a PICTURE metadata block. More than one --picture command can be specified. Either a filename for the picture file or a more complete specification form can be used. The SPECIFICATION is a string whose parts are separated by | (pipe) characters. Some parts may be left empty to invoke default values. FILENAME is just shorthand for "||||FILENAME". The format of SPECIFICATION is
112
[TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE
114
TYPE is optional; it is a number from one of:
118
1: 32x32 pixels 'file icon' (PNG only)
128
6: Media (e.g. label side of CD)
130
7: Lead artist/lead performer/soloist
140
12: Lyricist/text writer
142
13: Recording Location
146
15: During performance
148
16: Movie/video screen capture
150
17: A bright coloured fish
154
19: Band/artist logotype
156
20: Publisher/Studio logotype
158
The default is 3 (front cover). There may only be one picture each of type 1 and 2 in a file.
160
MIME-TYPE is optional; if left blank, it will be detected from the file. For best compatibility with players, use pictures with MIME type image/jpeg or image/png. The MIME type can also be --> to mean that FILE is actually a URL to an image, though this use is discouraged.
162
DESCRIPTION is optional; the default is an empty string.
164
The next part specfies the resolution and color information. If the MIME-TYPE is image/jpeg, image/png, or image/gif, you can usually leave this empty and they can be detected from the file. Otherwise, you must specify the width in pixels, height in pixels, and color depth in bits-per-pixel. If the image has indexed colors you should also specify the number of colors used. When manually specified, it is not checked against the file for accuracy.
166
FILE is the path to the picture file to be imported, or the URL if MIME type is -->
168
For example, "|image/jpeg|||../cover.jpg" will embed the JPEG file at ../cover.jpg, defaulting to type 3 (front cover) and an empty description. The resolution and color info will be retrieved from the file itself.
170
The specification "4|-->|CD|320x300x24/173|http://blah.blah/backcover.tiff" will embed the given URL, with type 4 (back cover), description "CD", and a manually specified resolution of 320x300, 24 bits-per-pixel, and 173 colors. The file at the URL will not be fetched; the URL itself is stored in the PICTURE metadata block.
199
172
\fB--sector-align\fR
200
Align encoding of multiple CD format WAVE
201
files on sector boundaries. See the HTML
202
documentation for more information.
173
Align encoding of multiple CD format files on sector boundaries. See the HTML documentation for more information.
204
175
\fB-S {\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}, --seekpoint={\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}\fR
205
Include a point or points in a SEEKTABLE. Using #,
206
a seek point at that sample number is added. Using
207
X, a placeholder point is added at the end of a the
208
table. Using #x, # evenly spaced seek points will
209
be added, the first being at sample 0. Using #s, a
210
seekpoint will be added every # seconds (# does not
211
have to be a whole number; it can be, for example, 9.5,
212
meaning a seekpoint every 9.5 seconds). You may use
213
many -S options; the resulting SEEKTABLE will be the
214
unique-ified union of all such values. With no -S
215
options, flac defaults to '-S 10s'. Use --no-seektable
216
for no SEEKTABLE. Note: '-S #x' and '-S #s' will not
217
work if the encoder can't determine the input size before
218
starting. Note: if you use '-S #' and # is >=
219
samples in the input, there will be either no seek
220
point entered (if the input size is determinable
221
before encoding starts) or a placeholder point (if
222
input size is not determinable).
176
Include a point or points in a SEEKTABLE. Using #, a seek point at that sample number is added. Using X, a placeholder point is added at the end of a the table. Using #x, # evenly spaced seek points will be added, the first being at sample 0. Using #s, a seekpoint will be added every # seconds (# does not have to be a whole number; it can be, for example, 9.5, meaning a seekpoint every 9.5 seconds). You may use many -S options; the resulting SEEKTABLE will be the unique-ified union of all such values. With no -S options, flac defaults to '-S 10s'. Use --no-seektable for no SEEKTABLE. Note: '-S #x' and '-S #s' will not work if the encoder can't determine the input size before starting. Note: if you use '-S #' and # is >= samples in the input, there will be either no seek point entered (if the input size is determinable before encoding starts) or a placeholder point (if input size is not determinable).
224
178
\fB-P \fI#\fB, --padding=\fI#\fB\fR
225
Tell the encoder to write a PADDING metadata
226
block of the given length (in bytes) after the
227
STREAMINFO block. This is useful if you plan to
228
tag the file later with an APPLICATION block;
229
instead of having to rewrite the entire file later
230
just to insert your block, you can write directly
231
over the PADDING block. Note that the total length
232
of the PADDING block will be 4 bytes longer than
233
the length given because of the 4 metadata block
234
header bytes. You can force no PADDING block at
235
all to be written with --no-padding. The encoder
236
writes a PADDING block of 4096 bytes by default.
179
Tell the encoder to write a PADDING metadata block of the given length (in bytes) after the STREAMINFO block. This is useful if you plan to tag the file later with an APPLICATION block; instead of having to rewrite the entire file later just to insert your block, you can write directly over the PADDING block. Note that the total length of the PADDING block will be 4 bytes longer than the length given because of the 4 metadata block header bytes. You can force no PADDING block at all to be written with --no-padding. The encoder writes a PADDING block of 8192 bytes by default (or 65536 bytes if the input audio stream is more that 20 minutes long).
238
181
\fB-T \fIFIELD=VALUE\fB, --tag=\fIFIELD=VALUE\fB\fR
239
Add a Vorbis comment. The comment must adhere
240
to the Vorbis comment spec; i.e. the FIELD must
241
contain only legal characters, terminated by an
242
\&'equals' sign. Make sure to quote the comment if
243
necessary. This option may appear more than once
244
to add several comments. NOTE: all tags will be
245
added to all encoded files.
182
Add a FLAC tag. The comment must adhere to the Vorbis comment spec; i.e. the FIELD must contain only legal characters, terminated by an 'equals' sign. Make sure to quote the comment if necessary. This option may appear more than once to add several comments. NOTE: all tags will be added to all encoded files.
184
\fB--tag-from-file=\fIFIELD=FILENAME\fB\fR
185
Like --tag, except FILENAME is a file whose contents will be read verbatim to set the tag value. The contents will be converted to UTF-8 from the local charset. This can be used to store a cuesheet in a tag (e.g. --tag-from-file="CUESHEET=image.cue"). Do not try to store binary data in tag fields! Use APPLICATION blocks for that.
247
187
\fB-b \fI#\fB, --blocksize=\fI#\fB\fR
248
Specify the block size in samples. The
249
default is 1152 for -l 0, else 4608; must be one of
250
192, 576, 1152, 2304, 4608, 256, 512, 1024, 2048,
251
4096, 8192, 16384, or 32768 (unless --lax is used)
188
Specify the block size in samples. Subset streams must use one of 192, 576, 1152, 2304, 4608, 256, 512, 1024, 2048, 4096 (and 8192 or 16384 if the sample rate is >48kHz).
253
190
\fB-m, --mid-side\fR
254
Try mid-side coding for each frame (stereo
191
Try mid-side coding for each frame (stereo input only)
257
193
\fB-M, --adaptive-mid-side\fR
258
Adaptive mid-side coding for all frames (stereo
194
Adaptive mid-side coding for all frames (stereo input only)
261
\fB-0..-8, --compression-level-0..--compression-level-8\fR
262
Fastest compression..highest compression
263
(default is -5). These are synonyms for other
196
\fB-0\&..-8, --compression-level-0\&..--compression-level-8\fR
197
Fastest compression..highest compression (default is -5). These are synonyms for other options:
267
200
\fB-0, --compression-level-0\fR
268
Synonymous with -l 0 -b 1152 -r 2,2
201
Synonymous with -l 0 -b 1152 -r 3
270
203
\fB-1, --compression-level-1\fR
271
Synonymous with -l 0 -b 1152 -M -r 2,2
204
Synonymous with -l 0 -b 1152 -M -r 3
273
206
\fB-2, --compression-level-2\fR
274
207
Synonymous with -l 0 -b 1152 -m -r 3
276
209
\fB-3, --compression-level-3\fR
277
Synonymous with -l 6 -b 4608 -r 3,3
210
Synonymous with -l 6 -b 4096 -r 4
279
212
\fB-4, --compression-level-4\fR
280
Synonymous with -l 8 -b 4608 -M -r 3,3
213
Synonymous with -l 8 -b 4096 -M -r 4
282
215
\fB-5, --compression-level-5\fR
283
Synonymous with -l 8 -b 4608 -m -r 3,3
216
Synonymous with -l 8 -b 4096 -m -r 5
285
218
\fB-6, --compression-level-6\fR
286
Synonymous with -l 8 -b 4608 -m -r 4
219
Synonymous with -l 8 -b 4096 -m -r 6
288
221
\fB-7, --compression-level-7\fR
289
Synonymous with -l 8 -b 4608 -m -e -r 6
222
Synonymous with -l 8 -b 4096 -m -e -r 6
291
224
\fB-8, --compression-level-8\fR
292
Synonymous with -l 12 -b 4608 -m -e -r 6
225
Synonymous with -l 12 -b 4096 -m -e -r 6
296
Fastest compression. Currently
229
Fastest compression. Currently synonymous with -0.
300
Highest compression. Currently
232
Highest compression. Currently synonymous with -8.
303
234
\fB-e, --exhaustive-model-search\fR
304
Do exhaustive model search
235
Do exhaustive model search (expensive!)
237
\fB-A \fIfunction\fB, --apodization=\fIfunction\fB\fR
238
Window audio data with given the apodization function. The functions are: bartlett, bartlett_hann, blackman, blackman_harris_4term_92db, connes, flattop, gauss(STDDEV), hamming, hann, kaiser_bessel, nuttall, rectangle, triangle, tukey(P), welch.
240
For gauss(STDDEV), STDDEV is the standard deviation (0<STDDEV<=0.5).
242
For tukey(P), P specifies the fraction of the window that is tapered (0<=P<=1; P=0 corresponds to "rectangle" and P=1 corresponds to "hann").
244
More than one -A option (up to 32) may be used. Any function that is specified erroneously is silently dropped. The encoder chooses suitable defaults in the absence of any -A options; any -A option specified replaces the default(s).
246
When more than one function is specified, then for every subframe the encoder will try each of them separately and choose the window that results in the smallest compressed subframe. Multiple functions can greatly increase the encoding time.
307
248
\fB-l \fI#\fB, --max-lpc-order=\fI#\fB\fR
308
Set the maximum LPC order; 0 means use only the fixed predictors
249
Specifies the maximum LPC order. This number must be <= 32. For Subset streams, it must be <=12 if the sample rate is <=48kHz. If 0, the encoder will not attempt generic linear prediction, and use only fixed predictors. Using fixed predictors is faster but usually results in files being 5-10% larger.
310
251
\fB-p, --qlp-coeff-precision-search\fR
311
Do exhaustive search of LP coefficient
312
quantization (expensive!). Overrides -q;
313
does nothing if using -l 0
252
Do exhaustive search of LP coefficient quantization (expensive!). Overrides -q; does nothing if using -l 0
315
254
\fB-q \fI#\fB, --qlp-coeff-precision=\fI#\fB\fR
316
Precision of the quantized linear-predictor
317
coefficients, 0 => let encoder decide (min is 5,
255
Precision of the quantized linear-predictor coefficients, 0 => let encoder decide (min is 5, default is 0)
320
257
\fB-r [\fI#\fB,]\fI#\fB, --rice-partition-order=[\fI#\fB,]\fI#\fB\fR
321
Set the [min,]max residual partition order
322
(0..16). min defaults to 0 if unspecified. Default
258
Set the [min,]max residual partition order (0..16). min defaults to 0 if unspecified. Default is -r 5.
324
259
.SS "FORMAT OPTIONS"
326
261
\fB--endian={\fIbig\fB|\fIlittle\fB}\fR