~ubuntu-branches/ubuntu/raring/flac/raring

« back to all changes in this revision

Viewing changes to doc/html/documentation.html

  • Committer: Bazaar Package Importer
  • Author(s): Joshua Kwan
  • Date: 2007-05-29 22:56:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529225636-ljeff8xxip09qaap
Tags: 1.1.4-1
* New upstream release. closes: #405167, #411311
  - libOggFLAC and libOggFLAC++ have been merged into libFLAC, so
    remove their corresponding packages.
  - Because of the API changes required to effect the above, there has
    been yet another soname bump. libflac7 -> libflac8 and
    libflac++5 -> libflac++6. Emails have been dispatched to the
    maintainers of dependent packages.
* Some notes on patches that were removed:
  - 02_stdin_stdout, 06_manpage_mention_utf8_convert: merged upstream
  - 08_manpage_warnings: Upstream has changed the manpage so it defintely
    can't fit in in 80 cols, so just forget about it. We'll live.
  - 05_eof_warnings_are_errors: Upstream decided to add a -w option to
    flac to treat all warnings as errors. I am going to defer to that
    for now, but if people think it's stupid let me know and I'll port
    the patch forward.
  - 04_stack_smasher: was a backport from 1.1.3, so it's obsolete.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
 
<!-- Copyright (c)  2000,2001,2002,2003,2004,2005  Josh Coalson -->
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
2
<!-- Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson -->
3
3
<!-- Permission is granted to copy, distribute and/or modify this document -->
4
4
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
5
5
<!-- or any later version published by the Free Software Foundation; -->
6
6
<!-- with no invariant sections. -->
7
7
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
8
 
<HTML>
9
 
<HEAD>
10
 
        <TITLE>FLAC - documentation</TITLE>
11
 
</HEAD>
12
 
 
13
 
<BODY MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" RIGHTMARGIN="0" TOPMARGIN="0" BGCOLOR="#99CC99" TEXT="#000000" LINK="#336699" VLINK="#336699" ALINK="#336699">
14
 
 
15
 
<TABLE BORDER=0 WIDTH="100%" CELLPADDING=1 CELLSPACING=0>
16
 
        <TR>
17
 
                <TD ALIGN="CENTER" BGCOLOR="#000000"><A HREF="http://flac.sourceforge.net/"><IMG SRC="images/logo130.gif" ALIGN=CENTER ALT="FLAC Logo" BORDER=0 HSPACE=0></a></TD>
18
 
        </TR>
19
 
</TABLE>
20
 
 
21
 
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#99CC99"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="25" ALT=""></TD></TR></TABLE>
22
 
 
23
 
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR></TABLE>
24
 
 
25
 
<TABLE WIDTH="100%" CELLPADDING=0 CELLSPACING=0 BORDER=0>
26
 
        <TR>
27
 
                <TD ALIGN="CENTER" BGCOLOR="#D3D4C5">
28
 
                        <TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
29
 
                                <TR>
30
 
                                        <TD HEIGHT=22 BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="index.html">home</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
31
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="faq.html">faq</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
32
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="news.html">news</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
33
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="download.html">download</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
34
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="features.html">features</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
35
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="goals.html">goals</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
36
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="format.html">format</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
37
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="id.html">id</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
38
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="comparison.html">comparison</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
39
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;documentation&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
40
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="changelog.html">changelog</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
41
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="links.html">links</A>&nbsp;&nbsp;</TD><TD BGCOLOR="#D3D4C5" ALIGN=CENTER>|</TD>
42
 
                                        <TD           BGCOLOR="#D3D4C5" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="developers.html">developers</A>&nbsp;&nbsp;</TD>
43
 
                                </TR>
44
 
                        </TABLE>
45
 
                </TD>
46
 
        </TR>
47
 
</TABLE>
48
 
 
49
 
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR></TABLE>
50
 
 
51
 
<TABLE WIDTH="100%" CELLPADDING=0 CELLSPACING=0 BORDER=0>
52
 
        <TR>
53
 
                <TD ALIGN="CENTER" BGCOLOR="#EEEED4">
54
 
                        <TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
55
 
                                <TR>
56
 
                                        <TD HEIGHT=22 BGCOLOR="#EEEED4" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;english&nbsp;&nbsp;</TD><TD BGCOLOR="#EEEED4" ALIGN=CENTER>|</TD>
57
 
                                        <TD           BGCOLOR="#EEEED4" ALIGN=CENTER NOWRAP>&nbsp;&nbsp;<A CLASS="topnav" HREF="ru/documentation.html">russian</A>&nbsp;&nbsp;</TD>
58
 
                                </TR>
59
 
                        </TABLE>
60
 
                </TD>
61
 
        </TR>
62
 
</TABLE>
63
 
 
64
 
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR></TABLE>
65
 
 
66
 
<CENTER>
67
 
 
68
 
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#99CC99"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="15" ALT=""></TD></TR></TABLE>
69
 
 
70
 
 
71
 
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="5" BORDER="0">
72
 
<TR><TD>
73
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
74
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#D3D4C5">
75
 
                <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
76
 
                <B><FONT SIZE="+2">documentation</FONT></B>
77
 
                </FONT></TD></TR>
78
 
        </TABLE>
79
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
80
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#EEEED4">
81
 
        <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
82
 
        <P>
83
 
                This page is broken up into the following sections:
84
 
                <UL>
85
 
                        <LI><A HREF="#format">format</A> - the user-level view of the FLAC format (for a more detailed explanation see the <A HREF="format.html">format page</A>).</LI>
86
 
                        <LI><A HREF="#flac">flac</A> - the usage of the command-line file encoder/decoder <B><TT>flac</TT></B>.</LI>
87
 
                        <LI><A HREF="#metaflac">metaflac</A> - the usage of the command-line FLAC metadata editor <B><TT>metaflac</TT></B>.</LI>
88
 
                        <LI><A HREF="#plugins">plugins</A> - documentation for the various input plugins.</LI>
89
 
                        <LI><A HREF="api/index.html">libFLAC and libFLAC++ APIs</A> - for developers who want to add FLAC support to their programs.</LI>
90
 
                        <LI><A HREF="#bugs">bugs</A> - known bugs.</LI>
91
 
                        <LI><A HREF="#monkey">How to add FLAC support to the Monkey's Audio GUI</A></LI>
92
 
                </UL>
93
 
        </P>
94
 
        <P>
95
 
                Keep in mind that the online version of this document will always apply to the latest release.  For older releases, check the documentation included with the release package.
96
 
        </P>
97
 
        </FONT>
98
 
        </TD></TR>
99
 
        </TABLE>
100
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
101
 
</TD></TR>
102
 
</TABLE>
103
 
 
104
 
 
105
 
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="5" BORDER="0">
106
 
<TR><TD>
107
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
108
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#D3D4C5">
109
 
                <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
110
 
                <A NAME="format"><B><FONT SIZE="+2">format</FONT></B>
111
 
                </FONT></TD></TR>
112
 
        </TABLE>
113
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
114
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#EEEED4">
115
 
        <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
116
 
        <P>
117
 
                <B><TT>flac</TT></B> has been tuned so that the default options yield a good speed vs. compression tradeoff for many kinds of input.  However, if you are looking to maximize the compression rate or speed, or want to use the full power of FLAC's metadata system, this section is for you.  If not, just skip to the <A HREF="#flac">next section</A>.
118
 
        </P>
119
 
        <P>
120
 
                The basic structure of a FLAC stream is:
121
 
                <UL>
122
 
                        <LI>The four byte string "fLaC"</LI>
123
 
                        <LI>The <A HREF="format.html#def_STREAMINFO">STREAMINFO</A> metadata block</LI>
124
 
                        <LI>Zero or more other metadata blocks</LI>
125
 
                        <LI>One or more audio frames</LI>
126
 
                </UL>
127
 
        </P>
128
 
        <P>
129
 
                The first four bytes are to identify the FLAC stream.  The metadata that follows contains all the information about the stream except for the audio data itself.  After the metadata comes the encoded audio data.
130
 
        </P>
131
 
        <P>
132
 
                <B>METADATA</B>
133
 
        </P>
134
 
        <P>
135
 
                FLAC defines several types of metadata blocks (see the <A HREF="format.html">format</A> page for the complete list).  Metadata blocks can be any length and new ones can be defined.  A decoder is allowed to skip any metadata types it does not understand.  Only one is mandatory: the STREAMINFO block.  This block has information like the sample rate, number of channels, etc., and data that can help the decoder manage its buffers, like the minimum and maximum data rate and minimum and maximum block size.  Also included in the STREAMINFO block is the MD5 signature of the <I>unencoded</I> audio data.  This is useful for checking an entire stream for transmission errors.
136
 
        </P>
137
 
        <P>
138
 
                Other blocks allow for padding, seek tables, tags, cuesheets, and application-specific data.  You can see <B><TT>flac</TT></B> options below for adding PADDING blocks or specifying seek points.  FLAC does not require seek points for seeking but they can speed up seeks, or be used for cueing in editing applications.
139
 
        <P>
140
 
        </P>
141
 
                Also, if you have a need of a custom metadata block, you can define your own and request an ID <A HREF="id.html">here</A>.  Then you can reserve a PADDING block of the correct size when encoding, and overwrite the padding block with your APPLICATION block after encoding.  The resulting stream will be FLAC compatible; decoders that are aware of your metadata can use it and the rest will safely ignore it.
142
 
        </P>
143
 
        <P>
144
 
                <B>AUDIO DATA</B>
145
 
        </P>
146
 
        <P>
147
 
                After the metadata comes the encoded audio data.  Audio data and metadata are not interleaved.  Like most audio codecs, FLAC splits the unencoded audio data into blocks, and encodes each block separately.  The encoded block is packed into a frame and appended to the stream.  The reference encoder uses a single block size for the whole stream but the FLAC format does not require it.
148
 
        </P>
149
 
        <P>
150
 
                <B>BLOCKING</B>
151
 
        </P>
152
 
        <P>
153
 
                The block size is an important parameter to encoding.  If it is too small, the frame overhead will lower the compression.  If it is too large, the modeling stage of the compressor will not be able to generate an efficient model.  Understanding FLAC's modeling will help you to improve compression for some kinds of input by varying the block size.  In the most general case, using linear prediction on 44.1kHz audio, the optimal block size will be between 2-6 ksamples.  <B><TT>flac</TT></B> defaults to a block size of 4608 in this case.  Using the fast fixed predictors, a smaller block size is usually preferable because of the smaller frame header.
154
 
        </P>
155
 
        <P>
156
 
                <B>INTER-CHANNEL DECORRELATION</B>
157
 
        </P>
158
 
        <P>
159
 
                In the case of stereo input, once the data is blocked it is optionally passed through an inter-channel decorrelation stage.  The left and right channels are converted to center and side channels through the following transformation: mid = (left + right) / 2, side = left - right.  This is a lossless process, unlike joint stereo.  For normal CD audio this can result in significant extra compression.  <B><TT>flac</TT></B> has two options for this: <TT>-m</TT> always compresses both the left-right and mid-side versions of the block and takes the smallest frame, and <TT>-M</TT>, which adaptively switches between left-right and mid-side.
160
 
        </P>
161
 
        <P>
162
 
                <B>MODELING</B>
163
 
        </P>
164
 
        <P>
165
 
                In the next stage, the encoder tries to approximate the signal with a function in such a way that when the approximation is subracted, the result (called the <I>residual</I>, <I>residue</I>, or <I>error</I>) requires fewer bits-per-sample to encode.  The function's parameters also have to be transmitted so they should not be so complex as to eat up the savings.  FLAC has two methods of forming approximations: 1) fitting a simple polynomial to the signal; and 2) general linear predictive coding (LPC).  I will not go into the details here, only some generalities that involve the encoding options.
166
 
        </P>
167
 
        <P>
168
 
                First, fixed polynomial prediction (specified with <TT>-l 0</TT>) is much faster, but less accurate than LPC.  The higher the maximum LPC order, the slower, but more accurate, the model will be.  However, there are diminishing returns with increasing orders.  Also, at some point (usually around order 9) the part of the encoder that guesses what is the best order to use will start to get it wrong and the compression will actually decrease slightly; at that point you will have to you will have to use the exhaustive search option <TT>-e</TT> to overcome this, which is significantly slower.
169
 
        </P>
170
 
        <P>
171
 
                Second, the parameters for the fixed predictors can be transmitted in 3 bits whereas the parameters for the LPC model depend on the bits-per-sample and LPC order.  This means the frame header length varies depending on the method and order you choose and can affect the optimal block size.
172
 
        </P>
173
 
        <P>
174
 
                <B>RESIDUAL CODING</B>
175
 
        </P>
176
 
        <P>
177
 
                Once the model is generated, the encoder subracts the approximation from the original signal to get the residual (error) signal.  The error signal is then losslessly coded.  To do this, FLAC takes advantage of the fact that the error signal generally has a Laplacian (two-sided geometric) distribution, and that there are a set of special Huffman codes called Rice codes that can be used to efficiently encode these kind of signals quickly and without needing a dictionary.
178
 
        </P>
179
 
        <P>
180
 
                Rice coding involves finding a single parameter that matches a signal's distribution, then using that parameter to generate the codes.  As the distribution changes, the optimal parameter changes, so FLAC supports a method that allows the parameter to change as needed.  The residual can be broken into several <I>contexts</I> or <I>partitions</I>, each with it's own Rice parameter.  <B><TT>flac</TT></B> allows you to specify how the partitioning is done with the <TT>-r</TT> option.  The residual can be broken into 2^<I>n</I> partitions, by using the option <TT>-r n,n</TT>.  The parameter <I>n</I> is called the <I>partition order</I>.  Furthermore, the encoder can be made to search through <I>m</I> to <I>n</I> partition orders, taking the best one, by specifying <TT>-r m,n</TT>.  Generally, the choice of n does not affect encoding speed but m,n does.  The larger the difference between m and n, the more time it will take the encoder to search for the best order.  The block size will also affect the optimal order.
181
 
        </P>
182
 
        <P>
183
 
                <B>FRAMING</B>
184
 
        </P>
185
 
        <P>
186
 
                An audio frame is preceded by a frame header and trailed by a frame footer.  The header starts with a sync code, and contains the minimum information necessary for a decoder to play the stream, like sample rate, bits per sample, etc.  It also contains the block or sample number and an 8-bit CRC of the frame header.  The sync code, frame header CRC, and block/sample number allow resynchronization and seeking even in the absence of seek points.  The frame footer contains a 16-bit CRC of the entire encoded frame for error detection.  If the reference decoder detects a CRC error it will generate a silent block.
187
 
        </P>
188
 
        <P>
189
 
                <B>MISCELLANEOUS</B>
190
 
        </P>
191
 
        <P>
192
 
                As a convenience, the reference decoder knows how to skip <A HREF="http://www.id3.org/">ID3v1 and ID3v2 tags</A>.  Note however that the FLAC specification does not require compliant implementations to support ID3 in any form and their use is discouraged.
193
 
        </P>
194
 
        <P>
195
 
                <B><TT>flac</TT></B> has a verify option <TT>-V</TT> that verifies the output while encoding.  With this option, a decoder is run in parallel to the encoder and its output is compared against the original input.  If a difference is found <B><TT>flac</TT></B> will stop with an error.
196
 
        </P>
197
 
        </FONT>
198
 
        </TD></TR>
199
 
        </TABLE>
200
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
201
 
</TD></TR>
202
 
</TABLE>
203
 
 
204
 
 
205
 
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="5" BORDER="0">
206
 
<TR><TD>
207
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
208
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#D3D4C5">
209
 
                <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
210
 
                <A NAME="flac"><B><FONT SIZE="+2">flac</FONT></B>
211
 
                </FONT></TD></TR>
212
 
        </TABLE>
213
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
214
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#EEEED4">
215
 
        <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
216
 
        <P>
217
 
                <B><TT>flac</TT></B> is the command-line file encoder/decoder.  The input to the encoder and the output to the decoder must either be RIFF WAVE format, AIFF, or raw interleaved sample data.  <B><TT>flac</TT></B> only supports linear PCM samples (in other words, no A-LAW, uLAW, etc.).  Another restriction (hopefully short-term) is that the input must be 8, 16, or 24 bits per sample.  This is not a limitation of the FLAC format, just the reference encoder/decoder.
218
 
        </P>
219
 
        <P>
220
 
                <B><TT>flac</TT></B> assumes that files ending in ".wav" or that have the RIFF WAVE header present are WAVE files, and files ending in ".aif" or ".aiff" or have the AIFF header present are in AIFF files.  This may be overridden with a command-line option.  It also assumes that files ending in ".ogg" are Ogg FLAC files.  Other than this, <B><TT>flac</TT></B> makes no assumptions about file extensions, though the convention is that FLAC files have the extension ".flac" (or ".fla" on ancient file systems like FAT-16).
221
 
        </P>
222
 
        <P>
223
 
                Before going into the full command-line description, a few other things help to sort it out: 1) <B><TT>flac</TT></B> encodes by default, so you must use <B>-d</B> to decode; 2) the options <B><TT>-0</TT></B> .. <B><TT>-8</TT></B> (or <B><TT>--fast</B></TT> and <B><TT>--best</B></TT>) that control the compression level actually are just synonyms for different groups of specific encoding options (described later) and you can get the same effect by using the same options; 3) <B><TT>flac</TT></B> behaves similarly to gzip in the way it handles input and output files.
224
 
        </P>
225
 
        <P>
226
 
                <B><TT>flac</TT></B> will be invoked one of four ways, depending on whether you are encoding, decoding, testing, or analyzing:
227
 
                <UL>
228
 
                <LI>
229
 
                        Encoding: flac [<I><A HREF="#general_options">&lt;general-options&gt;</A></I>] [<I><A HREF="#format_options">&lt;format-options&gt;</A></I>] [<I><A HREF="#encoding_options">&lt;encoding options&gt;</A></I>] [inputfile [...]]
230
 
                </LI>
231
 
                <LI>
232
 
                        Decoding: flac -d [<I><A HREF="#general_options">&lt;general-options&gt;</A></I>] [<I><A HREF="#format_options">&lt;format-options&gt;</A></I>] [<I><A HREF="#decoding_options">&lt;decoding options&gt;</A></I>]  [FLACfile [...]]
233
 
                </LI>
234
 
                <LI>
235
 
                        Testing: flac -t [<I><A HREF="#general_options">&lt;general-options&gt;</A></I>] [FLACfile [...]]
236
 
                </LI>
237
 
                <LI>
238
 
                        Analyzing: flac -a [<I><A HREF="#general_options">&lt;general-options&gt;</A></I>] [<I><A HREF="#analysis_options">&lt;analysis-options&gt;</A></I>] [FLACfile [...]]
239
 
                </LI>
240
 
                </UL>
241
 
        </P>
242
 
        <P>
243
 
                In any case, if no <TT>inputfile</TT> is specified, stdin is assumed.  If only one inputfile is specified, it may be "-" for stdin.  When stdin is used as input, <B><TT>flac</TT></B> will write to stdout.  Otherwise <B><TT>flac</TT></B> will perform the desired operation on each input file to similarly named output files (meaning for encoding, the extension will be replaced with ".flac", or appended with ".flac" if the input file has no extension, and for decoding, the extension will be ".wav" for WAVE output and ".raw" for raw output).  The original file is not deleted unless --delete-input-file is specified.
244
 
        </P>
245
 
        <P>
246
 
                If you are encoding/decoding from stdin to a file, you should use the -o option like so:
247
 
                <UL>
248
 
                <LI>
249
 
                        flac [options] -o outputfile
250
 
                </LI>
251
 
                <LI>
252
 
                        flac -d [options] -o outputfile
253
 
                </LI>
254
 
                </UL>
255
 
                which are better than:
256
 
                <UL>
257
 
                <LI>
258
 
                        flac [options] &gt; outputfile
259
 
                </LI>
260
 
                <LI>
261
 
                        flac -d [options] &gt; outputfile
262
 
                </LI>
263
 
                </UL>
264
 
                since the former allows flac to seek backwards to write the STREAMINFO or RIFF WAVE header contents when necessary.
265
 
        </P>
266
 
        <P>
267
 
                Also, you can force output data to go to stdout using <TT>-c</TT>.
268
 
        </P>
269
 
        <P>
270
 
                To encode or decode files that start with a dash, use <TT>--</TT> to signal the end of options, to keep the filenames themselves from being treated as options:
271
 
                <UL>
272
 
                <LI>
273
 
                        <TT>flac -V -- -01-filename.wav</TT>
274
 
                </LI>
275
 
                </UL>
276
 
        </P>
277
 
        <P>The encoding options affect the compression ratio and encoding speed.  The format options are used to tell <B><TT>flac</TT></B> the arrangement of samples if the input file (or output file when decoding) is a raw file.  If it is a RIFF WAVE or AIFF file the format options are not needed since they are read from the AIFF/WAVE header.
278
 
        </P>
279
 
        <P>
280
 
                In test mode, <B><TT>flac</TT></B> acts just like in decode mode, except no output file is written.  Both decode and test modes detect errors in the stream, but they also detect when the MD5 signature of the decoded audio does not match the stored MD5 signature, even when the bitstream is valid.
281
 
        </P>
282
 
        <P>
283
 
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
284
 
        <TABLE WIDTH="100%" BORDER="1" BGCOLOR="#EEEED4">
285
 
                <TR>
286
 
                        <TD COLSPAN="2" BGCOLOR="#D3D4C5">
287
 
                                <A NAME="general_options"><FONT SIZE="+1"><B>General Options</B></FONT></A>
288
 
                        </TD>
289
 
                </TR>
290
 
                <TR>
291
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
292
 
                                <A NAME="flac_options_version">
293
 
                                <TT>-v</TT>, <TT>--version</TT>
294
 
                        </TD>
295
 
                        <TD>
296
 
                                Show the <B><TT>flac</TT></B> version number.
297
 
                        </TD>
298
 
                </TR>
299
 
                <TR>
300
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
301
 
                                <A NAME="flac_options_help">
302
 
                                <TT>-h</TT>, <TT>--help</TT>
303
 
                        </TD>
304
 
                        <TD>
305
 
                                Show basic usage and a list of all options.  Running <B><TT>flac</TT></B> without arguments shows the short help screen by default.
306
 
                        </TD>
307
 
                </TR>
308
 
                <TR>
309
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
310
 
                                <A NAME="flac_options_explain">
311
 
                                <TT>-H</TT>, <TT>--explain</TT>
312
 
                        </TD>
313
 
                        <TD>
314
 
                                Show detailed explanation of usage and all options.  Running <B><TT>flac</TT></B> without arguments shows the short help screen by default.
315
 
                        </TD>
316
 
                </TR>
317
 
                <TR>
318
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
319
 
                                <A NAME="flac_options_decode">
320
 
                                <TT>-d</TT>, <TT>--decode</TT>
321
 
                        </TD>
322
 
                        <TD>
323
 
                                Decode (<B><TT>flac</TT></B> encodes by default).  <B><TT>flac</TT></B> will exit with an exit code of <TT>1</TT> (and print a message, even in silent mode) if there were any errors during decoding, including when the MD5 checksum does not match the decoded output.  Otherwise the exit code will be <TT>0</TT>.
324
 
                        </TD>
325
 
                </TR>
326
 
                <TR>
327
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
328
 
                                <A NAME="flac_options_test">
329
 
                                <TT>-t</TT>, <TT>--test</TT>
330
 
                        </TD>
331
 
                        <TD>
332
 
                                Test (same as <B><TT>-d</TT></B> except no decoded file is written).  The exit codes are the same as in decode mode.
333
 
                        </TD>
334
 
                </TR>
335
 
                <TR>
336
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
337
 
                                <A NAME="flac_options_analyze">
338
 
                                <TT>-a</TT>, <TT>--analyze</TT>
339
 
                        </TD>
340
 
                        <TD>
341
 
                                Analyze (same as <B><TT>-d</TT></B> except an analysis file is written).  The exit codes are the same as in decode mode.  This option is mainly for developers; the output will be a text file that has data about each frame and subframe.
342
 
                        </TD>
343
 
                </TR>
344
 
                <TR>
345
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
346
 
                                <A NAME="flac_options_stdout">
347
 
                                <TT>-c</TT>, <TT>--stdout</TT>
348
 
                        </TD>
349
 
                        <TD>
350
 
                                Write output to stdout.
351
 
                        </TD>
352
 
                </TR>
353
 
                <TR>
354
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
355
 
                                <A NAME="flac_options_silent">
356
 
                                <TT>-s</TT>, <TT>--silent</TT>
357
 
                        </TD>
358
 
                        <TD>
359
 
                                Silent: do not show encoding/decoding statistics.
360
 
                        </TD>
361
 
                </TR>
362
 
                <TR>
363
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
364
 
                                <A NAME="flac_options_totally_silent">
365
 
                                <TT>--totally-silent</TT>
366
 
                        </TD>
367
 
                        <TD>
368
 
                                Do not print anything of any kind, including warnings or errors.  The exit code will be the only way to determine successful completion.
369
 
                        </TD>
370
 
                </TR>
371
 
                <TR>
372
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
373
 
                                <A NAME="flac_options_force">
374
 
                                <TT>-f</TT>, <TT>--force</TT>
375
 
                        </TD>
376
 
                        <TD>
377
 
                                Force overwriting of output files.  By default, <TT><B>flac</B></TT> warns that the output file already exists and continues to the next file.
378
 
                        </TD>
379
 
                </TR>
380
 
                <TR>
381
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
382
 
                                <A NAME="flac_options_output_name">
383
 
                                <TT>-o filename</TT>,<BR><TT>--output-name=filename</TT>
384
 
                        </TD>
385
 
                        <TD>
386
 
                                Force the output file name (usually <TT><B>flac</B></TT> just changes the extension).  May only be used when encoding a single file.  May not be used in conjunction with <TT><A HREF="#flac_options_output_prefix">--output-prefix</A></TT>.
387
 
                        </TD>
388
 
                </TR>
389
 
                <TR>
390
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
391
 
                                <A NAME="flac_options_output_prefix">
392
 
                                <TT>--output-prefix=string</TT>
393
 
                        </TD>
394
 
                        <TD>
395
 
                                Prefix each output file name with the given string.  This can be useful for encoding/decoding files to a different directory.  Make sure if your string is a path name that it ends with a trailing '<TT>/</TT>' slash.
396
 
                        </TD>
397
 
                </TR>
398
 
                <TR>
399
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
400
 
                                <A NAME="flac_options_delete_input_file">
401
 
                                <TT>--delete-input-file</TT>
402
 
                        </TD>
403
 
                        <TD>
404
 
                                Automatically delete the input file after a successful encode or decode.  If there was an error (including a verify error) the input file is left intact.
405
 
                        </TD>
406
 
                </TR>
407
 
                <TR>
408
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
409
 
                                <A NAME="flac_options_skip">
410
 
                                <TT>--skip={#|mm:ss.ss}</TT>
411
 
                        </TD>
412
 
                        <TD>
413
 
                                Skip over the first # of samples of the input.  This works for both encoding and decoding, but not testing.  The alternative form <TT>mm:ss.ss</TT> can be used to specify minutes, seconds, and fractions of a second.<P>
414
 
                                Examples:<P>
415
 
                                <TT>--skip=123</TT> : skip the first 123 samples of the input<P>
416
 
                                <TT>--skip=1:23.45</TT> : skip the first 1 minute and 23.45 seconds of the input
417
 
                        </TD>
418
 
                </TR>
419
 
                <TR>
420
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
421
 
                                <A NAME="flac_options_until">
422
 
                                <TT>--until={#|[+|-]mm:ss.ss}</TT>
423
 
                        </TD>
424
 
                        <TD>
425
 
                                Stop at the given sample number for each input file.  This works for both encoding and decoding, but not testing.  The given sample number is not included in the decoded output.  The alternative form <TT>mm:ss.ss</TT> can be used to specify minutes, seconds, and fractions of a second.  If a <TT>+</TT> sign is at the beginning, the <TT>--until</TT> point is relative to the <TT>--skip</TT> point.  If a <TT>-</TT> sign is at the beginning, the <TT>--until</TT> point is relative to end of the audio.<P>
426
 
                                Examples:<P>
427
 
                                <TT>--until=123</TT> : decode only the first 123 samples of the input (samples 0-122, stopping at 123)<P>
428
 
                                <TT>--until=1:23.45</TT> : decode only the first 1 minute and 23.45 seconds of the input<P>
429
 
                                <TT>--skip=1:00 --until=+1:23.45</TT> : decode 1:00.00 to 2:23.45<P>
430
 
                                <TT>--until=-1:23.45</TT> : decode everything except the last 1 minute and 23.45 seconds<P>
431
 
                                <TT>--until=-0:00</TT> : decode until the end of the input (the same as not specifying <TT>--until</TT>)
432
 
                        </TD>
433
 
                </TR>
434
 
                <TR>
435
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
436
 
                                <A NAME="flac_options_ogg">
437
 
                                <TT>--ogg</TT>
438
 
                        </TD>
439
 
                        <TD>
440
 
                                When encoding, generate Ogg FLAC output instead of native FLAC.  Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer.  The resulting file should have an '.ogg' extension and will still be decodable by <TT><B>flac</B></TT>.<P>
441
 
                                When decoding, force the input to be treated as Ogg FLAC.  This is useful when piping input from stdin or when the filename does not end in '.ogg'.<P>
442
 
                                <B>NOTE:</B> Ogg FLAC files created prior to <B><TT>flac</TT></B> 1.1.1 used an ad-hoc mapping and do not support seeking.  They should be decoded and re-encoded with <B><TT>flac</TT></B> 1.1.1 or later.
443
 
                        </TD>
444
 
                </TR>
445
 
                <TR>
446
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
447
 
                                <A NAME="flac_options_serial_number">
448
 
                                <TT>--serial-number=#</TT>
449
 
                        </TD>
450
 
                        <TD>
451
 
                                When used with --ogg, specifies the serial number to use for the first Ogg FLAC stream, which is then incremented for each additional stream.  When encoding and no serial number is given, <TT><B>flac</B></TT> uses a random number for the first stream, then increments it for each additional stream.  When decoding and no number is given, <TT><B>flac</B></TT> uses the serial number of the first page.
452
 
                        </TD>
453
 
                </TR>
454
 
        </TABLE>
455
 
        </TD></TR></TABLE>
456
 
        </P>
457
 
        <P>
458
 
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
459
 
        <TABLE WIDTH="100%" BORDER="1" BGCOLOR="#EEEED4">
460
 
                <TR>
461
 
                        <TD COLSPAN="2" BGCOLOR="#D3D4C5">
462
 
                                <A NAME="analysis_options"><FONT SIZE="+1"><B>Analysis Options</B></FONT></A>
463
 
                        </TD>
464
 
                </TR>
465
 
                <TR>
466
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
467
 
                                <A NAME="flac_options_residual_text">
468
 
                                <TT>--residual-text</TT>
469
 
                        </TD>
470
 
                        <TD>
471
 
                                Includes the residual signal in the analysis file.  This will make the file <B>very</B> big, much larger than even the decoded file.
472
 
                        </TD>
473
 
                </TR>
474
 
                <TR>
475
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
476
 
                                <A NAME="flac_options_residual_gnuplot">
477
 
                                <TT>--residual-gnuplot</TT>
478
 
                        </TD>
479
 
                        <TD>
480
 
                                Generates a gnuplot file for every subframe; each file will contain the residual distribution of the subframe.  This will create a <B>lot</B> of files.
481
 
                        </TD>
482
 
                </TR>
483
 
        </TABLE>
484
 
        </TD></TR></TABLE>
485
 
        </P>
486
 
        <P>
487
 
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
488
 
        <TABLE WIDTH="100%" BORDER="1" BGCOLOR="#EEEED4">
489
 
                <TR>
490
 
                        <TD COLSPAN="2" BGCOLOR="#D3D4C5">
491
 
                                <A NAME="decoding_options"><FONT SIZE="+1"><B>Decoding Options</B></FONT></A>
492
 
                        </TD>
493
 
                </TR>
494
 
                <TR>
495
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
496
 
                                <A NAME="flac_options_cue">
497
 
                                <TT>--cue=[#.#][-[#.#]]</TT>
498
 
                        </TD>
499
 
                        <TD>
500
 
                                Set the beginning and ending cuepoints to decode.  The optional first <TT>#.#</TT> is the track and index point at which decoding will start; the default is the beginning of the stream.  The optional second <TT>#.#</TT> is the track and index point at which decoding will end; the default is the end of the stream.  If the cuepoint does not exist, the closest one before it (for the start point) or after it (for the end point) will be used.  If those don't exist, the start of the stream (for the start point) or end of the stream (for the end point) will be used.  The cuepoints are merely translated into sample numbers then used as --skip and --until.<P>
501
 
                                Examples:<P>
502
 
                                <TT>--cue=-</TT> : decode the entire stream<P>
503
 
                                <TT>--cue=4.1</TT> : decode from track 4, index 1 to the end of the stream<P>
504
 
                                <TT>--cue=4.1-</TT> : decode from track 4, index 1 to the end of the stream<P>
505
 
                                <TT>--cue=-4.1</TT> : decode from the beginning of the stream up to, but not including, track 4, index 1<P>
506
 
                                <TT>--cue=2.1-2.4</TT> : decode from track 2, index 1, up to, but not including, track 2, index 4<P>
507
 
                        </TD>
508
 
                </TR>
509
 
                <TR>
510
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
511
 
                                <A NAME="flac_options_decode_through_errors">
512
 
                                <TT>-F</TT>,<BR><TT>--decode-through-errors</TT>
513
 
                        </TD>
514
 
                        <TD>
515
 
                                By default <B><TT>flac</TT></B> stops decoding with an error and removes the partially decoded file if it encounters a bitstream error.  With <TT>-F</TT>, errors are still printed but <B><TT>flac</TT></B> will continue decoding to completion.  Note that errors may cause the decoded audio to be missing some samples or have silent sections.
516
 
                        </TD>
517
 
                </TR>
518
 
                <!-- @@@ undocumented, also not in the man page yet
519
 
                <TR>
520
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
521
 
                                <A NAME="flac_options_apply_replaygain_which_is_not_lossless">
522
 
                                <TT>--apply-replaygain-which-is-not-lossless[=&lt;specification&gt;]</TT>
523
 
                        </TD>
524
 
                        <TD>
525
 
                                Applies ReplayGain values while decoding.
526
 
                                <P>
527
 
                                <B>WARNING: THIS IS NOT LOSSLESS.  DECODED AUDIO WILL NOT BE IDENTICAL TO THE ORIGINAL WITH THIS OPTION</B>.
528
 
                                <P>
529
 
                                The equals sign and &lt;specification&gt; is optional.  If omitted, the default is <TT>0aLn1</TT>.
530
 
                                <P>
531
 
                                The <TT>&lt;specification&gt;</TT> is a shorthand notation for describing how to apply ReplayGain.  All components are optional but order is important.  '<TT>[]</TT>' means 'optional'.  '<TT>|</TT>' means 'or'.  '<TT>{}</TT>' means required.  The format is:<P>
532
 
                                &nbsp;&nbsp;<TT>[&lt;preamp&gt;][a|t][l|L][n{0|1|2|3}]</TT>
533
 
                                <P>
534
 
                                <UL>
535
 
                                        <LI>
536
 
                                                <TT>&lt;preamp&gt;</TT><P>
537
 
                                                        &nbsp;&nbsp;A floating point number in dB.  This is added to the existing gain value.
538
 
                                        </LI>
539
 
                                        <LI>
540
 
                                                <TT>a|t</TT><P>
541
 
                                                        &nbsp;&nbsp;Specify '<TT>a</TT>' to use the album gain, or '<TT>t</TT>' to use the track gain
542
 
                                        </LI>
543
 
                                        <LI>
544
 
                                                <TT>l|L</TT><P>
545
 
                                                        &nbsp;&nbsp;Specify '<TT>l</TT>' to peak-limit the output, so that the ReplayGain peak value is full-scale.  Specify '<TT>L</TT>' to use a 6dB hard limiter that kicks in when the signal approaches full-scale.
546
 
                                        </LI>
547
 
                                        <LI>
548
 
                                                <TT>n{0|1|2|3}</TT><P>
549
 
                                                        &nbsp;&nbsp;Specify the amount of noise shaping.  ReplayGain synthesis happens in floating point; the result is dithered before converting back to integer.  This quantization adds noise.  Noise shaping tries to move the noise where you won't hear it as much.  <TT>0</TT> means no noise shaping, <TT>1</TT> means 'low', <TT>2</TT> means 'medium', <TT>3</TT> means 'high'.
550
 
                                        </LI>
551
 
                                </UL>
552
 
                                <P>
553
 
                                For example, the default of <TT>0aLn1</TT> means 0dB preamp, use album gain, 6dB hard limit, low noise shaping.
554
 
                                <P>
555
 
                                <TT>--apply-replaygain-which-is-not-lossless=3</TT> means 3dB preamp, use album gain, no limiting, no noise shaping.
556
 
                                <P>
557
 
                                <B><TT>flac</B></TT> uses the ReplayGain tags for the calculation.  If a stream does not have the required tags or they can't be parsed, decoding will continue with a warning, and no ReplayGain is applied to that stream.
558
 
                        </TD>
559
 
                </TR>
560
 
                -->
561
 
        </TABLE>
562
 
        </TD></TR></TABLE>
563
 
        </P>
564
 
        <P>
565
 
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
566
 
        <TABLE WIDTH="100%" BORDER="1" BGCOLOR="#EEEED4">
567
 
                <TR>
568
 
                        <TD COLSPAN="2" BGCOLOR="#D3D4C5">
569
 
                                <A NAME="encoding_options"><FONT SIZE="+1"><B>Encoding Options</B></FONT></A>
570
 
                        </TD>
571
 
                </TR>
572
 
                <TR>
573
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
574
 
                                <A NAME="flac_options_verify">
575
 
                                <TT>-V</TT>, <TT>--verify</TT>
576
 
                        </TD>
577
 
                        <TD>
578
 
                                Verify the encoding process.  With this option, <B><TT>flac</TT></B> will create a parallel decoder that decodes the output of the encoder and compares the result against the original.  It will abort immediately with an error if a mismatch occurs.  <B><TT>-V</TT></B> increases the total encoding time but is guaranteed to catch any unforseen bug in the encoding process.
579
 
                        </TD>
580
 
                </TR>
581
 
                <TR>
582
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
583
 
                                <A NAME="flac_options_lax">
584
 
                                <TT>--lax</TT>
585
 
                        </TD>
586
 
                        <TD>
587
 
                                Allow encoder to generate non-<A HREF="format.html#subset">Subset</A> files.  The resulting FLAC file may not be streamable or might have trouble being played in all players (especially hardware devices), so you should only use this option in combination with custom encoding options meant for archival.
588
 
                        </TD>
589
 
                </TR>
590
 
                <TR>
591
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
592
 
                                <A NAME="flac_options_replay_gain">
593
 
                                <TT>--replay-gain</TT>
594
 
                        </TD>
595
 
                        <TD>
596
 
                                Calculate <A HREF="http://www.replaygain.org/">ReplayGain</A> values and store in FLAC tags, similar to <A HREF="http://packages.qa.debian.org/v/vorbisgain.html">VorbisGain</A>.  Title gains/peaks will be computed for each input file, and an album gain/peak will be computed for all files.  All input files must have the same resolution, sample rate, and number of channels.  Only mono and stereo files are allowed, and the sample rate must be one of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.  Also note that this option may leave a few extra bytes in a PADDING block as the exact size of the tags is not known until all files are processed.<P>
597
 
                                Note that this option cannot be used when encoding to standard output (stdout).
598
 
                        </TD>
599
 
                </TR>
600
 
                <TR>
601
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
602
 
                                <A NAME="flac_options_cuesheet">
603
 
                                <TT>--cuesheet=FILENAME</TT>
604
 
                        </TD>
605
 
                        <TD>
606
 
                                Import the given cuesheet file and store it in a <A HREF="format.html#def_CUESHEET">CUESHEET</A> metadata block.  This option may only be used when encoding a single file.  A seekpoint will be added for each index point in the cuesheet to the <A HREF="format.html#def_SEEKTABLE">SEEKTABLE</A> unless <TT>--no-cued-seekpoints</TT> is specified.<P>
607
 
                                The cuesheet file must be of the sort written by <A HREF="http://www.goldenhawk.com/cdrwin.htm">CDRwin</A>, <A HREF="http://www.dcsoft.com/prod03.htm">CDRcue</A>, <A HREF="http://www.exactaudiocopy.de/">EAC</A>, et al.
608
 
                        </TD>
609
 
                </TR>
610
 
                <TR>
611
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
612
 
                                <A NAME="flac_options_sector_align">
613
 
                                <TT>--sector-align</TT>
614
 
                        </TD>
615
 
                        <TD>
616
 
                                Align encoding of multiple CD format WAVE files on sector boundaries.  This option is only allowed when encoding WAVE files, all of which have a 44.1kHz sample rate and 2 channels.  With <TT>--sector-align</TT>, the encoder will align the resulting .flac streams so that their lengths are even multiples of a CD sector (1/75th of a second, or 588 samples).  It does this by carrying over any partial sector at the end of each WAVE file to the next stream.  The last stream will be padded to alignment with zeroes.<P>
617
 
                                This option will have no effect if the files are already aligned (as is the normally the case with WAVE files ripped from a CD).  <TT><B>flac</B></TT> can only align a set of files given in one invocation of <TT><B>flac</B></TT>.<P>
618
 
                                <B>WARNING:</B> The ordering of files is important!  If you give a command like '<TT>flac --sector-align *.wav</TT>' the shell may not expand the wildcard to the order you expect.  To be safe you should '<TT>echo *.wav</TT>' first to confirm the order, or be explicit like '<TT>flac --sector-align 8.wav 9.wav 10.wav</TT>'.
619
 
                        </TD>
620
 
                </TR>
621
 
                <TR>
622
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
623
 
                                <A NAME="flac_options_seekpoint">
624
 
                                <TT>-S {#|X|#x|#s}</TT>,<BR><TT>--seekpoint={#|X|#x|#s}</TT>
625
 
                        </TD>
626
 
                        <TD>
627
 
                                Include a point or points in a SEEKTABLE:<BR>
628
 
                                <UL>
629
 
                                <LI>
630
 
                                        <TT>#&nbsp;</TT> : a specific sample number for a seek point
631
 
                                </LI>
632
 
                                <LI>
633
 
                                        <TT>X&nbsp;</TT> : a placeholder point (always goes at the end of the SEEKTABLE)
634
 
                                </LI>
635
 
                                <LI>
636
 
                                        <TT>#x</TT> : # evenly spaced seekpoints, the first being at sample 0
637
 
                                </LI>
638
 
                                <LI>
639
 
                                        <TT>#s</TT> : a seekpoint every # seconds; # does not have to be a whole number, it can be, for example, <TT>9.5</TT>, meaning a seekpoint every 9.5 seconds
640
 
                                </LI>
641
 
                                </UL>
642
 
                                You may use many -S options; the resulting SEEKTABLE will be the unique-ified union of all such values.<BR>
643
 
                                With no -S options, flac defaults to '-S 10s'.  Use --no-seektable for no SEEKTABLE.<BR>
644
 
                                <B>NOTE:</B> -S #x and -S #s will not work if the encoder can't determine the input size before starting.<BR>
645
 
                                <B>NOTE:</B> if you use -S # and # is &gt;= samples in the input, there will be either no seek point entered (if the input size is determinable before encoding starts) or a placeholder point (if input size is not determinable).<BR>
646
 
                        </TD>
647
 
                </TR>
648
 
                <TR>
649
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
650
 
                                <A NAME="flac_options_padding">
651
 
                                <TT>-P #</TT>, <TT>--padding=#</TT>
652
 
                        </TD>
653
 
                        <TD>
654
 
                                Tell the encoder to write a <TT>PADDING</TT> metadata block of the given length (in bytes) after the <TT>STREAMINFO</TT> block.  This is useful if you plan to tag the file later with an <TT>APPLICATION</TT> block; instead of having to rewrite the entire file later just to insert your block, you can write directly over the <TT>PADDING</TT> block.  Note that the total length of the <TT>PADDING</TT> block will be 4 bytes longer than the length given because of the 4 metadata block header bytes.  You can force no <TT>PADDING</TT> block at all to be written with <TT>--no-padding</TT>.  The encoder writes a PADDING block of 4096 bytes by default.
655
 
                        </TD>
656
 
                </TR>
657
 
                <TR>
658
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
659
 
                                <A NAME="flac_options_tag">
660
 
                                <TT>-T FIELD=VALUE</TT>, <TT>--tag=FIELD=VALUE</TT>
661
 
                        </TD>
662
 
                        <TD>
663
 
                                Add a FLAC tag.  The comment must adhere to the Vorbis comment spec (which FLAC tags implement), i.e. the FIELD must contain only legal characters, terminated by an 'equals' sign.  Make sure to quote the comment if necessary.  This option may appear more than once to add several comments.  NOTE: all tags will be added to all encoded files.
664
 
                        </TD>
665
 
                </TR>
666
 
                <TR>
667
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
668
 
                                <A NAME="flac_options_blocksize">
669
 
                                <TT>-b #</TT>, <TT>--blocksize=#</TT>
670
 
                        </TD>
671
 
                        <TD>
672
 
                                Specify the block size in samples.  The default is 1152 for -l 0, otherwise 4608.  Subset streams must use one of 192/576/1152/2304/4608/256/512/1024/2048/4096/8192/16384/32768.  The reference encoder uses the same block size for the entire stream.
673
 
                        </TD>
674
 
                </TR>
675
 
                <TR>
676
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
677
 
                                <A NAME="flac_options_mid_side">
678
 
                                <TT>-m</TT>, <TT>--mid-side</TT>
679
 
                        </TD>
680
 
                        <TD>
681
 
                                Enable mid-side coding (only for stereo streams).  Tends to increase compression by a few percent on average.  For each block both the stereo pair and mid-side versions of the block will be encoded, and smallest resulting frame will be stored.
682
 
                        </TD>
683
 
                </TR>
684
 
                <TR>
685
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
686
 
                                <A NAME="flac_options_adaptive_mid_side">
687
 
                                <TT>-M</TT>, <TT>--adaptive-mid-side</TT>
688
 
                        </TD>
689
 
                        <TD>
690
 
                                Enable adaptive mid-side coding (only for stereo streams).  Like <TT>-m</TT> but the encoder adaptively switches between independent and mid-side coding, which is faster but yields less compression than <TT>-m</TT> (which does an exhaustive search).
691
 
                        </TD>
692
 
                </TR>
693
 
                <TR>
694
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
695
 
                                <A NAME="flac_options_levels">
696
 
                                <TT>-0 .. -8</TT>
697
 
                        </TD>
698
 
                        <TD>
699
 
                                Fastest compression .. highest compression.  The default is <TT>-5</TT>.
700
 
                        </TD>
701
 
                </TR>
702
 
                <TR>
703
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
704
 
                                <A NAME="flac_options_level_0">
705
 
                                <TT>-0</TT>, <TT>--compression-level-0</TT>
706
 
                        </TD>
707
 
                        <TD>
708
 
                                Synonymous with <TT>-l 0 -b 1152 -r 2,2</TT>
709
 
                        </TD>
710
 
                </TR>
711
 
                <TR>
712
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
713
 
                                <A NAME="flac_options_level_1">
714
 
                                <TT>-1</TT>, <TT>--compression-level-1</TT>
715
 
                        </TD>
716
 
                        <TD>
717
 
                                Synonymous with <TT>-l 0 -b 1152 -M -r 2,2</TT>
718
 
                        </TD>
719
 
                </TR>
720
 
                <TR>
721
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
722
 
                                <A NAME="flac_options_level_2">
723
 
                                <TT>-2</TT>, <TT>--compression-level-2</TT>
724
 
                        </TD>
725
 
                        <TD>
726
 
                                Synonymous with <TT>-l 0 -b 1152 -m -r 3</TT>
727
 
                        </TD>
728
 
                </TR>
729
 
                <TR>
730
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
731
 
                                <A NAME="flac_options_level_3">
732
 
                                <TT>-3</TT>, <TT>--compression-level-3</TT>
733
 
                        </TD>
734
 
                        <TD>
735
 
                                Synonymous with <TT>-l 6 -b 4608 -r 3,3</TT>
736
 
                        </TD>
737
 
                </TR>
738
 
                <TR>
739
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
740
 
                                <A NAME="flac_options_level_4">
741
 
                                <TT>-4</TT>, <TT>--compression-level-4</TT>
742
 
                        </TD>
743
 
                        <TD>
744
 
                                Synonymous with <TT>-l 8 -b 4608 -M -r 3,3</TT>
745
 
                        </TD>
746
 
                </TR>
747
 
                <TR>
748
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
749
 
                                <A NAME="flac_options_level_5">
750
 
                                <TT>-5</TT>, <TT>--compression-level-5</TT>
751
 
                        </TD>
752
 
                        <TD>
753
 
                                Synonymous with <TT>-l 8 -b 4608 -m -r 3,3</TT>
754
 
                        </TD>
755
 
                </TR>
756
 
                <TR>
757
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
758
 
                                <A NAME="flac_options_level_6">
759
 
                                <TT>-6</TT>, <TT>--compression-level-6</TT>
760
 
                        </TD>
761
 
                        <TD>
762
 
                                Synonymous with <TT>-l 8 -b 4608 -m -r 4</TT>
763
 
                        </TD>
764
 
                </TR>
765
 
                <TR>
766
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
767
 
                                <A NAME="flac_options_level_7">
768
 
                                <TT>-7</TT>, <TT>--compression-level-7</TT>
769
 
                        </TD>
770
 
                        <TD>
771
 
                                Synonymous with <TT>-l 8 -b 4608 -m -e -r 6</TT>
772
 
                        </TD>
773
 
                </TR>
774
 
                <TR>
775
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
776
 
                                <A NAME="flac_options_level_8">
777
 
                                <TT>-8</TT>, <TT>--compression-level-8</TT>
778
 
                        </TD>
779
 
                        <TD>
780
 
                                Synonymous with <TT>-l 12 -b 4608 -m -e -r 6</TT>
781
 
                        </TD>
782
 
                </TR>
783
 
                <TR>
784
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
785
 
                                <A NAME="flac_options_fast">
786
 
                                <TT>--fast</TT>
787
 
                        </TD>
788
 
                        <TD>
789
 
                                Fastest compression.  Currently synonymous with <TT>-0</TT>
790
 
                        </TD>
791
 
                </TR>
792
 
                <TR>
793
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
794
 
                                <A NAME="flac_options_best">
795
 
                                <TT>--best</TT>
796
 
                        </TD>
797
 
                        <TD>
798
 
                                Highest compression.  Currently synonymous with <TT>-8</TT>
799
 
                        </TD>
800
 
                </TR>
801
 
                <TR>
802
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
803
 
                                <A NAME="flac_options_exhaustive_model_search">
804
 
                                <TT>-e</TT>,<BR><TT>--exhaustive-model-search</TT>
805
 
                        </TD>
806
 
                        <TD>
807
 
                                Exhaustive model search (expensive!).  Normally the encoder estimates the best model to use and encodes once based on the estimate.  With an exhaustive model search, the encoder will generate subframes for every order and use the smallest.  If the max LPC order is high this can significantly increase the encode time but can shave off another 0.5%.
808
 
                        </TD>
809
 
                </TR>
810
 
                <TR>
811
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
812
 
                                <A NAME="flac_options_max_lpc_order">
813
 
                                <TT>-l #</TT>, <TT>--max-lpc-order=#</TT>
814
 
                        </TD>
815
 
                        <TD>
816
 
                                Specifies the maximum LPC order.  This number must be &lt;= 32.  If 0, the encoder will not attempt generic linear prediction, and use only fixed predictors.  Using fixed predictors is faster but usually results in files being 5-10% larger.
817
 
                        </TD>
818
 
                </TR>
819
 
                <TR>
820
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
821
 
                                <A NAME="flac_options_qlp_coeff_precision">
822
 
                                <TT>-q #</TT>,<BR><TT>--qlp-coeff-precision=#</TT>
823
 
                        </TD>
824
 
                        <TD>
825
 
                                Specifies the precision of the quantized LP coefficients, in bits.  The default is <B><TT>-q 0</TT></B>, which means let the encoder decide based on the signal.  Unless you really know your input file it's best to leave this up to the encoder.
826
 
                        </TD>
827
 
                </TR>
828
 
                <TR>
829
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
830
 
                                <A NAME="flac_options_qlp_coeff_precision_search">
831
 
                                <TT>-p</TT>,<BR><TT>--qlp-coeff-precision-search</TT>
832
 
                        </TD>
833
 
                        <TD>
834
 
                                Do exhaustive LP coefficient quantization optimization.  This option overrides any <B><TT>-q</TT></B> option.  It is expensive and typically will only improve the compression a tiny fraction of a percent.  <B><TT>-q</TT></B> has no effect when <B><TT>-l 0</TT></B> is used.
835
 
                        </TD>
836
 
                </TR>
837
 
                <TR>
838
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
839
 
                                <A NAME="flac_options_rice_partition_order">
840
 
                                <TT>-r [#,]#</TT>,<BR><TT>--rice-partition-order=[#,]#</TT>
841
 
                        </TD>
842
 
                        <TD>
843
 
                                Set the [min,]max residual partition order.  The min value defaults to 0 if unspecified.<P>
844
 
                                By default the encoder uses a single Rice parameter for the subframe's entire residual.  With this option, the residual is iteratively partitioned into 2^min# .. 2^max# pieces, each with its own Rice parameter.  Higher values of max# yield diminishing returns.  The most bang for the buck is usually with <B><TT>-r 2,2</TT></B> (more for higher block sizes).  This usually shaves off about 1.5%.  The technique tends to peak out about when blocksize/(2^n)=128.  Use <B><TT>-r 0,16</TT></B> to force the highest degree of optimization.
845
 
                        </TD>
846
 
                </TR>
847
 
        </TABLE>
848
 
        </TD></TR></TABLE>
849
 
        </P>
850
 
        <P>
851
 
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
852
 
        <TABLE WIDTH="100%" BORDER="1" BGCOLOR="#EEEED4">
853
 
                <TR>
854
 
                        <TD COLSPAN="2" BGCOLOR="#D3D4C5">
855
 
                                <A NAME="format_options"><FONT SIZE="+1"><B>Format Options</B></FONT></A>
856
 
                        </TD>
857
 
                </TR>
858
 
                <TR>
859
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
860
 
                                <A NAME="flac_options_endian">
861
 
                                <TT>--endian={big|little}</TT>
862
 
                        </TD>
863
 
                        <TD>
864
 
                                Specify big-endian or little-endian byte order in the raw file.
865
 
                        </TD>
866
 
                </TR>
867
 
                <TR>
868
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
869
 
                                <A NAME="flac_options_channels">
870
 
                                <TT>--channels=#</TT>
871
 
                        </TD>
872
 
                        <TD>
873
 
                                Specify the number of channels in the raw file.
874
 
                        </TD>
875
 
                </TR>
876
 
                <TR>
877
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
878
 
                                <A NAME="flac_options_bps">
879
 
                                <TT>--bps=#</TT>
880
 
                        </TD>
881
 
                        <TD>
882
 
                                Specify the number of bits per sample in the raw file.
883
 
                        </TD>
884
 
                </TR>
885
 
                <TR>
886
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
887
 
                                <A NAME="flac_options_sample_rate">
888
 
                                <TT>--sample-rate=#</TT>
889
 
                        </TD>
890
 
                        <TD>
891
 
                                Specify the sample rate of the raw file.
892
 
                        </TD>
893
 
                </TR>
894
 
                <TR>
895
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
896
 
                                <A NAME="flac_options_sign">
897
 
                                <TT>--sign={signed|unsigned}</TT>
898
 
                        </TD>
899
 
                        <TD>
900
 
                                Specify that the samples in the raw file are signed or unsigned (the default is signed).
901
 
                        </TD>
902
 
                </TR>
903
 
                <TR>
904
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
905
 
                                <A NAME="flac_options_input_size">
906
 
                                <TT>--input-size=#</TT>
907
 
                        </TD>
908
 
                        <TD>
909
 
                                Specify the size of the raw input in bytes.  If you are encoding raw samples from stdin, you must set this option in order to be able to use --skip, --until, --cue-sheet, or other options that need to know the size of the input beforehand.  If the size given is greater than what is found in the input stream, the encoder will complain about an unexpected end-of-file.  If the size given is less, samples will be truncated.
910
 
                        </TD>
911
 
                </TR>
912
 
                <TR>
913
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
914
 
                                <A NAME="flac_options_force_aiff_format">
915
 
                                <TT>--force-aiff-format</TT>
916
 
                        </TD>
917
 
                        <TD>
918
 
                                Force the decoder to output AIFF format.  This option is not needed if the output filename (as set by -o) ends with .aiff.  Also, this option has no effect when encoding since input AIFF is auto-detected.
919
 
                        </TD>
920
 
                </TR>
921
 
                <TR>
922
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
923
 
                                <A NAME="flac_options_force_raw_format">
924
 
                                <TT>--force-raw-format</TT>
925
 
                        </TD>
926
 
                        <TD>
927
 
                                Treat the input file (or output file if decoding) as a raw file, regardless of the extension.
928
 
                        </TD>
929
 
                </TR>
930
 
        </TABLE>
931
 
        </TD></TR></TABLE>
932
 
        </P>
933
 
        <P>
934
 
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
935
 
        <TABLE WIDTH="100%" BORDER="1" BGCOLOR="#EEEED4">
936
 
                <TR>
937
 
                        <TD COLSPAN="2" BGCOLOR="#D3D4C5">
938
 
                                <A NAME="negative_options"><FONT SIZE="+1"><B>Negative Options</B></FONT></A>
939
 
                        </TD>
940
 
                </TR>
941
 
                <TR>
942
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
943
 
                                <TT>--no-adaptive-mid-side</TT><BR>
944
 
                                <TT>--no-decode-through-errors</TT><BR>
945
 
                                <TT>--no-delete-input-file</TT><BR>
946
 
                                <TT>--no-escape-coding</TT><BR>
947
 
                                <TT>--no-exhaustive-model-search</TT><BR>
948
 
                                <TT>--no-lax</TT><BR>
949
 
                                <TT>--no-mid-side</TT><BR>
950
 
                                <TT>--no-ogg</TT><BR>
951
 
                                <TT>--no-padding</TT><BR>
952
 
                                <TT>--no-qlp-coeff-precision-search</TT><BR>
953
 
                                <TT>--no-residual-gnuplot</TT><BR>
954
 
                                <TT>--no-residual-text</TT><BR>
955
 
                                <TT>--no-sector-align</TT><BR>
956
 
                                <TT>--no-seektable</TT><BR>
957
 
                                <TT>--no-silent</TT><BR>
958
 
                                <TT>--no-verify</TT>
959
 
                        </TD>
960
 
                        <TD>
961
 
                                can all be used to turn off a particular option.
962
 
                        </TD>
963
 
                </TR>
964
 
        </TABLE>
965
 
        </TD></TR></TABLE>
966
 
        </P>
967
 
        </FONT>
968
 
        </TD></TR>
969
 
        </TABLE>
970
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
971
 
</TD></TR>
972
 
</TABLE>
973
 
 
974
 
 
975
 
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="5" BORDER="0">
976
 
<TR><TD>
977
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
978
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#D3D4C5">
979
 
                <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
980
 
                <A NAME="metaflac"><B><FONT SIZE="+2">metaflac</FONT></B>
981
 
                </FONT></TD></TR>
982
 
        </TABLE>
983
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
984
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#EEEED4">
985
 
        <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
986
 
        <P>
987
 
                <B><TT>metaflac</TT></B> is the command-line <TT>.flac</TT> file metadata editor.  You can use it to list the contents of metadata blocks, edit, delete or insert blocks, and manage padding.
988
 
        </P>
989
 
        <P>
990
 
                <B><TT>metaflac</TT></B> takes a set of "options" (though some are not optional) and a set of FLAC files to operate on.  There are three kinds of "options":
991
 
                <UL>
992
 
                        <LI>
993
 
                                Major operations, which specify a mode of operation like listing blocks, removing blocks, etc.  These will have sub-operations describing exactly what is to be done.
994
 
                        </LI>
995
 
                        <LI>
996
 
                                Shorthand operations, which are convenient synonyms for major operations.  For example, there is a shorthand operation <TT>--show-sample-rate</TT> that shows just the sample rate field from the STREAMINFO metadata block.
997
 
                        </LI>
998
 
                        <LI>
999
 
                                Global options, which affect all the operations.
1000
 
                        </LI>
1001
 
                </UL>
1002
 
        </P>
1003
 
        <P>
1004
 
                All of these are described in the tables below.  At least one shorthand or major operation must be supplied.  You can use multiple shorthand operations to do more than one thing to a file or set of files.  Most of the common things to do to metadata have shorthand operations.  As an example, here is how to show the MD5 signatures for a set of three FLAC files:
1005
 
        </P>
1006
 
        <P>
1007
 
                <TT>metaflac --show-md5sum file1.flac file2.flac file3.flac</TT>
1008
 
        </P>
1009
 
        <P>
1010
 
                Another example; this removes all DESCRIPTION and COMMENT tags in a set of FLAC files, and uses the <TT>--preserve-modtime</TT> global option to keep the FLAC file modification times the same (usually when files are edited the modification time is set to the current time):
1011
 
        </P>
1012
 
        <P>
1013
 
                <TT>metaflac --preserve-modtime --remove-tag=DESCRIPTION --remove-tag=COMMENT file1.flac file2.flac file3.flac</TT>
1014
 
        </P>
1015
 
        <P>
1016
 
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
1017
 
        <TABLE WIDTH="100%" BORDER="1" BGCOLOR="#EEEED4">
1018
 
                <TR>
1019
 
                        <TD COLSPAN="2" BGCOLOR="#D3D4C5">
1020
 
                                <A NAME="global_options"><FONT SIZE="+1"><B>Global Options</B></FONT></A>
1021
 
                        </TD>
1022
 
                </TR>
1023
 
                <TR>
1024
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1025
 
                                <A NAME="metaflac_options_preserve_modtime">
1026
 
                                <TT>--preserve-modtime</TT>
1027
 
                        </TD>
1028
 
                        <TD>
1029
 
                                Preserve the original modification time in spite of edits.
1030
 
                        </TD>
1031
 
                </TR>
1032
 
                <TR>
1033
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1034
 
                                <A NAME="metaflac_options_with_filename">
1035
 
                                <TT>--with-filename</TT>
1036
 
                        </TD>
1037
 
                        <TD>
1038
 
                                Prefix each output line with the FLAC file name (the default if more than one FLAC file is specified).
1039
 
                        </TD>
1040
 
                </TR>
1041
 
                <TR>
1042
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1043
 
                                <A NAME="metaflac_options_no_filename">
1044
 
                                <TT>--no-filename</TT>
1045
 
                        </TD>
1046
 
                        <TD>
1047
 
                                Do not prefix each output line with the FLAC file name (the default if only one FLAC file is specified)
1048
 
                        </TD>
1049
 
                </TR>
1050
 
                <TR>
1051
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1052
 
                                <A NAME="metaflac_options_no_utf8_convert">
1053
 
                                <TT>--no-utf8-convert</TT>
1054
 
                        </TD>
1055
 
                        <TD>
1056
 
                                Do not convert tags from UTF-8 to local charset, or vice versa.  This is useful for scripts.
1057
 
                        </TD>
1058
 
                </TR>
1059
 
                <TR>
1060
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1061
 
                                <A NAME="metaflac_options_dont_use_padding">
1062
 
                                <TT>--dont-use-padding</TT>
1063
 
                        </TD>
1064
 
                        <TD>
1065
 
                                By default <B><TT>metaflac</TT></B> tries to use padding where possible to avoid rewriting the entire file if the metadata size changes.  Use this option to tell metaflac to not take advantage of padding this way.
1066
 
                        </TD>
1067
 
                </TR>
1068
 
        </TABLE>
1069
 
        </TD></TR></TABLE>
1070
 
        </P>
1071
 
        <P>
1072
 
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
1073
 
        <TABLE WIDTH="100%" BORDER="1" BGCOLOR="#EEEED4">
1074
 
                <TR>
1075
 
                        <TD COLSPAN="2" BGCOLOR="#D3D4C5">
1076
 
                                <A NAME="shorthand_operations"><FONT SIZE="+1"><B>Shorthand Operations</B></FONT></A>
1077
 
                        </TD>
1078
 
                </TR>
1079
 
                <TR>
1080
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1081
 
                                <A NAME="metaflac_shorthand_show_md5sum">
1082
 
                                <TT>--show-md5sum</TT>
1083
 
                        </TD>
1084
 
                        <TD>
1085
 
                                Show the MD5 signature from the STREAMINFO block.
1086
 
                        </TD>
1087
 
                </TR>
1088
 
                <TR>
1089
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1090
 
                                <A NAME="metaflac_shorthand_show_min_blocksize">
1091
 
                                <TT>--show-min-blocksize</TT>
1092
 
                        </TD>
1093
 
                        <TD>
1094
 
                                Show the minimum block size from the STREAMINFO block.
1095
 
                        </TD>
1096
 
                </TR>
1097
 
                <TR>
1098
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1099
 
                                <A NAME="metaflac_shorthand_show_max_blocksize">
1100
 
                                <TT>--show-max-blocksize</TT>
1101
 
                        </TD>
1102
 
                        <TD>
1103
 
                                Show the maximum block size from the STREAMINFO block.
1104
 
                        </TD>
1105
 
                </TR>
1106
 
                <TR>
1107
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1108
 
                                <A NAME="metaflac_shorthand_show_min_framesize">
1109
 
                                <TT>--show-min-framesize</TT>
1110
 
                        </TD>
1111
 
                        <TD>
1112
 
                                Show the minimum frame size from the STREAMINFO block.
1113
 
                        </TD>
1114
 
                </TR>
1115
 
                <TR>
1116
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1117
 
                                <A NAME="metaflac_shorthand_show_max_framesize">
1118
 
                                <TT>--show-max-framesize</TT>
1119
 
                        </TD>
1120
 
                        <TD>
1121
 
                                Show the maximum frame size from the STREAMINFO block.
1122
 
                        </TD>
1123
 
                </TR>
1124
 
                <TR>
1125
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1126
 
                                <A NAME="metaflac_shorthand_show_sample_rate">
1127
 
                                <TT>--show-sample-rate</TT>
1128
 
                        </TD>
1129
 
                        <TD>
1130
 
                                Show the sample rate from the STREAMINFO block.
1131
 
                        </TD>
1132
 
                </TR>
1133
 
                <TR>
1134
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1135
 
                                <A NAME="metaflac_shorthand_show_channels">
1136
 
                                <TT>--show-channels</TT>
1137
 
                        </TD>
1138
 
                        <TD>
1139
 
                                Show the number of channels from the STREAMINFO block.
1140
 
                        </TD>
1141
 
                </TR>
1142
 
                <TR>
1143
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1144
 
                                <A NAME="metaflac_shorthand_show_bps">
1145
 
                                <TT>--show-bps</TT>
1146
 
                        </TD>
1147
 
                        <TD>
1148
 
                                Show the # of bits per sample from the STREAMINFO block.
1149
 
                        </TD>
1150
 
                </TR>
1151
 
                <TR>
1152
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1153
 
                                <A NAME="metaflac_shorthand_show_total_samples">
1154
 
                                <TT>--show-total-samples</TT>
1155
 
                        </TD>
1156
 
                        <TD>
1157
 
                                Show the total # of samples from the STREAMINFO block.
1158
 
                        </TD>
1159
 
                </TR>
1160
 
                <TR>
1161
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1162
 
                                <A NAME="metaflac_shorthand_show_vendor_tag">
1163
 
                                <TT>--show-vendor-tag</TT>
1164
 
                        </TD>
1165
 
                        <TD>
1166
 
                                Show the vendor string from the VORBIS_COMMENT block.
1167
 
                        </TD>
1168
 
                </TR>
1169
 
                <TR>
1170
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1171
 
                                <A NAME="metaflac_shorthand_show_tag">
1172
 
                                <TT>--show-tag=NAME</TT>
1173
 
                        </TD>
1174
 
                        <TD>
1175
 
                                Show all tags where the the field name matches <TT>NAME</TT>.
1176
 
                        </TD>
1177
 
                </TR>
1178
 
                <TR>
1179
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1180
 
                                <A NAME="metaflac_shorthand_remove_tag">
1181
 
                                <TT>--remove-tag=NAME</TT>
1182
 
                        </TD>
1183
 
                        <TD>
1184
 
                                Remove all tags whose field name is <TT>NAME</TT>.
1185
 
                        </TD>
1186
 
                </TR>
1187
 
                <TR>
1188
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1189
 
                                <A NAME="metaflac_shorthand_remove_first_tag">
1190
 
                                <TT>--remove-first-tag=NAME</TT>
1191
 
                        </TD>
1192
 
                        <TD>
1193
 
                                Remove first tag whose field name is <TT>NAME</TT>.
1194
 
                        </TD>
1195
 
                </TR>
1196
 
                <TR>
1197
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1198
 
                                <A NAME="metaflac_shorthand_remove_all_tags">
1199
 
                                <TT>--remove-all-tags</TT>
1200
 
                        </TD>
1201
 
                        <TD>
1202
 
                                Remove all tags, leaving only the vendor string.
1203
 
                        </TD>
1204
 
                </TR>
1205
 
                <TR>
1206
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1207
 
                                <A NAME="metaflac_shorthand_set_tag">
1208
 
                                <TT>--set-tag=FIELD</TT>
1209
 
                        </TD>
1210
 
                        <TD>
1211
 
                                Add a tag.  The <TT>FIELD</TT> must comply with the Vorbis comment spec, of the form <TT>NAME=VALUE</TT>.  If there is currently no tag block, one will be created.
1212
 
                        </TD>
1213
 
                </TR>
1214
 
                <TR>
1215
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1216
 
                                <A NAME="metaflac_shorthand_import_tags_from">
1217
 
                                <TT>--import-tags-from=FILE</TT>
1218
 
                        </TD>
1219
 
                        <TD>
1220
 
                                Import tags from a file.  Use '-' for stdin.  Each line should be of the form <TT>NAME=VALUE</TT>.  Multi-line comments are currently not supported.  Specify <TT>--remove-all-tags</TT> and/or <TT>--no-utf8-convert</TT> before <TT>--import-tags-from</TT> if necessary.
1221
 
                        </TD>
1222
 
                </TR>
1223
 
                <TR>
1224
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1225
 
                                <A NAME="metaflac_shorthand_export_tags_to">
1226
 
                                <TT>--export-tags-to=FILE</TT>
1227
 
                        </TD>
1228
 
                        <TD>
1229
 
                                Export tags to a file.  Use '-' for stdin.  Each line will be of the form <TT>NAME=VALUE</TT>.  Specify <TT>--no-utf8-convert</TT> if necessary.
1230
 
                        </TD>
1231
 
                </TR>
1232
 
                <TR>
1233
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1234
 
                                <A NAME="metaflac_shorthand_import_cuesheet_from">
1235
 
                                <TT>--import-cuesheet-from=FILE</TT>
1236
 
                        </TD>
1237
 
                        <TD>
1238
 
                                Import a cuesheet from a file.  Use '-' for stdin.  Only one FLAC file may be specified.  A seekpoint will be added for each index point in the cuesheet to the SEEKTABLE unless <TT>--no-cued-seekpoints</TT> is specified.
1239
 
                        </TD>
1240
 
                </TR>
1241
 
                <TR>
1242
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1243
 
                                <A NAME="metaflac_shorthand_export_cuesheet_to">
1244
 
                                <TT>--export-cuesheet-to=FILE</TT>
1245
 
                        </TD>
1246
 
                        <TD>
1247
 
                                Export CUESHEET block to a cuesheet file, suitable for use by CD authoring software.  Use '-' for stdout.  Only one FLAC file may be specified on the command line.
1248
 
                        </TD>
1249
 
                </TR>
1250
 
                <TR>
1251
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1252
 
                                <A NAME="metaflac_shorthand_add_replay_gain">
1253
 
                                <TT>--add-replay-gain</TT>
1254
 
                        </TD>
1255
 
                        <TD>
1256
 
                                Calculates the title and album gains/peaks of the given FLAC files as if all the files were part of one album, then stores them in the VORBIS_COMMENT block.  The tags are the same as those used by <TT>vorbisgain</TT>.  Existing ReplayGain tags will be replaced.  If only one FLAC file is given, the album and title gains will be the same.  Since this operation requires two passes, it is always executed last, after all other operations have been completed and written to disk.  All FLAC files specified must have the same resolution, sample rate, and number of channels.  The sample rate must be one of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.
1257
 
                        </TD>
1258
 
                </TR>
1259
 
                <TR>
1260
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1261
 
                                <A NAME="metaflac_shorthand_add_seekpoint">
1262
 
                                <TT>--add-seekpoint={#|X|#x|#s}</TT>
1263
 
                        </TD>
1264
 
                        <TD>
1265
 
                                Add seek points to a SEEKTABLE block:<BR>
1266
 
                                <UL>
1267
 
                                <LI>
1268
 
                                        <TT>#&nbsp;</TT> : a specific sample number for a seek point
1269
 
                                </LI>
1270
 
                                <LI>
1271
 
                                        <TT>X&nbsp;</TT> : a placeholder point (always goes at the end of the SEEKTABLE)
1272
 
                                </LI>
1273
 
                                <LI>
1274
 
                                        <TT>#x</TT> : # evenly spaced seekpoints, the first being at sample 0
1275
 
                                </LI>
1276
 
                                <LI>
1277
 
                                        <TT>#s</TT> : a seekpoint every # seconds; # does not have to be a whole number, it can be, for example, <TT>9.5</TT>, meaning a seekpoint every 9.5 seconds
1278
 
                                </LI>
1279
 
                                </UL>
1280
 
                                If no SEEKTABLE block exists, one will be created.  If one already exists, points will be added to the existing table, and any duplicates will be turned into placeholder points.<BR>
1281
 
                                You may use many <TT>--add-seekpoint</TT> options; the resulting SEEKTABLE will be the unique-ified union of all such values.  Example: <TT>--add-seekpoint=100x --add-seekpoint=3.5s</TT> will add 100 evenly spaced seekpoints and a seekpoint every 3.5 seconds.<BR>
1282
 
                        </TD>
1283
 
                </TR>
1284
 
                <TR>
1285
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1286
 
                                <A NAME="metaflac_shorthand_add_padding">
1287
 
                                <TT>--add-padding=#</TT>
1288
 
                        </TD>
1289
 
                        <TD>
1290
 
                                Add a padding block of the given length (in bytes).  The overall length of the new block will be 4 + length; the extra 4 bytes is for the metadata block header.
1291
 
                        </TD>
1292
 
                </TR>
1293
 
        </TABLE>
1294
 
        </TD></TR></TABLE>
1295
 
        </P>
1296
 
        <P>
1297
 
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
1298
 
        <TABLE WIDTH="100%" BORDER="1" BGCOLOR="#EEEED4">
1299
 
                <TR>
1300
 
                        <TD COLSPAN="2" BGCOLOR="#D3D4C5">
1301
 
                                <A NAME="major_operations"><FONT SIZE="+1"><B>Major Operations</B></FONT></A>
1302
 
                        </TD>
1303
 
                </TR>
1304
 
                <TR>
1305
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1306
 
                                <A NAME="metaflac_operations_version">
1307
 
                                <TT>--version</TT>
1308
 
                        </TD>
1309
 
                        <TD>
1310
 
                                Show the metaflac version number.
1311
 
                        </TD>
1312
 
                </TR>
1313
 
                <TR>
1314
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1315
 
                                <A NAME="metaflac_operations_list">
1316
 
                                <TT>--list</TT>
1317
 
                        </TD>
1318
 
                        <TD>
1319
 
                                List the contents of one or more metadata blocks to stdout.  By default, all metadata blocks are listed in text format.  Use the following options to change this behavior:<P>
1320
 
 
1321
 
                                <TT>--block-number=#[,#[...]]</TT><BR>
1322
 
                                An optional comma-separated list of block numbers to display.  The first block, the STREAMINFO block, is block 0.<P>
1323
 
 
1324
 
                                <TT>--block-type=type[,type[...]]</TT><BR>
1325
 
                                <TT>--except-block-type=type[,type[...]]</TT><BR>
1326
 
                                An optional comma-separated list of block types to be included or ignored with this option.  Use only one of <TT>--block-type</TT> or <TT>--except-block-type</TT>.  The valid block types are: STREAMINFO, PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT.  You may narrow down the types of APPLICATION blocks displayed as follows:<BR>
1327
 
                                <TABLE BORDER="1">
1328
 
                                        <TR>
1329
 
                                                <TD><TT>APPLICATION:abcd</TT></TD>
1330
 
                                                <TD>The APPLICATION block(s) whose textual representation of the 4-byte ID is "abcd"
1331
 
                                        <TR>
1332
 
                                                <TD><TT>APPLICATION:0xXXXXXXXX</TT></TD>
1333
 
                                                <TD>The APPLICATION block(s) whose hexadecimal big- endian representation of the 4-byte ID is "0xXXXXXXXX".  For the example "abcd" above the hexadecimal equivalalent is 0x61626364
1334
 
                                </TABLE>
1335
 
                                <P>
1336
 
 
1337
 
                                NOTE: if both <TT>--block-number</TT> and <TT>--[except-]block-type</TT> are specified, the result is the logical AND of both arguments.<P>
1338
 
 
1339
 
                                <TT>--application-data-format=hexdump|text</TT><BR>
1340
 
                                If the application block you are displaying contains binary data but your <TT>--data-format=text</TT>, you can display a hex dump of the application data contents instead using <TT>--application-data-format=hexdump</TT>.
1341
 
                        </TD>
1342
 
                </TR>
1343
 
                <TR>
1344
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1345
 
                                <A NAME="metaflac_operations_remove">
1346
 
                                <TT>--remove</TT>
1347
 
                        </TD>
1348
 
                        <TD>
1349
 
                                Remove one or more metadata blocks from the metadata.  Unless <TT>--dont-use-padding</TT> is specified, the blocks will be replaced with padding.  You may not remove the STREAMINFO block.<P>
1350
 
 
1351
 
                                <TT>--block-number=#[,#[...]]</TT><BR>
1352
 
                                <TT>--block-type=type[,type[...]]</TT><BR>
1353
 
                                <TT>--except-block-type=type[,type[...]]</TT><BR>
1354
 
                                See <A HREF="#metaflac_operations_list"><TT>--list</TT></A> above for usage.<P>
1355
 
 
1356
 
                                NOTE: if both <TT>--block-number</TT> and <TT>--[except-]block-type</TT> are specified, the result is the logical AND of both arguments.
1357
 
                        </TD>
1358
 
                </TR>
1359
 
                <TR>
1360
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1361
 
                                <A NAME="metaflac_operations_remove_all">
1362
 
                                <TT>--remove-all</TT>
1363
 
                        </TD>
1364
 
                        <TD>
1365
 
                                Remove all metadata blocks (except the STREAMINFO block) from the metadata.  Unless <TT>--dont-use-padding</TT> is specified, the blocks will be replaced with padding.
1366
 
                        </TD>
1367
 
                </TR>
1368
 
                <TR>
1369
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1370
 
                                <A NAME="metaflac_operations_merge_padding">
1371
 
                                <TT>--merge-padding</TT>
1372
 
                        </TD>
1373
 
                        <TD>
1374
 
                                Merge adjacent PADDING blocks into single blocks.
1375
 
                        </TD>
1376
 
                </TR>
1377
 
                <TR>
1378
 
                        <TD NOWRAP ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
1379
 
                                <A NAME="metaflac_operations_sort_padding">
1380
 
                                <TT>--sort-padding</TT>
1381
 
                        </TD>
1382
 
                        <TD>
1383
 
                                Move all PADDING blocks to the end of the metadata and merge them into a single block.
1384
 
                        </TD>
1385
 
                </TR>
1386
 
        </TABLE>
1387
 
        </TD></TR></TABLE>
1388
 
        </P>
1389
 
        </FONT>
1390
 
        </TD></TR>
1391
 
        </TABLE>
1392
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1393
 
</TD></TR>
1394
 
</TABLE>
1395
 
 
1396
 
 
1397
 
<A NAME="plugins"></A>
1398
 
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="5" BORDER="0">
1399
 
<TR><TD>
1400
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1401
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#D3D4C5">
1402
 
                <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
1403
 
                <A NAME="xmms_plugin"><B><FONT SIZE="+2">xmms plugin</FONT></B></A>
1404
 
                </FONT></TD></TR>
1405
 
        </TABLE>
1406
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1407
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#EEEED4">
1408
 
        <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
1409
 
        <P>
1410
 
                All that is necessary is to copy <B><TT>libxmms-flac.so</TT></B> to the directory where XMMS looks for input plugins (usually <B><TT>/usr/lib/xmms/Input</TT></B>).  There is nothing else to configure.  Make sure to restart XMMS before trying to play any <TT>.flac</TT> files.
1411
 
        </P>
1412
 
        </FONT>
1413
 
        </TD></TR>
1414
 
        </TABLE>
1415
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1416
 
</TD></TR>
1417
 
</TABLE>
1418
 
 
1419
 
 
1420
 
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="5" BORDER="0">
1421
 
<TR><TD>
1422
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1423
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#D3D4C5">
1424
 
                <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
1425
 
                <A NAME="winamp2_plugin"><B><FONT SIZE="+2">winamp2 plugin</FONT></B>
1426
 
                </FONT></TD></TR>
1427
 
        </TABLE>
1428
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1429
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#EEEED4">
1430
 
        <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
1431
 
        <P>
1432
 
                The Winamp plugin should work for both Winamp2 and Winamp5.  If you are using Winamp 2.x, all that is necessary is to copy <B><TT>in_flac.dll</TT></B> to the <B><TT>Plugins/</TT></B> directory of your Winamp installation.  There is nothing else to configure.  Make sure to restart Winamp before trying to play any <TT>.flac</TT> files.
1433
 
        </P>
1434
 
        </FONT>
1435
 
        </TD></TR>
1436
 
        </TABLE>
1437
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1438
 
</TD></TR>
1439
 
</TABLE>
1440
 
 
1441
 
 
1442
 
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="5" BORDER="0">
1443
 
<TR><TD>
1444
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1445
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#D3D4C5">
1446
 
                <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
1447
 
                <A NAME="bugs"><B><FONT SIZE="+2">known bugs</FONT></B>
1448
 
                </FONT></TD></TR>
1449
 
        </TABLE>
1450
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1451
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#EEEED4">
1452
 
        <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
1453
 
        <P>
1454
 
                Bug tracking is done on the Sourceforge project page <A HREF="http://sourceforge.net/bugs/?group_id=13478">here</A>.  If you submit a bug, make sure and provide an email contact or use the Monitor feature.
1455
 
        </P>
1456
 
        <P>
1457
 
                The following are major known bugs in the current (1.1.2) release:
1458
 
        </P>
1459
 
        <P>
1460
 
                <UL>
1461
 
                        <LI>
1462
 
                                (none)
1463
 
                        </LI>
1464
 
                </UL>
1465
 
        </P>
1466
 
        <P>
1467
 
                The following are major known bugs in the 1.1.0 release:
1468
 
        </P>
1469
 
        <P>
1470
 
                <UL>
1471
 
                        <LI>
1472
 
                                If you change the FLAC configuration options in the XMMS plugin while a FLAC file is playing, it can cause a crash or other bad things to happen.
1473
 
                        </LI>
1474
 
                </UL>
1475
 
        </P>
1476
 
        <P>
1477
 
                The following are major known bugs in the 1.0.4 release:
1478
 
        </P>
1479
 
        <P>
1480
 
                <UL>
1481
 
                        <LI>
1482
 
                                All decoders prior to and including 1.0.4 have a bug that prevents them from skipping unknown metadata blocks properly.  A FLAC file created by flac 1.1.0 containing a CUESHEET metadata block will not decode in 1.0.x decoders.
1483
 
                        </LI>
1484
 
                        <LI>
1485
 
                                <B><TT>metaflac</TT></B> has a bug where, if --import-vc-from is used on a FLAC file that has no Vorbis comment block, the FLAC file can be corrupted.  All FLAC files generated by 1.0.4 have a Vorbis comment block added automatically but files from 1.0.3 and before do not.  This is fixed in CVS.
1486
 
                        </LI>
1487
 
                        <LI>
1488
 
                                There is an odd bug in <B><TT>metaflac</TT></B> such that you must always use the <TT>--dont-use-padding</TT> option with <TT>--add-padding</TT> or the padding block won't be written.  This is fixed in CVS.
1489
 
                        </LI>
1490
 
                </UL>
1491
 
        </P>
1492
 
        </FONT>
1493
 
        </TD></TR>
1494
 
        </TABLE>
1495
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1496
 
</TD></TR>
1497
 
</TABLE>
1498
 
 
1499
 
 
1500
 
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="5" BORDER="0">
1501
 
<TR><TD>
1502
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1503
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#D3D4C5">
1504
 
                <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
1505
 
                <A NAME="monkey"><B><FONT SIZE="+2">monkey</FONT></B>
1506
 
                </FONT></TD></TR>
1507
 
        </TABLE>
1508
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1509
 
        <TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#EEEED4">
1510
 
        <TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
1511
 
        <P>
1512
 
                Monkey's Audio comes with a nice GUI that many people are familiar with.  It supports some external encoders, but not FLAC.  However, the FLAC Windows distribution comes with a utility that allows you to replace one the of the supported lossless external codecs with FLAC.  Here's how:
1513
 
                <UL>
1514
 
                        <LI>Copy <B><TT>flac.exe</TT></B> and <B><TT>flac_ren.exe</TT></B> to the <B><TT>External/</TT></B> directory of the Monkey's Audio installation.</LI>
1515
 
                        <LI>
1516
 
                                Choose a supported encoder to replace:
1517
 
                                <UL>
1518
 
                                        <LI>Shorten - copy <B><TT>flac_mac.exe</TT></B> on top of <B><TT>External/shortn32.exe</TT></B></LI>
1519
 
                                        <LI>WavPack - copy <B><TT>flac_mac.exe</TT></B> on top of both <B><TT>External/wavpack.exe</TT></B> and <B><TT>External/wvunpack.exe</TT></B></LI>
1520
 
                                        <LI>RKAU - copy <B><TT>flac_mac.exe</TT></B> on top of <B><TT>External/rkau.exe</TT></B></LI>
1521
 
                                </UL>
1522
 
                                If you choose WavPack you will also be able to use the WavPack Configuration menu to add flac options.
1523
 
                        </LI>
1524
 
                        <LI>Now you can encode FLAC files as if you were using the replaced encoder.  The renamed <B><TT>flac_mac.exe</TT></B> utility will call <B><TT>flac.exe</TT></B> and afterwards, <B><TT>flac_ren.exe</TT></B> will rename the resulting file to have the .flac extension.</LI>
1525
 
                </UL>
1526
 
        </P>
1527
 
        <P>
1528
 
                Other front-ends may be wedged in the same way; if you have one in mind, post it to the <A HREF="http://lists.sourceforge.net/lists/listinfo/flac-dev">flac-dev</A> mailing list.
1529
 
        </P>
1530
 
        </FONT>
1531
 
        </TD></TR>
1532
 
        </TABLE>
1533
 
        <TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR BGCOLOR="#000000"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="1" ALT=""></TD></TR></TABLE>
1534
 
</TD></TR>
1535
 
</TABLE>
1536
 
 
1537
 
 
1538
 
</CENTER>
1539
 
 
1540
 
<P>&nbsp;Copyright (c) 2000,2001,2002,2003,2004,2005  Josh Coalson</P>
1541
 
 
1542
 
</BODY>
1543
 
</HTML>
 
8
<html>
 
9
<head>
 
10
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
 
11
        <meta name="author" content="Josh Coalson" />
 
12
        <meta name="description" content="A free, open source codec for lossless audio compression and decompression" />
 
13
        <meta name="keywords" content="free,lossless,audio,codec,encoder,decoder,compression,compressor,archival,archive,archiving,backup,music" />
 
14
        <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
 
15
        <link rel="stylesheet" type="text/css" href="flac.css" />
 
16
        <title>FLAC - documentation</title>
 
17
</head>
 
18
 
 
19
<body>
 
20
 
 
21
<div class="logo">
 
22
        <a href="http://flac.sourceforge.net/"><img src="images/logo130.gif" alt="FLAC Logo" align="middle" border="0" hspace="0" /></a>
 
23
</div>
 
24
 
 
25
<div class="above_nav"></div>
 
26
 
 
27
<div class="navbar">
 
28
        &nbsp;<a href="index.html">home</a>&nbsp;&nbsp;|
 
29
        &nbsp;<a href="faq.html">faq</a>&nbsp;&nbsp;|
 
30
        &nbsp;<a href="news.html">news</a>&nbsp;&nbsp;|
 
31
        &nbsp;<a href="download.html">download</a>&nbsp;&nbsp;|
 
32
        &nbsp;documentation&nbsp;&nbsp;|
 
33
        &nbsp;<a href="comparison.html">comparison</a>&nbsp;&nbsp;|
 
34
        &nbsp;<a href="changelog.html">changelog</a>&nbsp;&nbsp;|
 
35
        &nbsp;<a href="links.html">links</a>&nbsp;&nbsp;|
 
36
        &nbsp;<a href="developers.html">developers</a>&nbsp;
 
37
</div>
 
38
 
 
39
<div class="langbar">
 
40
        &nbsp;english&nbsp;&nbsp;|
 
41
        &nbsp;<a href="ru/documentation.html">russian</a>&nbsp;
 
42
</div>
 
43
 
 
44
<div class="below_nav"></div>
 
45
 
 
46
<div class="box">
 
47
        <div class="box_title">
 
48
                documentation
 
49
        </div>
 
50
        <div class="box_header"></div>
 
51
        <div class="box_body">
 
52
                FLAC is a general purpose audio format supported by many programs.  Most of the documentation here is about the FLAC format itself and the tools we provide, but there is also information on using other programs that support FLAC.
 
53
                <ul>
 
54
                        <li><a href="features.html">Introduction</a> - What is FLAC?</li>
 
55
                        <li><a href="download.html">Getting FLAC</a> - How to download what you need to play or make FLAC files.</li>
 
56
                        <li><a href="documentation_tasks.html">Using FLAC</a> - If you have some FLAC files and want to do something with them, or want to create FLAC files, look here.</li>
 
57
                        <li><a href="faq.html">FAQ</a> - Frequently Asked Questions</li>
 
58
                </ul>
 
59
                In more detail:
 
60
                <ul>
 
61
                        <li><a href="documentation_format_overview.html">About the FLAC Format</a> - An overview of the FLAC format for power users.</li>
 
62
                        <li><a href="documentation_tools.html">Official Tools</a> - How to use the <span class="commandname">flac</span> and <span class="commandname">metaflac</span> command-line tools.</li>
 
63
                        <li><a href="comparison.html">Comparison</a> - A comparison of FLAC with other lossless codecs.</li>
 
64
                        <li><a href="documentation_bugs.html">Bugs</a> - How to report bugs and request features, and a list of known bugs in the FLAC tools.</li>
 
65
                        <li><a href="http://sourceforge.net/tracker/?group_id=13478&amp;atid=213478">Request Support</a> - Support for the official FLAC tools.  For other programs, use <a href="http://www.hydrogenaudio.org/">hydrogenaudio.org</a>
 
66
                        <li><a href="http://lists.xiph.org/mailman/listinfo/flac">FLAC Mailing List</a> - General discussion about FLAC, tools, releases, etc.</li>
 
67
                </ul>
 
68
                For developers who want to add FLAC support to their programs:
 
69
                <ul>
 
70
                        <li><a href="documentation_format_overview.html">About the FLAC Format</a> - An overview of the FLAC format for power users.</li>
 
71
                        <li><a href="format.html">FLAC Format Specification</a> - The formal specification.</li>
 
72
                        <li><a href="ogg_mapping.html">Ogg FLAC Mapping</a> - How FLAC should be embedded in an Ogg container.</li>
 
73
                        <li><a href="api/index.html">libFLAC and libFLAC++ APIs</a> - Complete library documentation.</li>
 
74
                        <li><a href="license.html">License</a> - The license under which the official tools are distributed.</li>
 
75
                        <li>(see also the <a href="developer.html">developer page</a>)</li>
 
76
                </ul>
 
77
                Keep in mind that the online version of the documentation will always apply to the latest release.  For older releases, check the documentation included with the release package.
 
78
        </div>
 
79
        <div class="box_footer"></div>
 
80
</div>
 
81
 
 
82
 
 
83
<div class="copyright">
 
84
        <!-- @@@ oh so hacky -->
 
85
        <table>
 
86
                <tr>
 
87
                        <td align="left">
 
88
                                Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
 
89
                        </td>
 
90
                        <td width="1%" align="right">
 
91
                                <a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=13478&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
 
92
                        </td>
 
93
                        <td width="1%" align="right">
 
94
                                <a href="http://www.eff.org/cafe/"><img src="images/cafebug.gif" alt="CAFE Logo" border="0" /></a><br />
 
95
                        </td>
 
96
                        <td width="1%" align="right">
 
97
                                <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" border="0" hspace="0" /></a>
 
98
                        </td>
 
99
                </tr>
 
100
        </table>
 
101
</div>
 
102
 
 
103
</body>
 
104
</html>