fix bug in stats reporting
[flac.git] / man / flac.sgml
1 <!doctype refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
2
3   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
4   <!ENTITY dhfirstname "<firstname>Matt</firstname>">
5   <!ENTITY dhsurname   "<surname>Zimmerman</surname>">
6   <!-- Please adjust the date whenever revising the manpage. -->
7   <!ENTITY dhdate      "<date>June 04, 2002</date>">
8   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
9        allowed: see man(7), man(1). -->
10   <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
11   <!ENTITY dhemail     "<email>mdz@debian.org</email>">
12   <!ENTITY dhusername  "Matt Zimmerman">
13   <!ENTITY dhucpackage "<refentrytitle>FLAC</refentrytitle>">
14   <!ENTITY dhpackage   "flac">
15
16   <!ENTITY debian      "<productname>Debian GNU/Linux</productname>">
17   <!ENTITY gnu         "<acronym>GNU</acronym>">
18 ]>
19
20 <refentry>
21   <docinfo>
22     <address>
23         &dhemail;
24     </address>
25     <author>
26         &dhfirstname;
27         &dhsurname;
28       </author>
29         <copyright>
30                     <year>2002</year>
31                     <holder>&dhusername;</holder>
32         </copyright>
33             &dhdate;
34         </docinfo>
35   <refmeta>
36       &dhucpackage;
37
38       &dhsection;
39     </refmeta>
40       <refnamediv>
41                    <refname>&dhpackage;</refname>
42
43         <refpurpose>Free Lossless Audio Codec</refpurpose>
44       </refnamediv>
45         <refsynopsisdiv>
46           <cmdsynopsis>
47             <command>flac</command>
48
49             <arg><option><replaceable>OPTION</replaceable></option></arg>
50             <arg choice=plain><replaceable>infile</replaceable></arg>
51             <arg choice=plain><replaceable>...</replaceable></arg>
52           </cmdsynopsis>
53         </refsynopsisdiv>
54         <refsect1>
55           <title>DESCRIPTION</title>
56
57           <para>This manual page documents briefly the
58             <command>flac</command> command.</para>
59
60           <para>This manual page was written for the &debian;
61             distribution because the original program does not have a
62             manual page.  Instead, it has documentation in HTML
63             format; see below.</para>
64
65         </refsect1>
66         <refsect1>
67           <title>OPTIONS</title>
68
69           <para>A summary of options is included below.  For a complete
70           description, see the HTML documentation.</para>
71
72           <refsect2>
73             <title>Generic Options</title>
74
75             <variablelist>
76               <varlistentry>
77                 <term><option>-H</option>
78                 </term>
79                 <listitem>
80                   <para>Show detailed help screen</para>
81                 </listitem>
82               </varlistentry>
83
84               <varlistentry>
85                 <term><option>-d</option>
86                 </term>
87                 <listitem>
88                   <para>Decode (default behavior is encode)</para>
89                 </listitem>
90               </varlistentry>
91
92               <varlistentry>
93                 <term><option>-c</option>
94                 </term>
95                 <listitem>
96                   <para>Encode from standard input, or decode to
97                   standard output</para>
98                 </listitem>
99               </varlistentry>
100
101               <varlistentry>
102                 <term><option>-t</option>
103                 </term>
104                 <listitem>
105                   <para>Test a flac encoded file (same as -d
106                     except no decoded file is written)</para>
107                 </listitem>
108               </varlistentry>
109
110               <varlistentry>
111                 <term><option>-a</option>
112                 </term>
113                 <listitem>
114                   <para>Analyze a flac encoded file (same as -d
115                     except an analysis file is written)</para>
116                 </listitem>
117               </varlistentry>
118
119               <varlistentry>
120                 <term><option>-s</option>
121                 </term>
122                 <listitem>
123                   <para>Silent mode (do not write runtime
124                     encode/decode statistics to stdout)</para>
125                 </listitem>
126               </varlistentry>
127
128               <varlistentry>
129                 <term><option>-o</option> <replaceable>filename</replaceable></term>
130                 <listitem>
131                   <para>Force the output file name (usually flac just
132                     changes the extension).  May only be used when
133                     encoding a single file.  May not be used in
134                     conjunction with --output-prefix.</para>
135                 </listitem>
136               </varlistentry>
137
138               <varlistentry>
139                 <term><option>--output-prefix</option> <replaceable>string</replaceable></term>
140                 <listitem>
141                   <para>Prefix each output file name with the given
142                     string.  This can be useful for encoding/decoding
143                     files to a different directory.  Make sure if your
144                     string is a path name that it ends with a trailing
145                     `/' (slash).</para>
146                 </listitem>
147               </varlistentry>
148
149               <varlistentry>
150                 <term><option>--delete-input-file</option>
151                 </term>
152                 <listitem>
153                   <para>Automatically delete the input file after a
154                     successful encode or decode.  If there was an
155                     error (including a verify error) the input file
156                     is left intact.</para>
157                 </listitem>
158               </varlistentry>
159
160               <varlistentry>
161                 <term><option>--skip</option> <replaceable>samples</replaceable></term>
162                 <listitem>
163                   <para>Skip the specified number of samples at the
164                     beginning of the input file (can be used for both
165                     encoding and decoding)</para>
166                 </listitem>
167               </varlistentry>
168
169             </variablelist>
170           </refsect2>
171
172           <refsect2>
173             <title>Analysis Options</title>
174
175             <variablelist>
176               <varlistentry>
177                 <term><option>--a-rtext</option>
178                 </term>
179                 <listitem>
180                   <para>Includes the residual signal in the analysis
181                     file.  This will make the file very big, much
182                     larger than even the decoded file.</para>
183                 </listitem>
184               </varlistentry>
185
186               <varlistentry>
187                 <term><option>--a-rgp</option>
188                 </term>
189                 <listitem>
190                   <para>Generates a gnuplot file for every subframe;
191                     each file will contain the residual distribution
192                     of the subframe.  This will create a lot of
193                     files.</para>
194                 </listitem>
195               </varlistentry>
196
197             </variablelist>
198           </refsect2>
199
200           <refsect2>
201             <title>Decoding Options</title>
202
203             <variablelist>
204               <varlistentry>
205                 <term><option>-F</option>
206                 </term>
207                 <listitem>
208                   <para>By default flac stops decoding with an error
209                     and removes the partially decoded file if it
210                     encounters a bitstream error.  With -F, errors are
211                     still printed but flac will continue decoding to
212                     completion.  Note that errors may cause the decoded
213                     audio to be missing some samples or have silent
214                     sections.</para>
215                 </listitem>
216               </varlistentry>
217
218             </variablelist>
219           </refsect2>
220
221           <refsect2>
222             <title>Encoding Options</title>
223
224             <variablelist>
225               <varlistentry>
226                 <term><option>--ogg</option></term>
227
228                 <listitem>
229                   <para>When encoding, generate Ogg-FLAC output instead
230                     of native-FLAC.  Ogg-FLAC streams are FLAC streams
231                     wrapped in an Ogg transport layer.  The resulting
232                     file should have an '.ogg' extension and will still
233                     be decodable by flac.</para>
234                   <para>When decoding, force the input to be treated as
235                     Ogg-FLAC.  This is useful when piping input from
236                     stdin or when the filename does not end in '.ogg'.</para>
237                 </listitem>
238               </varlistentry>
239
240               <varlistentry>
241                 <term><option>--lax</option></term>
242
243                 <listitem>
244                   <para>Allow encoder to generate non-Subset
245                     files.</para>
246                 </listitem>
247               </varlistentry>
248
249               <varlistentry>
250                 <term><option>--sector-align</option></term>
251
252                 <listitem>
253                   <para>Align encoding of multiple CD format WAVE
254                     files on sector boundaries.  See the HTML
255                     documentation for more information.</para>
256                 </listitem>
257               </varlistentry>
258
259               <varlistentry>
260                 <term><option>-S</option> <replaceable>{ # | X | #x }</replaceable></term>
261
262                 <listitem>
263                   <para>
264                     Include a point or points in a SEEKTABLE.  Using #,
265                     a seek point at that sample number is added.  Using
266                     X, a placeholder point is added at the end of a the
267                     table.  Using #x, # evenly spaced seek points will
268                     be added, the first being at sample 0.  You may use
269                     many -S options; the resulting SEEKTABLE will be the
270                     unique-ified union of all such values.  With no -S
271                     options, flac defaults to '-S 100x'.  Use -S- for
272                     no SEEKTABLE.  Note: '-S #x' will not work if the
273                     encoder can't determine the input size before
274                     starting.  Note: if you use '-S #' and # is >=
275                     samples in the input, there will be either no seek
276                     point entered (if the input size is determinable
277                     before encoding starts) or a placeholder point (if
278                     input size is not determinable).</para>
279                 </listitem>
280               </varlistentry>
281
282               <varlistentry>
283                 <term><option>-P</option> <replaceable>bytes</replaceable></term>
284
285                 <listitem>
286                   <para>Tell the encoder to write a PADDING metadata
287                     block of the given length (in bytes) after the
288                     STREAMINFO block.  This is useful if you plan to
289                     tag the file later with an APPLICATION block;
290                     instead of having to rewrite the entire file later
291                     just to insert your block, you can write directly
292                     over the PADDING block.  Note that the total length
293                     of the PADDING block will be 4 bytes longer than
294                     the length given because of the 4 metadata block
295                     header bytes.  You can force no PADDING block at
296                     all to be written with -P-, which is the default.
297                     </para>
298                 </listitem>
299               </varlistentry>
300
301               <varlistentry>
302                 <term><option>-b</option> <replaceable>blocksize</replaceable></term>
303
304                 <listitem>
305                   <para>Default is 1152 for -l 0, else 4608; must be
306                     192/576/1152/2304/4608/256/512/1024/2048/4096/8192/16384/32768
307                     (unless --lax is used)</para>
308                 </listitem>
309               </varlistentry>
310
311               <varlistentry>
312                 <term><option>-m</option></term>
313
314                 <listitem>
315                   <para>Try mid-side coding for each frame (stereo
316                     input only)</para>
317                 </listitem>
318               </varlistentry>
319
320               <varlistentry>
321                 <term><option>-M</option></term>
322
323                 <listitem>
324                   <para>Loose mid-side coding for all frames (stereo
325                     input only)</para>
326                 </listitem>
327               </varlistentry>
328
329               <varlistentry>
330                 <term><option>-0</option>..<option>-8</option></term>
331
332                 <listitem>
333                   <para>Fastest compression..highest compression
334                     (default is -5).  These are synonyms for other
335                     options:</para>
336
337                   <variablelist>
338                     <varlistentry>
339                       <term><option>-0</option></term>
340
341                       <listitem>
342                         <para>Synonymous with -l 0 -b 1152 -r 2,2
343                           </para>
344                       </listitem>
345                     </varlistentry>
346
347                     <varlistentry>
348                       <term><option>-1</option></term>
349
350                       <listitem>
351                         <para>Synonymous with -l 0 -b 1152 -M -r 2,2
352                           </para>
353                       </listitem>
354                     </varlistentry>
355
356                     <varlistentry>
357                       <term><option>-2</option></term>
358
359                       <listitem>
360                         <para>Synonymous with -l 0 -b 1152 -m -r 3
361                           </para>
362                       </listitem>
363                     </varlistentry>
364
365                     <varlistentry>
366                       <term><option>-3</option></term>
367
368                       <listitem>
369                         <para>Synonymous with -l 6 -b 4608 -r 3,3
370                           </para>
371                       </listitem>
372                     </varlistentry>
373
374                     <varlistentry>
375                       <term><option>-4</option></term>
376
377                       <listitem>
378                         <para>Synonymous with -l 8 -b 4608 -M -r 3,3
379                           </para>
380                       </listitem>
381                     </varlistentry>
382
383                     <varlistentry>
384                       <term><option>-5</option></term>
385
386                       <listitem>
387                         <para>Synonymous with -l 8 -b 4608 -m -r 3,3
388                           </para>
389                       </listitem>
390                     </varlistentry>
391
392                     <varlistentry>
393                       <term><option>-6</option></term>
394
395                       <listitem>
396                         <para>Synonymous with -l 8 -b 4608 -m -r 4
397                           </para>
398                       </listitem>
399                     </varlistentry>
400
401                     <varlistentry>
402                       <term><option>-7</option></term>
403
404                       <listitem>
405                         <para>Synonymous with -l 8 -b 4608 -m -e -r 6
406                           </para>
407                       </listitem>
408                     </varlistentry>
409
410                     <varlistentry>
411                       <term><option>-8</option></term>
412
413                       <listitem>
414                         <para>Synonymous with -l 12 -b 4608 -m -e -r 6
415                           </para>
416                       </listitem>
417                     </varlistentry>
418                   </variablelist>
419
420                 </listitem>
421
422
423               </varlistentry>
424
425               <varlistentry>
426                 <term><option>--fast</option></term>
427
428                 <listitem>
429                   <para>Fastest compression.  Currently
430                     synonymous with -0.</para>
431                 </listitem>
432               </varlistentry>
433
434               <varlistentry>
435                 <term><option>--best</option></term>
436
437                 <listitem>
438                   <para>Highest compression.  Currently
439                     synonymous with -8.</para>
440                 </listitem>
441               </varlistentry>
442
443               <varlistentry>
444                 <term><option>-e</option></term>
445
446                 <listitem>
447                   <para>Do exhaustive model search
448                     (expensive!)</para>
449                 </listitem>
450               </varlistentry>
451
452               <varlistentry>
453                 <term><option>-E</option></term>
454
455                 <listitem>
456                   <para>Do escape coding in the entropy coder.  This
457                     causes the encoder to use an unencoded representation
458                     of the residual in a partition if it is smaller.  It
459                     increases the runtime and usually results in an
460                     improvement of less than 1%.</para>
461                 </listitem>
462               </varlistentry>
463
464               <varlistentry>
465                 <term><option>-l</option> <replaceable>max_lpc_order</replaceable></term>
466
467                 <listitem>
468                   <para>0 => use only fixed predictors</para>
469                 </listitem>
470               </varlistentry>
471
472               <varlistentry>
473                 <term><option>-p</option></term>
474
475                 <listitem>
476                   <para>Do exhaustive search of LP coefficient
477                     quantization (expensive!).  Overrides -q,
478                     does nothing if using -l 0</para>
479                 </listitem>
480               </varlistentry>
481
482               <varlistentry>
483                 <term><option>-q</option> <replaceable>bits</replaceable></term>
484
485                 <listitem>
486                   <para>Precision of the quantized linear-predictor
487                     coefficients, 0 => let encoder decide (min is 5,
488                     default is 0)</para>
489                 </listitem>
490               </varlistentry>
491
492               <varlistentry>
493                 <term><option>-r</option> <replaceable>[level,]level</replaceable></term>
494
495                 <listitem>
496                   <para>Set the [min,]max residual partition order
497                     (0..16). min defaults to 0 if unspecified.  Default
498                     is -r 3,3.</para>
499                 </listitem>
500               </varlistentry>
501
502               <varlistentry>
503                 <term><option>-V</option></term>
504
505                 <listitem>
506                   <para>Verify a correct encoding by decoding the
507                     output in parallel and comparing to the
508                     original</para>
509                 </listitem>
510               </varlistentry>
511
512               <varlistentry>
513                 <term><option>-F-</option> <option>-S-</option> <option>-P-</option> <option>-m-</option> <option>-M-</option> <option>-e-</option> <option>-E-</option> <option>-p-</option> <option>-V-</option> <option>--delete-input-file-</option> <option>--lax-</option> <option>--ogg-</option>
514                 </term>
515
516                 <listitem>
517                   <para>These flags can be used to invert the sense
518                     of the corresponding normal option.</para>
519                 </listitem>
520               </varlistentry>
521             </variablelist>
522
523           </refsect2>
524           <refsect2>
525             <title>Format Options</title>
526
527             <variablelist>
528               <varlistentry>
529                 <term><option>-fb</option></term>
530
531                 <listitem>
532                   <para>Big-endian byte order</para>
533                 </listitem>
534               </varlistentry>
535
536               <varlistentry>
537                 <term><option>-fl</option></term>
538
539                 <listitem>
540                   <para>Little-endian byte order</para>
541                 </listitem>
542               </varlistentry>
543
544               <varlistentry>
545                 <term><option>-fc</option>
546                   <replaceable>channels</replaceable></term>
547
548                 <listitem>
549                   <para>Set number of channels.</para>
550                 </listitem>
551               </varlistentry>
552
553               <varlistentry>
554                 <term><option>-fp</option>
555                   <replaceable>bits_per_sample</replaceable></term>
556
557                 <listitem>
558                   <para>Set bits per sample.</para>
559                 </listitem>
560               </varlistentry>
561
562               <varlistentry>
563                 <term><option>-fs</option>
564                   <replaceable>sample_rate</replaceable></term>
565
566                 <listitem>
567                   <para>Set sample rate (in Hz).</para>
568                 </listitem>
569               </varlistentry>
570
571               <varlistentry>
572                 <term><option>-fu</option></term>
573
574                 <listitem>
575                   <para>Unsigned samples (default is signed)</para>
576                 </listitem>
577               </varlistentry>
578
579               <varlistentry>
580                 <term><option>-fr</option></term>
581
582                 <listitem>
583                   <para>Force to raw format (even if filename ends
584                     in <filename>.wav</filename>).</para>
585                 </listitem>
586               </varlistentry>
587
588             </variablelist>
589           </refsect2>
590
591         </refsect1>
592           <refsect1>
593             <title>SEE ALSO</title>
594
595             <para>The programs are documented fully by HTML format
596               documentation, available in
597               <filename>/usr/share/doc/flac/html</filename> on
598                 &debian; systems.</para>
599           </refsect1>
600           <refsect1>
601             <title>AUTHOR</title>
602
603             <para>This manual page was written by &dhusername; &dhemail; for
604               the &debian; system (but may be used by others).</para>
605
606             <!-- <para>Permission is granted to copy, distribute and/or modify
607             this document under the terms of the <acronym>GNU</acronym> Free
608             Documentation License, Version 1.1 or any later version
609             published by the Free Software Foundation; with no Invariant
610             Sections, no Front-Cover Texts and no Back-Cover Texts.  A copy
611             of the license can be found under
612           <filename>/usr/share/common-licenses/FDL</filename>.</para> -->
613
614         </refsect1>
615       </refentry>
616
617         <!-- Keep this comment at the end of the file
618               Local variables:
619               mode: sgml
620               sgml-omittag:t
621               sgml-shorttag:t
622               sgml-minimize-attributes:nil
623               sgml-always-quote-attributes:t
624               sgml-indent-step:2
625               sgml-indent-data:t
626               sgml-parent-document:nil
627               sgml-default-dtd-file:nil
628               sgml-exposed-tags:nil
629               sgml-local-catalogs:nil
630               sgml-local-ecat-files:nil
631               End:
632               -->