1 .\" This manpage has been automatically generated by docbook2man
2 .\" from a DocBook document. This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
4 .\" Please send any bug reports, improvements, comments, patches,
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "FLAC" "1" "29 July 2004" "" ""
8 flac \- Free Lossless Audio Codec
11 \fBflac\fR [ \fB\fIoptions\fB\fR ] [ \fB\fIinfile.wav\fB\fR | \fB\fIinfile.aiff\fB\fR | \fB\fIinfile.raw\fB\fR | \fB-\fR\fI ...\fR ]
14 \fBflac\fR [ \fB-d\fR | \fB--decode\fR | \fB-t\fR | \fB--test\fR | \fB-a\fR | \fB--analyze\fR ] [ \fB\fIOPTIONS\fB\fR ] [ \fB\fIinfile.flac\fB\fR\fI ...\fR ]
18 \fBflac\fR is a command-line tool for
19 encoding, decoding, testing and analyzing FLAC streams.
21 This manual page was originally written for the Debian GNU/Linux
22 distribution because the original program did not have a
26 A summary of options is included below. For a complete
27 description, see the HTML documentation.
31 Show the flac version number
34 Show basic usage and a list of all options
37 Show detailed explanation of usage and all options
40 Decode (the default behavior is to encode)
43 Test a flac encoded file (same as -d
44 except no decoded file is written)
47 Analyze a FLAC encoded file (same as -d
48 except an analysis file is written)
51 Write output to stdout
54 Silent mode (do not write runtime
55 encode/decode statistics to stderr)
57 \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.
64 Force overwriting of output files. By default,
65 flac warns that the output file already exists and
66 continues to the next file.
68 \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.
74 \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
81 \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
87 \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
94 \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
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.
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'.
116 \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.
124 .SS "ANALYSIS OPTIONS"
126 \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.
131 \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
136 .SS "DECODING OPTIONS"
138 \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 seekpoint 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.
152 \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
160 .SS "ENCODING OPTIONS"
163 Verify a correct encoding by decoding the
164 output in parallel and comparing to the
168 Allow encoder to generate non-Subset
172 Calculate ReplayGain values and store in
173 Vorbis comments, similar to vorbisgain. Title
174 gains/peaks will be computed for each input
175 file, and an album gain/peak will be computed
176 for all files. All input files must have the
177 same resolution, sample rate, and number of
178 channels. Only mono and stereo files are
179 allowed, and the sample rate must be one of
180 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48
181 kHz. Also note that this option may leave a
182 few extra bytes in a PADDING block as the exact
183 size of the tags is not known until all files
184 are processed. Note that this option cannot be
185 used when encoding to standard output (stdout).
187 \fB--cuesheet=\fIfilename\fB\fR
188 Import the given cuesheet file and store it in a
189 CUESHEET metadata block. This option may only be used
190 when encoding a single file. A seekpoint will be added
191 for each index point in the cuesheet to the SEEKTABLE
192 unless --no-cued-seekpoints is specified.
195 Align encoding of multiple CD format WAVE
196 files on sector boundaries. See the HTML
197 documentation for more information.
199 \fB-S {\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}, --seekpoint={\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}\fR
200 Include a point or points in a SEEKTABLE. Using #,
201 a seek point at that sample number is added. Using
202 X, a placeholder point is added at the end of a the
203 table. Using #x, # evenly spaced seek points will
204 be added, the first being at sample 0. Using #s, a
205 seekpoint will be added every # seconds (# does not
206 have to be a whole number; it can be, for example, 9.5,
207 meaning a seekpoint every 9.5 seconds). You may use
208 many -S options; the resulting SEEKTABLE will be the
209 unique-ified union of all such values. With no -S
210 options, flac defaults to '-S 10s'. Use --no-seektable
211 for no SEEKTABLE. Note: '-S #x' and '-S #s' will not
212 work if the encoder can't determine the input size before
213 starting. Note: if you use '-S #' and # is >=
214 samples in the input, there will be either no seek
215 point entered (if the input size is determinable
216 before encoding starts) or a placeholder point (if
217 input size is not determinable).
219 \fB-P \fI#\fB, --padding=\fI#\fB\fR
220 Tell the encoder to write a PADDING metadata
221 block of the given length (in bytes) after the
222 STREAMINFO block. This is useful if you plan to
223 tag the file later with an APPLICATION block;
224 instead of having to rewrite the entire file later
225 just to insert your block, you can write directly
226 over the PADDING block. Note that the total length
227 of the PADDING block will be 4 bytes longer than
228 the length given because of the 4 metadata block
229 header bytes. You can force no PADDING block at
230 all to be written with --no-padding. The encoder
231 writes a PADDING block of 4096 bytes by default.
233 \fB-T \fIFIELD=VALUE\fB, --tag=\fIFIELD=VALUE\fB\fR
234 Add a Vorbis comment. The comment must adhere
235 to the Vorbis comment spec; i.e. the FIELD must
236 contain only legal characters, terminated by an
237 \&'equals' sign. Make sure to quote the comment if
238 necessary. This option may appear more than once
239 to add several comments. NOTE: all tags will be
240 added to all encoded files.
242 \fB-b \fI#\fB, --blocksize=\fI#\fB\fR
243 Specify the block size in samples. The
244 default is 1152 for -l 0, else 4608; must be one of
245 192, 576, 1152, 2304, 4608, 256, 512, 1024, 2048,
246 4096, 8192, 16384, or 32768 (unless --lax is used)
249 Try mid-side coding for each frame (stereo
252 \fB-M, --adaptive-mid-side\fR
253 Adaptive mid-side coding for all frames (stereo
256 \fB-0..-8, --compression-level-0..--compression-level-8\fR
257 Fastest compression..highest compression
258 (default is -5). These are synonyms for other
262 \fB-0, --compression-level-0\fR
263 Synonymous with -l 0 -b 1152 -r 2,2
265 \fB-1, --compression-level-1\fR
266 Synonymous with -l 0 -b 1152 -M -r 2,2
268 \fB-2, --compression-level-2\fR
269 Synonymous with -l 0 -b 1152 -m -r 3
271 \fB-3, --compression-level-3\fR
272 Synonymous with -l 6 -b 4608 -r 3,3
274 \fB-4, --compression-level-4\fR
275 Synonymous with -l 8 -b 4608 -M -r 3,3
277 \fB-5, --compression-level-5\fR
278 Synonymous with -l 8 -b 4608 -m -r 3,3
280 \fB-6, --compression-level-6\fR
281 Synonymous with -l 8 -b 4608 -m -r 4
283 \fB-7, --compression-level-7\fR
284 Synonymous with -l 8 -b 4608 -m -e -r 6
286 \fB-8, --compression-level-8\fR
287 Synonymous with -l 12 -b 4608 -m -e -r 6
291 Fastest compression. Currently
295 Highest compression. Currently
298 \fB-e, --exhaustive-model-search\fR
299 Do exhaustive model search
302 \fB-l \fI#\fB, --max-lpc-order=\fI#\fB\fR
303 Set the maximum LPC order; 0 means use only the fixed predictors
305 \fB-p, --qlp-coeff-precision-search\fR
306 Do exhaustive search of LP coefficient
307 quantization (expensive!). Overrides -q;
308 does nothing if using -l 0
310 \fB-q \fI#\fB, --qlp-coeff-precision=\fI#\fB\fR
311 Precision of the quantized linear-predictor
312 coefficients, 0 => let encoder decide (min is 5,
315 \fB-r [\fI#\fB,]\fI#\fB, --rice-partition-order=[\fI#\fB,]\fI#\fB\fR
316 Set the [min,]max residual partition order
317 (0..16). min defaults to 0 if unspecified. Default
321 \fB--endian={\fIbig\fB|\fIlittle\fB}\fR
322 Set the byte order for samples
324 \fB--channels=\fI#\fB\fR
325 Set number of channels.
330 \fB--sample-rate=\fI#\fB\fR
331 Set sample rate (in Hz).
333 \fB--sign={\fIsigned\fB|\fIunsigned\fB}\fR
334 Set the sign of samples (the default is signed).
336 \fB--force-aiff-format\fR
337 Force the decoder to output AIFF format. This option
338 is not needed if the output filename (as set by -o) ends
339 with \fI.aiff\fR. Also, this option has no
340 effect when encoding since input AIFF is auto-detected.
342 \fB--force-raw-format\fR
343 Force input (when encoding) or output (when decoding)
344 to be treated as raw samples (even if filename ends
346 .SS "NEGATIVE OPTIONS"
348 \fB--no-adaptive-mid-side\fR
350 \fB--no-decode-through-errors\fR
352 \fB--no-delete-input-file\fR
354 \fB--no-exhaustive-model-search\fR
364 \fB--no-qlp-coeff-precision-search\fR
366 \fB--no-residual-gnuplot\fR
368 \fB--no-residual-text\fR
370 \fB--no-sector-align\fR
377 These flags can be used to invert the sense
378 of the corresponding normal option.
383 The programs are documented fully by HTML format
384 documentation, available in
385 \fI/usr/share/doc/flac/html\fR on
386 Debian GNU/Linux systems.
389 This manual page was written by Matt Zimmerman <mdz@debian.org> for
390 the Debian GNU/Linux system (but may be used by others).