84b2869740e8a75e8c5a2f572b8dd846423b0b01
[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>June 26, 2001</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>2001</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>-d</option>
78                 </term>
79                 <listitem>
80                   <para>Decode (default behavior is encode)</para>
81                 </listitem>
82               </varlistentry>
83
84               <varlistentry>
85                 <term><option>-c</option>
86                 </term>
87                 <listitem>
88                   <para>Encode from standard input, or decode to
89                   standard output</para>
90                 </listitem>
91               </varlistentry>
92
93               <varlistentry>
94                 <term><option>-t</option>
95                 </term>
96                 <listitem>
97                   <para>Test a flac encoded file (same as -d
98                     except no decoded file is written)</para>
99                 </listitem>
100               </varlistentry>
101
102               <varlistentry>
103                 <term><option>-a</option>
104                 </term>
105                 <listitem>
106                   <para>Analyze a flac encoded file (same as -d
107                     except an analysis file is written)</para>
108                 </listitem>
109               </varlistentry>
110
111               <varlistentry>
112                 <term><option>-s</option>
113                 </term>
114                 <listitem>
115                   <para>Silent mode (do not write runtime
116                     encode/decode statistics to stdout)</para>
117                 </listitem>
118               </varlistentry>
119
120               <varlistentry>
121                 <term><option>-o</option> <replaceable>filename</replaceable></term>
122                 <listitem>
123                   <para>Force the output file name (usually flac just
124                     changes the extension).  May only be used when
125                     encoding a single file.  May not be used in
126                     conjunction with --output-prefix.</para>
127                 </listitem>
128               </varlistentry>
129
130               <varlistentry>
131                 <term><option>--output-prefix</option> <replaceable>string</replaceable></term>
132                 <listitem>
133                   <para>Prefix each output file name with the given
134                     string.  This can be useful for encoding/decoding
135                     files to a different directory.  Make sure if your
136                     string is a path name that it ends with a trailing
137                     `/' (slash).</para>
138                 </listitem>
139               </varlistentry>
140
141               <varlistentry>
142                 <term><option>--delete-input-file</option>
143                 </term>
144                 <listitem>
145                   <para>Automatically delete the input file after a
146                     successful encode or decode.  If there was an
147                     error (including a verify error) the input file
148                     is left intact.</para>
149                 </listitem>
150               </varlistentry>
151
152               <varlistentry>
153                 <term><option>--skip</option> <replaceable>samples</replaceable></term>
154                 <listitem>
155                   <para>Skip the specified number of samples at the
156                     beginning of the input file (can be used for both
157                     encoding and decoding)</para>
158                 </listitem>
159               </varlistentry>
160
161             </variablelist>
162           </refsect2>
163
164           <refsect2>
165             <title>Analysis Options</title>
166
167             <variablelist>
168               <varlistentry>
169                 <term><option>--a-rtext</option>
170                 </term>
171                 <listitem>
172                   <para>Includes the residual signal in the analysis
173                     file.  This will make the file very big, much
174                     larger than even the decoded file.</para>
175                 </listitem>
176               </varlistentry>
177
178               <varlistentry>
179                 <term><option>--a-rgp</option>
180                 </term>
181                 <listitem>
182                   <para>Generates a gnuplot file for every subframe;
183                     each file will contain the residual distribution
184                     of the subframe.  This will create a lot of
185                     files.</para>
186                 </listitem>
187               </varlistentry>
188
189             </variablelist>
190           </refsect2>
191
192           <refsect2>
193             <title>Encoding Options</title>
194
195             <variablelist>
196               <varlistentry>
197                 <term><option>--lax</option></term>
198
199                 <listitem>
200                   <para>Allow encoder to generate non-Subset
201                     files.</para>
202                 </listitem>
203               </varlistentry>
204
205               <varlistentry>
206                 <term><option>--sector-align</option></term>
207
208                 <listitem>
209                   <para>Align encoding of multiple CD format WAVE
210                     files on sector boundaries.  See the HTML
211                     documentation for more information.</para>
212                 </listitem>
213               </varlistentry>
214
215               <varlistentry>
216                 <term><option>-S</option> <replaceable>{ # | X | #x }</replaceable></term>
217
218                 <listitem>
219                   <para>
220                     Include a point or points in a SEEKTABLE.  Using #,
221                     a seek point at that sample number is added.  Using
222                     X, a placeholder point is added at the end of a the
223                     table.  Using #x, # evenly spaced seek points will
224                     be added, the first being at sample 0.  You may use
225                     many -S options; the resulting SEEKTABLE will be the
226                     unique-ified union of all such values.  With no -S
227                     options, flac defaults to '-S 100x'.  Use -S- for
228                     no SEEKTABLE.  Note: '-S #x' will not work if the
229                     encoder can't determine the input size before
230                     starting.  Note: if you use '-S #' and # is >=
231                     samples in the input, there will be either no seek
232                     point entered (if the input size is determinable
233                     before encoding starts) or a placeholder point (if
234                     input size is not determinable).</para>
235                 </listitem>
236               </varlistentry>
237
238               <varlistentry>
239                 <term><option>-P</option> <replaceable>bytes</replaceable></term>
240
241                 <listitem>
242                   <para>Tell the encoder to write a PADDING metadata
243                     block of the given length (in bytes) after the
244                     STREAMINFO block.  -P 0 implies no PADDING block,
245                     which is the default.  This is useful if you plan
246                     to tag the file later with an APPLICATION block;
247                     instead of having to rewrite the entire file later
248                     just to insert your block, you can write directly
249                     over the PADDING block.</para>
250                 </listitem>
251               </varlistentry>
252
253               <varlistentry>
254                 <term><option>-b</option> <replaceable>blocksize</replaceable></term>
255
256                 <listitem>
257                   <para>Default is 1152 for -l 0, else 4608; must be
258                     192/576/1152/2304/4608/256/512/1024/2048/4096/8192/16384/32768
259                     (unless --lax is used)</para>
260                 </listitem>
261               </varlistentry>
262
263               <varlistentry>
264                 <term><option>-m</option></term>
265
266                 <listitem>
267                   <para>Try mid-side coding for each frame (stereo
268                     input only)</para>
269                 </listitem>
270               </varlistentry>
271
272               <varlistentry>
273                 <term><option>-M</option></term>
274
275                 <listitem>
276                   <para>Loose mid-side coding for all frames (stereo
277                     input only)</para>
278                 </listitem>
279               </varlistentry>
280
281               <varlistentry>
282                 <term><option>-0</option>..<option>-9</option></term>
283
284                 <listitem>
285                   <para>Fastest compression..highest compression
286                     (default is -5).  These are synonyms for other
287                     options:</para>
288
289                   <variablelist>
290                     <varlistentry>
291                       <term><option>-0</option></term>
292
293                       <listitem>
294                         <para>Synonymous with -l 0 -b 1152 -r 2,2
295                           </para>
296                       </listitem>
297                     </varlistentry>
298
299                     <varlistentry>
300                       <term><option>-1</option></term>
301
302                       <listitem>
303                         <para>Synonymous with -l 0 -b 1152 -M -r 2,2
304                           </para>
305                       </listitem>
306                     </varlistentry>
307
308                     <varlistentry>
309                       <term><option>-2</option></term>
310
311                       <listitem>
312                         <para>Synonymous with -l 0 -b 1152 -m -r 3
313                           </para>
314                       </listitem>
315                     </varlistentry>
316
317                     <varlistentry>
318                       <term><option>-3</option></term>
319
320                       <listitem>
321                         <para>Synonymous with -l 6 -b 4608 -r 3,3
322                           </para>
323                       </listitem>
324                     </varlistentry>
325
326                     <varlistentry>
327                       <term><option>-4</option></term>
328
329                       <listitem>
330                         <para>Synonymous with -l 8 -b 4608 -M -r 3,3
331                           </para>
332                       </listitem>
333                     </varlistentry>
334
335                     <varlistentry>
336                       <term><option>-5</option></term>
337
338                       <listitem>
339                         <para>Synonymous with -l 8 -b 4608 -m -r 3,3
340                           </para>
341                       </listitem>
342                     </varlistentry>
343
344                     <varlistentry>
345                       <term><option>-6</option></term>
346
347                       <listitem>
348                         <para>Synonymous with -l 8 -b 4608 -m -r 4
349                           </para>
350                       </listitem>
351                     </varlistentry>
352
353                     <varlistentry>
354                       <term><option>-7</option></term>
355
356                       <listitem>
357                         <para>Synonymous with -l 8 -b 4608 -m -e -r 6
358                           </para>
359                       </listitem>
360                     </varlistentry>
361
362                     <varlistentry>
363                       <term><option>-8</option></term>
364
365                       <listitem>
366                         <para>Synonymous with -l 12 -b 4608 -m -e -r 6
367                           </para>
368                       </listitem>
369                     </varlistentry>
370
371                     <varlistentry>
372                       <term><option>-9</option></term>
373
374                       <listitem>
375                         <para>Synonymous with -l 32 -b 4608 -m -e -E -r 16 -p
376                           (very slow!)</para>
377                       </listitem>
378                     </varlistentry>
379                   </variablelist>
380
381                 </listitem>
382
383
384               </varlistentry>
385
386               <varlistentry>
387                 <term><option>-e</option></term>
388
389                 <listitem>
390                   <para>Do exhaustive model search
391                     (expensive!)</para>
392                 </listitem>
393               </varlistentry>
394
395               <varlistentry>
396                 <term><option>-E</option></term>
397
398                 <listitem>
399                   <para>Do escape coding in the entropy coder.  This
400                     causes the encoder to use an unencoded representation
401                     of the residual in a partition if it is smaller.  It
402                     increases the runtime and usually results in an
403                     improvement of less than 1%.</para>
404                 </listitem>
405               </varlistentry>
406
407               <varlistentry>
408                 <term><option>-l</option> <replaceable>max_lpc_order</replaceable></term>
409
410                 <listitem>
411                   <para>0 => use only fixed predictors</para>
412                 </listitem>
413               </varlistentry>
414
415               <varlistentry>
416                 <term><option>-p</option></term>
417
418                 <listitem>
419                   <para>Do exhaustive search of LP coefficient
420                     quantization (expensive!).  Overrides -q,
421                     does nothing if using -l 0</para>
422                 </listitem>
423               </varlistentry>
424
425               <varlistentry>
426                 <term><option>-q</option> <replaceable>bits</replaceable></term>
427
428                 <listitem>
429                   <para>Precision of the quantized linear-predictor
430                     coefficients, 0 => let encoder decide (min is 5,
431                     default is 0)</para>
432                 </listitem>
433               </varlistentry>
434
435               <varlistentry>
436                 <term><option>-r</option> <replaceable>[level,]level</replaceable></term>
437
438                 <listitem>
439                   <para>Set the [min,]max residual partition order
440                     (0..16). min defaults to 0 if unspecified.  Default
441                     is -r 3,3.</para>
442                 </listitem>
443               </varlistentry>
444
445               <varlistentry>
446                 <term><option>-R</option> <replaceable>#</replaceable></term>
447
448                 <listitem>
449                   <para>Set the Rice parameter search distance.
450                     Default is 0.</para>
451                 </listitem>
452               </varlistentry>
453
454               <varlistentry>
455                 <term><option>-V</option></term>
456
457                 <listitem>
458                   <para>Verify a correct encoding by decoding the
459                     output in parallel and comparing to the
460                     original</para>
461                 </listitem>
462               </varlistentry>
463
464               <varlistentry>
465                 <term><option>-S-</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>
466                 </term>
467
468                 <listitem>
469                   <para>These flags can be used to invert the sense
470                     of the corresponding normal option.</para>
471                 </listitem>
472               </varlistentry>
473             </variablelist>
474
475           </refsect2>
476           <refsect2>
477             <title>Format Options</title>
478
479             <variablelist>
480               <varlistentry>
481                 <term><option>-fb</option></term>
482
483                 <listitem>
484                   <para>Big-endian byte order</para>
485                 </listitem>
486               </varlistentry>
487
488               <varlistentry>
489                 <term><option>-fl</option></term>
490
491                 <listitem>
492                   <para>Little-endian byte order</para>
493                 </listitem>
494               </varlistentry>
495
496               <varlistentry>
497                 <term><option>-fc</option>
498                   <replaceable>channels</replaceable></term>
499
500                 <listitem>
501                   <para>Set number of channels.</para>
502                 </listitem>
503               </varlistentry>
504
505               <varlistentry>
506                 <term><option>-fp</option>
507                   <replaceable>bits_per_sample</replaceable></term>
508
509                 <listitem>
510                   <para>Set bits per sample.</para>
511                 </listitem>
512               </varlistentry>
513
514               <varlistentry>
515                 <term><option>-fs</option>
516                   <replaceable>sample_rate</replaceable></term>
517
518                 <listitem>
519                   <para>Set sample rate (in Hz).</para>
520                 </listitem>
521               </varlistentry>
522
523               <varlistentry>
524                 <term><option>-fu</option></term>
525
526                 <listitem>
527                   <para>Unsigned samples (default is signed)</para>
528                 </listitem>
529               </varlistentry>
530
531               <varlistentry>
532                 <term><option>-fr</option></term>
533
534                 <listitem>
535                   <para>Force to raw format (even if filename ends
536                     in <filename>.wav</filename>).</para>
537                 </listitem>
538               </varlistentry>
539
540               <varlistentry>
541                 <term><option>-fw</option></term>
542
543                 <listitem>
544                   <para>Force to RIFF WAVE.</para>
545                 </listitem>
546               </varlistentry>
547
548             </variablelist>
549           </refsect2>
550
551         </refsect1>
552           <refsect1>
553             <title>SEE ALSO</title>
554
555             <para>The programs are documented fully by HTML format
556               documentation, available in
557               <filename>/usr/share/doc/flac/html</filename> on
558                 &debian; systems.</para>
559           </refsect1>
560           <refsect1>
561             <title>AUTHOR</title>
562
563             <para>This manual page was written by &dhusername; &dhemail; for
564               the &debian; system (but may be used by others).</para>
565
566             <!-- <para>Permission is granted to copy, distribute and/or modify
567             this document under the terms of the <acronym>GNU</acronym> Free
568             Documentation License, Version 1.1 or any later version
569             published by the Free Software Foundation; with no Invariant
570             Sections, no Front-Cover Texts and no Back-Cover Texts.  A copy
571             of the license can be found under
572           <filename>/usr/share/common-licenses/FDL</filename>.</para> -->
573
574         </refsect1>
575       </refentry>
576
577         <!-- Keep this comment at the end of the file
578               Local variables:
579               mode: sgml
580               sgml-omittag:t
581               sgml-shorttag:t
582               sgml-minimize-attributes:nil
583               sgml-always-quote-attributes:t
584               sgml-indent-step:2
585               sgml-indent-data:t
586               sgml-parent-document:nil
587               sgml-default-dtd-file:nil
588               sgml-exposed-tags:nil
589               sgml-local-catalogs:nil
590               sgml-local-ecat-files:nil
591               End:
592               -->