1 <!doctype refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
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>July 29, 2004</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">
16 <!ENTITY debian "<productname>Debian GNU/Linux</productname>">
17 <!ENTITY gnu "<acronym>GNU</acronym>">
30 <year>2002,2003,2004</year>
31 <holder>&dhusername;</holder>
41 <refname>&dhpackage;</refname>
43 <refpurpose>Free Lossless Audio Codec</refpurpose>
47 <command>flac</command>
48 <arg choice=opt><replaceable>options</replaceable></arg>
50 <arg><replaceable>infile.wav</replaceable></arg>
51 <arg><replaceable>infile.aiff</replaceable></arg>
52 <arg><replaceable>infile.raw</replaceable></arg>
57 <command>flac</command>
59 <arg>-d</arg> <arg>--decode</arg>
60 <arg>-t</arg> <arg>--test</arg>
61 <arg>-a</arg> <arg>--analyze</arg>
63 <arg choice=opt><replaceable>OPTIONS</replaceable></arg>
64 <arg choice=opt rep=repeat><replaceable>infile.flac</replaceable></arg>
68 <title>DESCRIPTION</title>
70 <para><command>flac</command> is a command-line tool for
71 encoding, decoding, testing and analyzing FLAC streams.
74 <para>This manual page was originally written for the &debian;
75 distribution because the original program did not have a
80 <title>OPTIONS</title>
82 <para>A summary of options is included below. For a complete
83 description, see the HTML documentation.</para>
86 <title>General Options</title>
90 <term><option>-v</option>, <option>--version</option>
93 <para>Show the flac version number</para>
98 <term><option>-h</option>, <option>--help</option>
101 <para>Show basic usage and a list of all options</para>
106 <term><option>-H</option>, <option>--explain</option>
109 <para>Show detailed explanation of usage and all options</para>
114 <term><option>-d</option>, <option>--decode</option>
117 <para>Decode (the default behavior is to encode)</para>
122 <term><option>-t</option>, <option>--test</option>
125 <para>Test a flac encoded file (same as -d
126 except no decoded file is written)</para>
131 <term><option>-a</option>, <option>--analyze</option>
134 <para>Analyze a FLAC encoded file (same as -d
135 except an analysis file is written)</para>
140 <term><option>-c</option>, <option>--stdout</option>
143 <para>Write output to stdout</para>
148 <term><option>-s</option>, <option>--silent</option>
151 <para>Silent mode (do not write runtime
152 encode/decode statistics to stderr)</para>
157 <term><option>--totally-silent</option>
160 <para>Do not print anything of any kind,
161 including warnings or errors. The exit
162 code will be the only way to determine
163 successful completion.</para>
168 <term><option>-f</option>, <option>--force</option>
171 <para>Force overwriting of output files. By default,
172 flac warns that the output file already exists and
173 continues to the next file.</para>
178 <term><option>-o</option> <replaceable>filename</replaceable>, <option>--output-name</option>=<replaceable>filename</replaceable></term>
180 <para>Force the output file name (usually flac just
181 changes the extension). May only be used when
182 encoding a single file. May not be used in
183 conjunction with --output-prefix.</para>
188 <term><option>--output-prefix</option>=<replaceable>string</replaceable></term>
190 <para>Prefix each output file name with the given
191 string. This can be useful for encoding or decoding
192 files to a different directory. Make sure if your
193 string is a path name that it ends with a trailing
199 <term><option>--delete-input-file</option>
202 <para>Automatically delete the input file after a
203 successful encode or decode. If there was an
204 error (including a verify error) the input file
205 is left intact.</para>
210 <term><option>--skip</option>={<replaceable>#</replaceable>|<replaceable>mm:ss.ss</replaceable>}</term>
212 <para>Skip over the first number of samples of the input.
213 This works for both encoding and decoding, but not
214 testing. The alternative form mm:ss.ss can be used
215 to specify minutes, seconds, and fractions of a
221 <term><option>--until</option>={<replaceable>#</replaceable>|[<replaceable>+</replaceable>|<replaceable>-</replaceable>]<replaceable>mm:ss.ss</replaceable>}</term>
223 <para>Stop at the given sample number for each input file.
224 This works for both encoding and decoding, but not testing.
225 The given sample number is not included in the decoded
226 output. The alternative form mm:ss.ss can be used to
227 specify minutes, seconds, and fractions of a second. If a
228 `+' (plus) sign is at the beginning, the --until point is
229 relative to the --skip point. If a `-' (minus) sign is at
230 the beginning, the --until point is relative to end of the
236 <term><option>--ogg</option></term>
239 <para>When encoding, generate Ogg FLAC output instead
240 of native FLAC. Ogg FLAC streams are FLAC streams
241 wrapped in an Ogg transport layer. The resulting
242 file should have an '.ogg' extension and will still
243 be decodable by flac.</para>
244 <para>When decoding, force the input to be treated as
245 Ogg FLAC. This is useful when piping input from
246 stdin or when the filename does not end in '.ogg'.</para>
251 <term><option>--serial-number</option>=<replaceable>#</replaceable></term>
254 <para>When used with --ogg, specifies the serial number to
255 use for the first Ogg FLAC stream, which is then
256 incremented for each additional stream. When encoding and
257 no serial number is given, flac uses a random number for
258 the first stream, then increments it for each additional
259 stream. When decoding and no number is given, flac uses
260 the serial number of the first page.</para>
268 <title>Analysis Options</title>
272 <term><option>--residual-text</option>
275 <para>Includes the residual signal in the analysis
276 file. This will make the file very big, much
277 larger than even the decoded file.</para>
282 <term><option>--residual-gnuplot</option>
285 <para>Generates a gnuplot file for every subframe;
286 each file will contain the residual distribution
287 of the subframe. This will create a lot of
296 <title>Decoding Options</title>
300 <term><option>--cue=[<replaceable>#.#</replaceable>][-[<replaceable>#.#</replaceable>]]</option></term>
302 <para>Set the beginning and ending cuepoints to decode.
303 The optional first #.# is the track and index point at
304 which decoding will start; the default is the beginning
305 of the stream. The optional second #.# is the track
306 and index point at which decoding will end; the default
307 is the end of the stream. If the seekpoint does not
308 exist, the closest one before it (for the start point)
309 or after it (for the end point) will be used. If those
310 don't exist, the start of the stream (for the start
311 point) or end of the stream (for the end point) will be
312 used. The cuepoints are merely translated into sample
313 numbers then used as --skip and --until.</para>
318 <term><option>-F</option>, <option>--decode-through-errors</option>
321 <para>By default flac stops decoding with an error
322 and removes the partially decoded file if it
323 encounters a bitstream error. With -F, errors are
324 still printed but flac will continue decoding to
325 completion. Note that errors may cause the decoded
326 audio to be missing some samples or have silent
335 <title>Encoding Options</title>
339 <term><option>-V</option>, <option>--verify</option></term>
342 <para>Verify a correct encoding by decoding the
343 output in parallel and comparing to the
349 <term><option>--lax</option></term>
352 <para>Allow encoder to generate non-Subset
358 <term><option>--replay-gain</option></term>
361 <para>Calculate ReplayGain values and store in
362 Vorbis comments, similar to vorbisgain. Title
363 gains/peaks will be computed for each input
364 file, and an album gain/peak will be computed
365 for all files. All input files must have the
366 same resolution, sample rate, and number of
367 channels. Only mono and stereo files are
368 allowed, and the sample rate must be one of
369 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48
370 kHz. Also note that this option may leave a
371 few extra bytes in a PADDING block as the exact
372 size of the tags is not known until all files
373 are processed. Note that this option cannot be
374 used when encoding to standard output (stdout).
380 <term><option>--cuesheet</option>=<replaceable>filename</replaceable></term>
383 <para>Import the given cuesheet file and store it in a
384 CUESHEET metadata block. This option may only be used
385 when encoding a single file. A seekpoint will be added
386 for each index point in the cuesheet to the SEEKTABLE
387 unless --no-cued-seekpoints is specified.</para>
392 <term><option>--sector-align</option></term>
395 <para>Align encoding of multiple CD format WAVE
396 files on sector boundaries. See the HTML
397 documentation for more information.</para>
402 <term><option>-S</option> {<replaceable>#</replaceable>|<replaceable>X</replaceable>|<replaceable>#x</replaceable>|<replaceable>#s</replaceable>}, <option>--seekpoint</option>={<replaceable>#</replaceable>|<replaceable>X</replaceable>|<replaceable>#x</replaceable>|<replaceable>#s</replaceable>}</term>
406 Include a point or points in a SEEKTABLE. Using #,
407 a seek point at that sample number is added. Using
408 X, a placeholder point is added at the end of a the
409 table. Using #x, # evenly spaced seek points will
410 be added, the first being at sample 0. Using #s, a
411 seekpoint will be added every # seconds (# does not
412 have to be a whole number; it can be, for example, 9.5,
413 meaning a seekpoint every 9.5 seconds). You may use
414 many -S options; the resulting SEEKTABLE will be the
415 unique-ified union of all such values. With no -S
416 options, flac defaults to '-S 10s'. Use --no-seektable
417 for no SEEKTABLE. Note: '-S #x' and '-S #s' will not
418 work if the encoder can't determine the input size before
419 starting. Note: if you use '-S #' and # is >=
420 samples in the input, there will be either no seek
421 point entered (if the input size is determinable
422 before encoding starts) or a placeholder point (if
423 input size is not determinable).</para>
428 <term><option>-P</option> <replaceable>#</replaceable>, <option>--padding</option>=<replaceable>#</replaceable></term>
431 <para>Tell the encoder to write a PADDING metadata
432 block of the given length (in bytes) after the
433 STREAMINFO block. This is useful if you plan to
434 tag the file later with an APPLICATION block;
435 instead of having to rewrite the entire file later
436 just to insert your block, you can write directly
437 over the PADDING block. Note that the total length
438 of the PADDING block will be 4 bytes longer than
439 the length given because of the 4 metadata block
440 header bytes. You can force no PADDING block at
441 all to be written with --no-padding. The encoder
442 writes a PADDING block of 4096 bytes by default.
448 <term><option>-T</option> <replaceable>FIELD=VALUE</replaceable>, <option>--tag</option>=<replaceable>FIELD=VALUE</replaceable></term>
451 <para>Add a Vorbis comment. The comment must adhere
452 to the Vorbis comment spec; i.e. the FIELD must
453 contain only legal characters, terminated by an
454 'equals' sign. Make sure to quote the comment if
455 necessary. This option may appear more than once
456 to add several comments. NOTE: all tags will be
457 added to all encoded files.</para>
462 <term><option>-b</option> <replaceable>#</replaceable>, <option>--blocksize</option>=<replaceable>#</replaceable></term>
465 <para>Specify the block size in samples. The
466 default is 1152 for -l 0, else 4608; must be one of
467 192, 576, 1152, 2304, 4608, 256, 512, 1024, 2048,
468 4096, 8192, 16384, or 32768 (unless --lax is used)</para>
473 <term><option>-m</option>, <option>--mid-side</option></term>
476 <para>Try mid-side coding for each frame (stereo
482 <term><option>-M</option>, <option>--adaptive-mid-side</option></term>
485 <para>Adaptive mid-side coding for all frames (stereo
491 <term><option>-0</option>..<option>-8</option>, <option>--compression-level-0</option>..<option>--compression-level-8</option></term>
494 <para>Fastest compression..highest compression
495 (default is -5). These are synonyms for other
500 <term><option>-0</option>, <option>--compression-level-0</option></term>
503 <para>Synonymous with -l 0 -b 1152 -r 2,2
509 <term><option>-1</option>, <option>--compression-level-1</option></term>
512 <para>Synonymous with -l 0 -b 1152 -M -r 2,2
518 <term><option>-2</option>, <option>--compression-level-2</option></term>
521 <para>Synonymous with -l 0 -b 1152 -m -r 3
527 <term><option>-3</option>, <option>--compression-level-3</option></term>
530 <para>Synonymous with -l 6 -b 4608 -r 3,3
536 <term><option>-4</option>, <option>--compression-level-4</option></term>
539 <para>Synonymous with -l 8 -b 4608 -M -r 3,3
545 <term><option>-5</option>, <option>--compression-level-5</option></term>
548 <para>Synonymous with -l 8 -b 4608 -m -r 3,3
554 <term><option>-6</option>, <option>--compression-level-6</option></term>
557 <para>Synonymous with -l 8 -b 4608 -m -r 4
563 <term><option>-7</option>, <option>--compression-level-7</option></term>
566 <para>Synonymous with -l 8 -b 4608 -m -e -r 6
572 <term><option>-8</option>, <option>--compression-level-8</option></term>
575 <para>Synonymous with -l 12 -b 4608 -m -e -r 6
586 <term><option>--fast</option></term>
589 <para>Fastest compression. Currently
590 synonymous with -0.</para>
595 <term><option>--best</option></term>
598 <para>Highest compression. Currently
599 synonymous with -8.</para>
604 <term><option>-e</option>, <option>--exhaustive-model-search</option></term>
607 <para>Do exhaustive model search
613 <term><option>-l</option> <replaceable>#</replaceable>, <option>--max-lpc-order</option>=<replaceable>#</replaceable></term>
616 <para>Set the maximum LPC order; 0 means use only the fixed predictors</para>
621 <term><option>-p</option>, <option>--qlp-coeff-precision-search</option></term>
624 <para>Do exhaustive search of LP coefficient
625 quantization (expensive!). Overrides -q;
626 does nothing if using -l 0</para>
631 <term><option>-q</option> <replaceable>#</replaceable>, <option>--qlp-coeff-precision</option>=<replaceable>#</replaceable></term>
634 <para>Precision of the quantized linear-predictor
635 coefficients, 0 => let encoder decide (min is 5,
641 <term><option>-r</option> [<replaceable>#</replaceable>,]<replaceable>#</replaceable>, <option>--rice-partition-order</option>=[<replaceable>#</replaceable>,]<replaceable>#</replaceable></term>
644 <para>Set the [min,]max residual partition order
645 (0..16). min defaults to 0 if unspecified. Default
654 <title>Format Options</title>
658 <term><option>--endian</option>={<replaceable>big</replaceable>|<replaceable>little</replaceable>}</term>
661 <para>Set the byte order for samples</para>
666 <term><option>--channels</option>=<replaceable>#</replaceable></term>
669 <para>Set number of channels.</para>
674 <term><option>--bps</option>=<replaceable>#</replaceable></term>
677 <para>Set bits per sample.</para>
682 <term><option>--sample-rate</option>=<replaceable>#</replaceable></term>
685 <para>Set sample rate (in Hz).</para>
690 <term><option>--sign</option>={<replaceable>signed</replaceable>|<replaceable>unsigned</replaceable>}</term>
693 <para>Set the sign of samples (the default is signed).</para>
698 <term><option>--force-aiff-format</option></term>
701 <para>Force the decoder to output AIFF format. This option
702 is not needed if the output filename (as set by -o) ends
703 with <filename>.aiff</filename>. Also, this option has no
704 effect when encoding since input AIFF is auto-detected.</para>
709 <term><option>--force-raw-format</option></term>
712 <para>Force input (when encoding) or output (when decoding)
713 to be treated as raw samples (even if filename ends
714 in <filename>.wav</filename>).</para>
722 <title>Negative Options</title>
726 <term><option>--no-adaptive-mid-side</option></term>
727 <term><option>--no-decode-through-errors</option></term>
728 <term><option>--no-delete-input-file</option></term>
729 <term><option>--no-exhaustive-model-search</option></term>
730 <term><option>--no-lax</option></term>
731 <term><option>--no-mid-side</option></term>
732 <term><option>--no-ogg</option></term>
733 <term><option>--no-padding</option></term>
734 <term><option>--no-qlp-coeff-precision-search</option></term>
735 <term><option>--no-residual-gnuplot</option></term>
736 <term><option>--no-residual-text</option></term>
737 <term><option>--no-sector-align</option></term>
738 <term><option>--no-seektable</option></term>
739 <term><option>--no-silent</option></term>
740 <term><option>--no-verify</option></term>
742 <para>These flags can be used to invert the sense
743 of the corresponding normal option.</para>
752 <title>SEE ALSO</title>
754 <para>metaflac(1).</para>
756 <para>The programs are documented fully by HTML format
757 documentation, available in
758 <filename>/usr/share/doc/flac/html</filename> on
759 &debian; systems.</para>
762 <title>AUTHOR</title>
764 <para>This manual page was written by &dhusername; &dhemail; for
765 the &debian; system (but may be used by others).</para>
767 <!-- <para>Permission is granted to copy, distribute and/or modify
768 this document under the terms of the <acronym>GNU</acronym> Free
769 Documentation License, Version 1.1 or any later version
770 published by the Free Software Foundation; with no Invariant
771 Sections, no Front-Cover Texts and no Back-Cover Texts. A copy
772 of the license can be found under
773 <filename>/usr/share/common-licenses/FDL</filename>.</para> -->
778 <!-- Keep this comment at the end of the file
783 sgml-minimize-attributes:nil
784 sgml-always-quote-attributes:t
787 sgml-parent-document:nil
788 sgml-default-dtd-file:nil
789 sgml-exposed-tags:nil
790 sgml-local-catalogs:nil
791 sgml-local-ecat-files:nil