9b5e907e19631603f1e0a6845b0cab069f31ea44
[platform/upstream/flac.git] / man / metaflac.1
1 .\" This manpage has been automatically generated by docbook2man 
2 .\" from a DocBook document.  This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
4 .\" Please send any bug reports, improvements, comments, patches, 
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "METAFLAC" "1" "02 January 2003" "" ""
7 .SH NAME
8 metaflac \- program to list, add, remove, or edit metadata in one or more FLAC files.
9 .SH SYNOPSIS
10
11 \fBmetaflac\fR [ \fB\fIoptions\fB\fR ] [ \fB\fIoperations\fB\fR ] \fB\fIFLACfile\fB\fR\fI ...\fR
12
13 .SH "DESCRIPTION"
14 .PP
15 Use \fBmetaflac\fR to list, add, remove, or edit
16 metadata in one or more FLAC files.  You may perform one major operation,
17 or many shorthand operations at a time.
18 .SH "OPTIONS"
19 .TP
20 \fB--preserve-modtime\fR
21 Preserve the original modification time in spite of edits.
22 .TP
23 \fB--with-filename\fR
24 Prefix each output line with the FLAC file name (the default if
25 more than one FLAC file is specified).
26 .TP
27 \fB--no-filename\fR
28 Do not prefix each output line with the FLAC file name (the default
29 if only one FLAC file is specified).
30 .TP
31 \fB--dont-use-padding\fR
32 By default metaflac tries to use padding where possible to avoid
33 rewriting the entire file if the metadata size changes.  Use this
34 option to tell metaflac to not take advantage of padding this way.
35 .SH "SHORTHAND OPERATIONS"
36 .TP
37 \fB--show-md5sum\fR
38 Show the MD5 signature from the STREAMINFO block.
39 .TP
40 \fB--show-min-blocksize\fR
41 Show the minimum block size from the STREAMINFO block.
42 .TP
43 \fB--show-max-blocksize\fR
44 Show the maximum block size from the STREAMINFO block.
45 .TP
46 \fB--show-min-framesize\fR
47 Show the minimum frame size from the STREAMINFO block.
48 .TP
49 \fB--show-max-framesize\fR
50 Show the maximum frame size from the STREAMINFO block.
51 .TP
52 \fB--show-sample-rate\fR
53 Show the sample rate from the STREAMINFO block.
54 .TP
55 \fB--show-channels\fR
56 Show the number of channels from the STREAMINFO block.
57 .TP
58 \fB--show-bps\fR
59 Show the # of bits per sample from the STREAMINFO block.
60 .TP
61 \fB--show-total-samples\fR
62 Show the total # of samples from the STREAMINFO block.
63 .TP
64 \fB--show-vc-vendor\fR
65 Show the vendor string from the VORBIS_COMMENT block.
66 .TP
67 \fB--show-vc-field=name\fR
68 Show all Vorbis comment fields where the the field name matches
69 \&'name'.
70 .TP
71 \fB--remove-vc-field=name\fR
72 Remove all Vorbis comment fields whose field name is 'name'.
73 .TP
74 \fB--remove-vc-firstfield=name\fR
75 Remove first Vorbis comment field whose field name is 'name'.
76 .TP
77 \fB--remove-vc-all\fR
78 Remove all Vorbis comment fields, leaving only the vendor string
79 in the VORBIS_COMMENT block.
80 .TP
81 \fB--set-vc-field=field\fR
82 Add a Vorbis comment field.  The field must comply with the
83 Vorbis comment spec, of the form "NAME=VALUE".  If there is
84 currently no VORBIS_COMMENT block, one will be created.
85 .TP
86 \fB--import-vc-from=file\fR
87 Import Vorbis comments from a file.  Use '-' for stdin.  Each
88 line should be of the form NAME=VALUE.  Multi-line comments
89 are currently not supported.  Specify --remove-vc-all and/or
90 --no-utf8-convert before --import-vc-from if necessary.
91 .TP
92 \fB--export-vc-to=file\fR
93 Export Vorbis comments to a file.  Use '-' for stdin.  Each
94 line will be of the form NAME=VALUE.  Specify
95 --no-utf8-convert if necessary.
96 .TP
97 \fB--import-cuesheet-from=file\fR
98 Import a cuesheet from a file.  Only one FLAC file may be
99 specified.  A seekpoint will be added for each index point in
100 the cuesheet to the SEEKTABLE unless --no-cued-seekpoints is
101 specified.
102 .TP
103 \fB--export-cuesheet-to=file\fR
104 Export CUESHEET block to a cuesheet file, suitable for use by
105 CD authoring software.  Use '-' for stdin.  Only one FLAC file
106 may be specified on the command line.
107 .TP
108 \fB--add-replay-gain\fR
109 Calculates the title and album gains/peaks of the given FLAC
110 files as if all the files were part of one album, then stores
111 them in the VORBIS_COMMENT block.  The tags are the same as
112 those used by vorbisgain.  Existing ReplayGain tags will be
113 replaced.  If only one FLAC file is given, the album and title
114 gains will be the same.  Since this operation requires two
115 passes, it is always executed last, after all other operations
116 have been completed and written to disk.  All FLAC files
117 specified must have the same resolution, sample rate, and
118 number of channels.  The sample rate must be one of 8, 11.025,
119 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.
120 .TP
121 \fB--add-seekpoint={\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}\fR
122 Add seek points to a SEEKTABLE block.  Using #, a seek point at
123 that sample number is added.  Using X, a placeholder point is
124 added at the end of a the table.  Using #x, # evenly spaced seek
125 points will be added, the first being at sample 0.  Using #s, a
126 seekpoint will be added every # seconds (# does not have to be a
127 whole number; it can be, for example, 9.5, meaning a seekpoint
128 every 9.5 seconds).  If no SEEKTABLE block exists, one will be
129 created.  If one already exists, points will be added to the
130 existing table, and any duplicates will be turned into placeholder
131 points.  You may use many --add-seekpoint options; the resulting
132 SEEKTABLE will be the unique-ified union of all such values.
133 Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100
134 evenly spaced seekpoints and a seekpoint every 3.5 seconds.
135 .TP
136 \fB--add-padding=length\fR
137 Add a padding block of the given length (in bytes).  The overall
138 length of the new block will be 4 + length; the extra 4 bytes is
139 for the metadata block header.
140 .SH "MAJOR OPERATIONS"
141 .TP
142 \fB--list\fR
143 List the contents of one or more metadata blocks to stdout.  By
144 default, all metadata blocks are listed in text format.  Use the
145 following options to change this behavior:
146 .RS
147 .TP
148 \fB--block-number=#[,#[...]]\fR
149 An optional comma-separated list of block numbers to display.
150 The first block, the STREAMINFO block, is block 0.
151 .TP
152 \fB--block-type=type[,type[...]]\fR
153 .TP
154 \fB--except-block-type=type[,type[...]]\fR
155 An optional comma-separated list of block types to included
156 or ignored with this option.  Use only one of --block-type or
157 --except-block-type.  The valid block types are: STREAMINFO,
158 PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT.  You may
159 narrow down the types of APPLICATION blocks displayed as
160 follows:
161
162 APPLICATION:abcd        The APPLICATION block(s) whose textual repre-
163 sentation of the 4-byte ID is "abcd"
164 APPLICATION:0xXXXXXXXX  The APPLICATION block(s) whose hexadecimal big-
165 endian representation of the 4-byte ID is
166 "0xXXXXXXXX".  For the example "abcd" above the
167 hexadecimal equivalalent is 0x61626364
168 .sp
169 .RS
170 .B "Note:"
171 if both --block-number and --[except-]block-type are
172 specified, the result is the logical AND of both
173 arguments.
174 .RE
175 .TP
176 \fB--application-data-format=hexdump|text\fR
177 If the application block you are displaying contains binary
178 data but your --data-format=text, you can display a hex dump
179 of the application data contents instead using
180 --application-data-format=hexdump.
181 .RE
182 .TP
183 \fB--remove\fR
184 Remove one or more metadata blocks from the metadata.  Unless
185 --dont-use-padding is specified, the blocks will be replaced with
186 padding.  You may not remove the STREAMINFO block.
187 .RS
188 .TP
189 \fB--block-number=#[,#[...]]\fR
190 .TP
191 \fB--block-type=type[,type[...]]\fR
192 .TP
193 \fB--except-block-type=type[,type[...]]\fR
194 See --list above for usage.
195 .sp
196 .RS
197 .B "Note:"
198 if both --block-number and --[except-]block-type are
199 specified, the result is the logical AND of both arguments.
200 .RE
201 .RE
202 .TP
203 \fB--remove-all\fR
204 Remove all metadata blocks (except the STREAMINFO block) from the
205 metadata.  Unless --dont-use-padding is specified, the blocks will
206 be replaced with padding.
207 .TP
208 \fB--merge-padding\fR
209 Merge adjacent PADDING blocks into single blocks.
210 .TP
211 \fB--sort-padding\fR
212 Move all PADDING blocks to the end of the metadata and merge them
213 into a single block.
214 .SH "SEE ALSO"
215 .PP
216 flac(1).