update to match sgml for 1.1.2 release
[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" "01 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.
170 .TP
171 \fB--replay-gain\fR
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).
186 .TP
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.
193 .TP
194 \fB--sector-align\fR
195 Align encoding of multiple CD format WAVE
196 files on sector boundaries.  See the HTML
197 documentation for more information.
198 .TP
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).
218 .TP
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.
232 .TP
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.
241 .TP
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)
247 .TP
248 \fB-m, --mid-side\fR
249 Try mid-side coding for each frame (stereo
250 input only)
251 .TP
252 \fB-M, --adaptive-mid-side\fR
253 Adaptive mid-side coding for all frames (stereo
254 input only)
255 .TP
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
259 options:
260 .RS
261 .TP
262 \fB-0, --compression-level-0\fR
263 Synonymous with -l 0 -b 1152 -r 2,2
264 .TP
265 \fB-1, --compression-level-1\fR
266 Synonymous with -l 0 -b 1152 -M -r 2,2
267 .TP
268 \fB-2, --compression-level-2\fR
269 Synonymous with -l 0 -b 1152 -m -r 3
270 .TP
271 \fB-3, --compression-level-3\fR
272 Synonymous with -l 6 -b 4608 -r 3,3
273 .TP
274 \fB-4, --compression-level-4\fR
275 Synonymous with -l 8 -b 4608 -M -r 3,3
276 .TP
277 \fB-5, --compression-level-5\fR
278 Synonymous with -l 8 -b 4608 -m -r 3,3
279 .TP
280 \fB-6, --compression-level-6\fR
281 Synonymous with -l 8 -b 4608 -m -r 4
282 .TP
283 \fB-7, --compression-level-7\fR
284 Synonymous with -l 8 -b 4608 -m -e -r 6
285 .TP
286 \fB-8, --compression-level-8\fR
287 Synonymous with -l 12 -b 4608 -m -e -r 6
288 .RE
289 .TP
290 \fB--fast\fR
291 Fastest compression.  Currently
292 synonymous with -0.
293 .TP
294 \fB--best\fR
295 Highest compression.  Currently
296 synonymous with -8.
297 .TP
298 \fB-e, --exhaustive-model-search\fR
299 Do exhaustive model search
300 (expensive!)
301 .TP
302 \fB-l \fI#\fB, --max-lpc-order=\fI#\fB\fR
303 Set the maximum LPC order; 0 means use only the fixed predictors
304 .TP
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
309 .TP
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,
313 default is 0)
314 .TP
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
318 is -r 3,3.
319 .SS "FORMAT OPTIONS"
320 .TP
321 \fB--endian={\fIbig\fB|\fIlittle\fB}\fR
322 Set the byte order for samples
323 .TP
324 \fB--channels=\fI#\fB\fR
325 Set number of channels.
326 .TP
327 \fB--bps=\fI#\fB\fR
328 Set bits per sample.
329 .TP
330 \fB--sample-rate=\fI#\fB\fR
331 Set sample rate (in Hz).
332 .TP
333 \fB--sign={\fIsigned\fB|\fIunsigned\fB}\fR
334 Set the sign of samples (the default is signed).
335 .TP
336 \fB--input-size=\fI#\fB\fR
337 Specify the size of the raw input in bytes.  If you are
338 encoding raw samples from stdin, you must set this option
339 in order to be able to use --skip, --until, --cue-sheet, or
340 other options that need to know the size of the input
341 beforehand.  If the size given is greater than what is
342 found in the input stream, the encoder will complain about
343 an unexpected end-of-file.  If the size given is less,
344 samples will be truncated.
345 .TP
346 \fB--force-aiff-format\fR
347 Force the decoder to output AIFF format.  This option
348 is not needed if the output filename (as set by -o) ends
349 with \fI.aiff\fR.  Also, this option has no
350 effect when encoding since input AIFF is auto-detected.
351 .TP
352 \fB--force-raw-format\fR
353 Force input (when encoding) or output (when decoding)
354 to be treated as raw samples (even if filename ends
355 in \fI.wav\fR).
356 .SS "NEGATIVE OPTIONS"
357 .TP
358 \fB--no-adaptive-mid-side\fR
359 .TP
360 \fB--no-decode-through-errors\fR
361 .TP
362 \fB--no-delete-input-file\fR
363 .TP
364 \fB--no-exhaustive-model-search\fR
365 .TP
366 \fB--no-lax\fR
367 .TP
368 \fB--no-mid-side\fR
369 .TP
370 \fB--no-ogg\fR
371 .TP
372 \fB--no-padding\fR
373 .TP
374 \fB--no-qlp-coeff-precision-search\fR
375 .TP
376 \fB--no-residual-gnuplot\fR
377 .TP
378 \fB--no-residual-text\fR
379 .TP
380 \fB--no-sector-align\fR
381 .TP
382 \fB--no-seektable\fR
383 .TP
384 \fB--no-silent\fR
385 .TP
386 \fB--no-verify\fR
387 These flags can be used to invert the sense
388 of the corresponding normal option.
389 .SH "SEE ALSO"
390 .PP
391 metaflac(1).
392 .PP
393 The programs are documented fully by HTML format
394 documentation, available in
395 \fI/usr/share/doc/flac/html\fR on
396 Debian GNU/Linux systems.
397 .SH "AUTHOR"
398 .PP
399 This manual page was written by Matt Zimmerman <mdz@debian.org> for
400 the Debian GNU/Linux system (but may be used by others).