a8d0ab75de1789cf068c25f08fe5b38d1d7e04be
[platform/upstream/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>May 16, 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>Encoding Options</title>
202
203             <variablelist>
204               <varlistentry>
205                 <term><option>--ogg</option></term>
206
207                 <listitem>
208                   <para>When encoding, generate Ogg-FLAC output instead
209                     of native-FLAC.  Ogg-FLAC streams are FLAC streams
210                     wrapped in an Ogg transport layer.  The resulting
211                     file should have an '.ogg' extension and will still
212                     be decodable by flac.</para>
213                   <para>When decoding, force the input to be treated as
214                     Ogg-FLAC.  This is useful when piping input from
215                     stdin or when the filename does not end in '.ogg'.</para>
216                 </listitem>
217               </varlistentry>
218
219               <varlistentry>
220                 <term><option>--lax</option></term>
221
222                 <listitem>
223                   <para>Allow encoder to generate non-Subset
224                     files.</para>
225                 </listitem>
226               </varlistentry>
227
228               <varlistentry>
229                 <term><option>--sector-align</option></term>
230
231                 <listitem>
232                   <para>Align encoding of multiple CD format WAVE
233                     files on sector boundaries.  See the HTML
234                     documentation for more information.</para>
235                 </listitem>
236               </varlistentry>
237
238               <varlistentry>
239                 <term><option>-S</option> <replaceable>{ # | X | #x }</replaceable></term>
240
241                 <listitem>
242                   <para>
243                     Include a point or points in a SEEKTABLE.  Using #,
244                     a seek point at that sample number is added.  Using
245                     X, a placeholder point is added at the end of a the
246                     table.  Using #x, # evenly spaced seek points will
247                     be added, the first being at sample 0.  You may use
248                     many -S options; the resulting SEEKTABLE will be the
249                     unique-ified union of all such values.  With no -S
250                     options, flac defaults to '-S 100x'.  Use -S- for
251                     no SEEKTABLE.  Note: '-S #x' will not work if the
252                     encoder can't determine the input size before
253                     starting.  Note: if you use '-S #' and # is >=
254                     samples in the input, there will be either no seek
255                     point entered (if the input size is determinable
256                     before encoding starts) or a placeholder point (if
257                     input size is not determinable).</para>
258                 </listitem>
259               </varlistentry>
260
261               <varlistentry>
262                 <term><option>-P</option> <replaceable>bytes</replaceable></term>
263
264                 <listitem>
265                   <para>Tell the encoder to write a PADDING metadata
266                     block of the given length (in bytes) after the
267                     STREAMINFO block.  This is useful if you plan to
268                     tag the file later with an APPLICATION block;
269                     instead of having to rewrite the entire file later
270                     just to insert your block, you can write directly
271                     over the PADDING block.  Note that the total length
272                     of the PADDING block will be 4 bytes longer than
273                     the length given because of the 4 metadata block
274                     header bytes.  You can force no PADDING block at
275                     all to be written with -P-, which is the default.
276                     </para>
277                 </listitem>
278               </varlistentry>
279
280               <varlistentry>
281                 <term><option>-b</option> <replaceable>blocksize</replaceable></term>
282
283                 <listitem>
284                   <para>Default is 1152 for -l 0, else 4608; must be
285                     192/576/1152/2304/4608/256/512/1024/2048/4096/8192/16384/32768
286                     (unless --lax is used)</para>
287                 </listitem>
288               </varlistentry>
289
290               <varlistentry>
291                 <term><option>-m</option></term>
292
293                 <listitem>
294                   <para>Try mid-side coding for each frame (stereo
295                     input only)</para>
296                 </listitem>
297               </varlistentry>
298
299               <varlistentry>
300                 <term><option>-M</option></term>
301
302                 <listitem>
303                   <para>Loose mid-side coding for all frames (stereo
304                     input only)</para>
305                 </listitem>
306               </varlistentry>
307
308               <varlistentry>
309                 <term><option>-0</option>..<option>-8</option></term>
310
311                 <listitem>
312                   <para>Fastest compression..highest compression
313                     (default is -5).  These are synonyms for other
314                     options:</para>
315
316                   <variablelist>
317                     <varlistentry>
318                       <term><option>-0</option></term>
319
320                       <listitem>
321                         <para>Synonymous with -l 0 -b 1152 -r 2,2
322                           </para>
323                       </listitem>
324                     </varlistentry>
325
326                     <varlistentry>
327                       <term><option>-1</option></term>
328
329                       <listitem>
330                         <para>Synonymous with -l 0 -b 1152 -M -r 2,2
331                           </para>
332                       </listitem>
333                     </varlistentry>
334
335                     <varlistentry>
336                       <term><option>-2</option></term>
337
338                       <listitem>
339                         <para>Synonymous with -l 0 -b 1152 -m -r 3
340                           </para>
341                       </listitem>
342                     </varlistentry>
343
344                     <varlistentry>
345                       <term><option>-3</option></term>
346
347                       <listitem>
348                         <para>Synonymous with -l 6 -b 4608 -r 3,3
349                           </para>
350                       </listitem>
351                     </varlistentry>
352
353                     <varlistentry>
354                       <term><option>-4</option></term>
355
356                       <listitem>
357                         <para>Synonymous with -l 8 -b 4608 -M -r 3,3
358                           </para>
359                       </listitem>
360                     </varlistentry>
361
362                     <varlistentry>
363                       <term><option>-5</option></term>
364
365                       <listitem>
366                         <para>Synonymous with -l 8 -b 4608 -m -r 3,3
367                           </para>
368                       </listitem>
369                     </varlistentry>
370
371                     <varlistentry>
372                       <term><option>-6</option></term>
373
374                       <listitem>
375                         <para>Synonymous with -l 8 -b 4608 -m -r 4
376                           </para>
377                       </listitem>
378                     </varlistentry>
379
380                     <varlistentry>
381                       <term><option>-7</option></term>
382
383                       <listitem>
384                         <para>Synonymous with -l 8 -b 4608 -m -e -r 6
385                           </para>
386                       </listitem>
387                     </varlistentry>
388
389                     <varlistentry>
390                       <term><option>-8</option></term>
391
392                       <listitem>
393                         <para>Synonymous with -l 12 -b 4608 -m -e -r 6
394                           </para>
395                       </listitem>
396                     </varlistentry>
397                   </variablelist>
398
399                 </listitem>
400
401
402               </varlistentry>
403
404               <varlistentry>
405                 <term><option>--fast</option></term>
406
407                 <listitem>
408                   <para>Fastest compression.  Currently
409                     synonymous with -0.</para>
410                 </listitem>
411               </varlistentry>
412
413               <varlistentry>
414                 <term><option>--best</option></term>
415
416                 <listitem>
417                   <para>Highest compression.  Currently
418                     synonymous with -8.</para>
419                 </listitem>
420               </varlistentry>
421
422               <varlistentry>
423                 <term><option>-e</option></term>
424
425                 <listitem>
426                   <para>Do exhaustive model search
427                     (expensive!)</para>
428                 </listitem>
429               </varlistentry>
430
431               <varlistentry>
432                 <term><option>-E</option></term>
433
434                 <listitem>
435                   <para>Do escape coding in the entropy coder.  This
436                     causes the encoder to use an unencoded representation
437                     of the residual in a partition if it is smaller.  It
438                     increases the runtime and usually results in an
439                     improvement of less than 1%.</para>
440                 </listitem>
441               </varlistentry>
442
443               <varlistentry>
444                 <term><option>-l</option> <replaceable>max_lpc_order</replaceable></term>
445
446                 <listitem>
447                   <para>0 => use only fixed predictors</para>
448                 </listitem>
449               </varlistentry>
450
451               <varlistentry>
452                 <term><option>-p</option></term>
453
454                 <listitem>
455                   <para>Do exhaustive search of LP coefficient
456                     quantization (expensive!).  Overrides -q,
457                     does nothing if using -l 0</para>
458                 </listitem>
459               </varlistentry>
460
461               <varlistentry>
462                 <term><option>-q</option> <replaceable>bits</replaceable></term>
463
464                 <listitem>
465                   <para>Precision of the quantized linear-predictor
466                     coefficients, 0 => let encoder decide (min is 5,
467                     default is 0)</para>
468                 </listitem>
469               </varlistentry>
470
471               <varlistentry>
472                 <term><option>-r</option> <replaceable>[level,]level</replaceable></term>
473
474                 <listitem>
475                   <para>Set the [min,]max residual partition order
476                     (0..16). min defaults to 0 if unspecified.  Default
477                     is -r 3,3.</para>
478                 </listitem>
479               </varlistentry>
480
481               <varlistentry>
482                 <term><option>-R</option> <replaceable>#</replaceable></term>
483
484                 <listitem>
485                   <para>Set the Rice parameter search distance.
486                     Default is 0.</para>
487                 </listitem>
488               </varlistentry>
489
490               <varlistentry>
491                 <term><option>-V</option></term>
492
493                 <listitem>
494                   <para>Verify a correct encoding by decoding the
495                     output in parallel and comparing to the
496                     original</para>
497                 </listitem>
498               </varlistentry>
499
500               <varlistentry>
501                 <term><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>
502                 </term>
503
504                 <listitem>
505                   <para>These flags can be used to invert the sense
506                     of the corresponding normal option.</para>
507                 </listitem>
508               </varlistentry>
509             </variablelist>
510
511           </refsect2>
512           <refsect2>
513             <title>Format Options</title>
514
515             <variablelist>
516               <varlistentry>
517                 <term><option>-fb</option></term>
518
519                 <listitem>
520                   <para>Big-endian byte order</para>
521                 </listitem>
522               </varlistentry>
523
524               <varlistentry>
525                 <term><option>-fl</option></term>
526
527                 <listitem>
528                   <para>Little-endian byte order</para>
529                 </listitem>
530               </varlistentry>
531
532               <varlistentry>
533                 <term><option>-fc</option>
534                   <replaceable>channels</replaceable></term>
535
536                 <listitem>
537                   <para>Set number of channels.</para>
538                 </listitem>
539               </varlistentry>
540
541               <varlistentry>
542                 <term><option>-fp</option>
543                   <replaceable>bits_per_sample</replaceable></term>
544
545                 <listitem>
546                   <para>Set bits per sample.</para>
547                 </listitem>
548               </varlistentry>
549
550               <varlistentry>
551                 <term><option>-fs</option>
552                   <replaceable>sample_rate</replaceable></term>
553
554                 <listitem>
555                   <para>Set sample rate (in Hz).</para>
556                 </listitem>
557               </varlistentry>
558
559               <varlistentry>
560                 <term><option>-fu</option></term>
561
562                 <listitem>
563                   <para>Unsigned samples (default is signed)</para>
564                 </listitem>
565               </varlistentry>
566
567               <varlistentry>
568                 <term><option>-fr</option></term>
569
570                 <listitem>
571                   <para>Force to raw format (even if filename ends
572                     in <filename>.wav</filename>).</para>
573                 </listitem>
574               </varlistentry>
575
576             </variablelist>
577           </refsect2>
578
579         </refsect1>
580           <refsect1>
581             <title>SEE ALSO</title>
582
583             <para>The programs are documented fully by HTML format
584               documentation, available in
585               <filename>/usr/share/doc/flac/html</filename> on
586                 &debian; systems.</para>
587           </refsect1>
588           <refsect1>
589             <title>AUTHOR</title>
590
591             <para>This manual page was written by &dhusername; &dhemail; for
592               the &debian; system (but may be used by others).</para>
593
594             <!-- <para>Permission is granted to copy, distribute and/or modify
595             this document under the terms of the <acronym>GNU</acronym> Free
596             Documentation License, Version 1.1 or any later version
597             published by the Free Software Foundation; with no Invariant
598             Sections, no Front-Cover Texts and no Back-Cover Texts.  A copy
599             of the license can be found under
600           <filename>/usr/share/common-licenses/FDL</filename>.</para> -->
601
602         </refsect1>
603       </refentry>
604
605         <!-- Keep this comment at the end of the file
606               Local variables:
607               mode: sgml
608               sgml-omittag:t
609               sgml-shorttag:t
610               sgml-minimize-attributes:nil
611               sgml-always-quote-attributes:t
612               sgml-indent-step:2
613               sgml-indent-data:t
614               sgml-parent-document:nil
615               sgml-default-dtd-file:nil
616               sgml-exposed-tags:nil
617               sgml-local-catalogs:nil
618               sgml-local-ecat-files:nil
619               End:
620               -->