update to match latest sgml
[platform/upstream/flac.git] / man / flac.1
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" "02 February 2005" "" ""
7 .SH NAME
8 flac \- Free Lossless Audio Codec
9 .SH SYNOPSIS
10
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 ]
12
13
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 ]
15
16 .SH "DESCRIPTION"
17 .PP
18 \fBflac\fR is a command-line tool for
19 encoding, decoding, testing and analyzing FLAC streams.
20 .PP
21 This manual page was originally written for the Debian GNU/Linux
22 distribution because the original program did not have a
23 manual page.
24 .SH "OPTIONS"
25 .PP
26 A summary of options is included below.  For a complete
27 description, see the HTML documentation.
28 .SS "GENERAL OPTIONS"
29 .TP
30 \fB-v, --version \fR
31 Show the flac version number
32 .TP
33 \fB-h, --help \fR
34 Show basic usage and a list of all options
35 .TP
36 \fB-H, --explain \fR
37 Show detailed explanation of usage and all options
38 .TP
39 \fB-d, --decode \fR
40 Decode (the default behavior is to encode)
41 .TP
42 \fB-t, --test \fR
43 Test a flac encoded file (same as -d
44 except no decoded file is written)
45 .TP
46 \fB-a, --analyze \fR
47 Analyze a FLAC encoded file (same as -d
48 except an analysis file is written)
49 .TP
50 \fB-c, --stdout \fR
51 Write output to stdout
52 .TP
53 \fB-s, --silent \fR
54 Silent mode (do not write runtime
55 encode/decode statistics to stderr)
56 .TP
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.
62 .TP
63 \fB-f, --force \fR
64 Force overwriting of output files.  By default,
65 flac warns that the output file already exists and
66 continues to the next file.
67 .TP
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.
73 .TP
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
79 `/' (slash).
80 .TP
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
85 is left intact.
86 .TP
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
92 second.
93 .TP
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
103 audio.
104 .TP
105 \fB--ogg\fR
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.
111
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'.
115 .TP
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"
125 .TP
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.
130 .TP
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
135 files.
136 .SS "DECODING OPTIONS"
137 .TP
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 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.
151 .TP
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
159 sections.
160 .SS "ENCODING OPTIONS"
161 .TP
162 \fB-V, --verify\fR
163 Verify a correct encoding by decoding the
164 output in parallel and comparing to the
165 original
166 .TP
167 \fB--lax\fR
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
174 for archival.
175 .TP
176 \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).
191 .TP
192 \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.
198 .TP
199 \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.
203 .TP
204 \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).
223 .TP
224 \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.
237 .TP
238 \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.
246 .TP
247 \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)
252 .TP
253 \fB-m, --mid-side\fR
254 Try mid-side coding for each frame (stereo
255 input only)
256 .TP
257 \fB-M, --adaptive-mid-side\fR
258 Adaptive mid-side coding for all frames (stereo
259 input only)
260 .TP
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
264 options:
265 .RS
266 .TP
267 \fB-0, --compression-level-0\fR
268 Synonymous with -l 0 -b 1152 -r 2,2
269 .TP
270 \fB-1, --compression-level-1\fR
271 Synonymous with -l 0 -b 1152 -M -r 2,2
272 .TP
273 \fB-2, --compression-level-2\fR
274 Synonymous with -l 0 -b 1152 -m -r 3
275 .TP
276 \fB-3, --compression-level-3\fR
277 Synonymous with -l 6 -b 4608 -r 3,3
278 .TP
279 \fB-4, --compression-level-4\fR
280 Synonymous with -l 8 -b 4608 -M -r 3,3
281 .TP
282 \fB-5, --compression-level-5\fR
283 Synonymous with -l 8 -b 4608 -m -r 3,3
284 .TP
285 \fB-6, --compression-level-6\fR
286 Synonymous with -l 8 -b 4608 -m -r 4
287 .TP
288 \fB-7, --compression-level-7\fR
289 Synonymous with -l 8 -b 4608 -m -e -r 6
290 .TP
291 \fB-8, --compression-level-8\fR
292 Synonymous with -l 12 -b 4608 -m -e -r 6
293 .RE
294 .TP
295 \fB--fast\fR
296 Fastest compression.  Currently
297 synonymous with -0.
298 .TP
299 \fB--best\fR
300 Highest compression.  Currently
301 synonymous with -8.
302 .TP
303 \fB-e, --exhaustive-model-search\fR
304 Do exhaustive model search
305 (expensive!)
306 .TP
307 \fB-l \fI#\fB, --max-lpc-order=\fI#\fB\fR
308 Set the maximum LPC order; 0 means use only the fixed predictors
309 .TP
310 \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
314 .TP
315 \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,
318 default is 0)
319 .TP
320 \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
323 is -r 3,3.
324 .SS "FORMAT OPTIONS"
325 .TP
326 \fB--endian={\fIbig\fB|\fIlittle\fB}\fR
327 Set the byte order for samples
328 .TP
329 \fB--channels=\fI#\fB\fR
330 Set number of channels.
331 .TP
332 \fB--bps=\fI#\fB\fR
333 Set bits per sample.
334 .TP
335 \fB--sample-rate=\fI#\fB\fR
336 Set sample rate (in Hz).
337 .TP
338 \fB--sign={\fIsigned\fB|\fIunsigned\fB}\fR
339 Set the sign of samples (the default is signed).
340 .TP
341 \fB--input-size=\fI#\fB\fR
342 Specify the size of the raw input in bytes.  If you are
343 encoding raw samples from stdin, you must set this option
344 in order to be able to use --skip, --until, --cue-sheet, or
345 other options that need to know the size of the input
346 beforehand.  If the size given is greater than what is
347 found in the input stream, the encoder will complain about
348 an unexpected end-of-file.  If the size given is less,
349 samples will be truncated.
350 .TP
351 \fB--force-aiff-format\fR
352 Force the decoder to output AIFF format.  This option
353 is not needed if the output filename (as set by -o) ends
354 with \fI.aiff\fR.  Also, this option has no
355 effect when encoding since input AIFF is auto-detected.
356 .TP
357 \fB--force-raw-format\fR
358 Force input (when encoding) or output (when decoding)
359 to be treated as raw samples (even if filename ends
360 in \fI.wav\fR).
361 .SS "NEGATIVE OPTIONS"
362 .TP
363 \fB--no-adaptive-mid-side\fR
364 .TP
365 \fB--no-decode-through-errors\fR
366 .TP
367 \fB--no-delete-input-file\fR
368 .TP
369 \fB--no-exhaustive-model-search\fR
370 .TP
371 \fB--no-lax\fR
372 .TP
373 \fB--no-mid-side\fR
374 .TP
375 \fB--no-ogg\fR
376 .TP
377 \fB--no-padding\fR
378 .TP
379 \fB--no-qlp-coeff-precision-search\fR
380 .TP
381 \fB--no-residual-gnuplot\fR
382 .TP
383 \fB--no-residual-text\fR
384 .TP
385 \fB--no-sector-align\fR
386 .TP
387 \fB--no-seektable\fR
388 .TP
389 \fB--no-silent\fR
390 .TP
391 \fB--no-verify\fR
392 These flags can be used to invert the sense
393 of the corresponding normal option.
394 .SH "SEE ALSO"
395 .PP
396 metaflac(1).
397 .PP
398 The programs are documented fully by HTML format
399 documentation, available in
400 \fI/usr/share/doc/flac/html\fR on
401 Debian GNU/Linux systems.
402 .SH "AUTHOR"
403 .PP
404 This manual page was written by Matt Zimmerman <mdz@debian.org> for
405 the Debian GNU/Linux system (but may be used by others).