update to match sgml
[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" "09 October 2006" "" ""
7
8 .SH NAME
9 metaflac \- program to list, add, remove, or edit metadata in one or more FLAC files.
10 .SH SYNOPSIS
11
12 \fBmetaflac\fR [ \fB\fIoptions\fB\fR ] [ \fB\fIoperations\fB\fR ] \fB\fIFLACfile\fB\fR\fI ...\fR
13
14 .SH "DESCRIPTION"
15 .PP
16 Use \fBmetaflac\fR to list, add, remove, or edit
17 metadata in one or more FLAC files.  You may perform one major operation,
18 or many shorthand operations at a time.
19 .SH "OPTIONS"
20 .TP
21 \fB--preserve-modtime\fR
22 Preserve the original modification time in spite of edits.
23 .TP
24 \fB--with-filename\fR
25 Prefix each output line with the FLAC file name (the default if
26 more than one FLAC file is specified).
27 .TP
28 \fB--no-filename\fR
29 Do not prefix each output line with the FLAC file name (the default
30 if only one FLAC file is specified).
31 .TP
32 \fB--dont-use-padding\fR
33 By default metaflac tries to use padding where possible to avoid
34 rewriting the entire file if the metadata size changes.  Use this
35 option to tell metaflac to not take advantage of padding this way.
36 .SH "SHORTHAND OPERATIONS"
37 .TP
38 \fB--show-md5sum\fR
39 Show the MD5 signature from the STREAMINFO block.
40 .TP
41 \fB--show-min-blocksize\fR
42 Show the minimum block size from the STREAMINFO block.
43 .TP
44 \fB--show-max-blocksize\fR
45 Show the maximum block size from the STREAMINFO block.
46 .TP
47 \fB--show-min-framesize\fR
48 Show the minimum frame size from the STREAMINFO block.
49 .TP
50 \fB--show-max-framesize\fR
51 Show the maximum frame size from the STREAMINFO block.
52 .TP
53 \fB--show-sample-rate\fR
54 Show the sample rate from the STREAMINFO block.
55 .TP
56 \fB--show-channels\fR
57 Show the number of channels from the STREAMINFO block.
58 .TP
59 \fB--show-bps\fR
60 Show the # of bits per sample from the STREAMINFO block.
61 .TP
62 \fB--show-total-samples\fR
63 Show the total # of samples from the STREAMINFO block.
64 .TP
65 \fB--show-vendor-tag\fR
66 Show the vendor string from the VORBIS_COMMENT block.
67 .TP
68 \fB--show-tag=name\fR
69 Show all tags where the the field name matches 'name'.
70 .TP
71 \fB--remove-tag=name\fR
72 Remove all tags whose field name is 'name'.
73 .TP
74 \fB--remove-first-tag=name\fR
75 Remove first tag whose field name is 'name'.
76 .TP
77 \fB--remove-all-tags\fR
78 Remove all tags, leaving only the vendor string.
79 .TP
80 \fB--set-tag=field\fR
81 Add a tag.  The field must comply with the
82 Vorbis comment spec, of the form "NAME=VALUE".  If there is
83 currently no tag block, one will be created.
84 .TP
85 \fB--set-tag-from-file=field\fR
86 Like --set-tag, except the VALUE is a filename whose
87 contents will be read verbatim to set the tag value.
88 Unless --no-utf8-convert is specified, the contents will be
89 converted to UTF-8 from the local charset.  This can be used
90 to store a cuesheet in a tag (e.g.
91 --set-tag-from-file="CUESHEET=image.cue").  Do not try to
92 store binary data in tag fields!  Use APPLICATION blocks for
93 that.
94 .TP
95 \fB--import-tags-from=file\fR
96 Import tags from a file.  Use '-' for stdin.  Each
97 line should be of the form NAME=VALUE.  Multi-line comments
98 are currently not supported.  Specify --remove-all-tags and/or
99 --no-utf8-convert before --import-tags-from if necessary.
100 .TP
101 \fB--export-tags-to=file\fR
102 Export tags to a file.  Use '-' for stdin.  Each
103 line will be of the form NAME=VALUE.  Specify
104 --no-utf8-convert if necessary.
105 .TP
106 \fB--import-cuesheet-from=file\fR
107 Import a cuesheet from a file.  Use '-' for stdin.  Only one
108 FLAC file may be specified.  A seekpoint will be added for each
109 index point in the cuesheet to the SEEKTABLE unless
110 --no-cued-seekpoints is specified.
111 .TP
112 \fB--export-cuesheet-to=file\fR
113 Export CUESHEET block to a cuesheet file, suitable for use by
114 CD authoring software.  Use '-' for stdout.  Only one FLAC file
115 may be specified on the command line.
116 .TP
117 \fB--import-picture=\fISPECIFICATION\fB\fR
118 Import a picture and store it in a PICTURE metadata block.  More than one --import-picture command can be specified.  The SPECIFICATION is a string whose parts are separated by | (pipe) characters.  Some parts may be left empty to invoke default values.  The format of SPECIFICATION is
119
120 [TYPE]|MIME-TYPE|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE
121
122 TYPE is optional; it is a number from one of:
123
124 0: Other
125
126 1: 32x32 pixels 'file icon' (PNG only)
127
128 2: Other file icon
129
130 3: Cover (front)
131
132 4: Cover (back)
133
134 5: Leaflet page
135
136 6: Media (e.g. label side of CD)
137
138 7: Lead artist/lead performer/soloist
139
140 8: Artist/performer
141
142 9: Conductor
143
144 10: Band/Orchestra
145
146 11: Composer
147
148 12: Lyricist/text writer
149
150 13: Recording Location
151
152 14: During recording
153
154 15: During performance
155
156 16: Movie/video screen capture
157
158 17: A bright coloured fish
159
160 18: Illustration
161
162 19: Band/artist logotype
163
164 20: Publisher/Studio logotype
165
166 The default is 3 (front cover).  There may only be one picture each of type 1 and 2 in a file.
167
168 MIME-TYPE is mandatory; for best compatibility with players, use pictures with MIME type image/jpeg or image/png.  The MIME type can also be --> to mean that FILE is actually a URL to an image, though this use is discouraged.
169
170 DESCRIPTION is optional; the default is an empty string.
171
172 The next part specfies the resolution and color information.  If the MIME-TYPE is image/jpeg, image/png, or image/gif, you can usually leave this empty and they can be detected from the file.  Otherwise, you must specify the width in pixels, height in pixels, and color depth in bits-per-pixel.  If the image has indexed colors you should also specify the number of colors used.  When manually specified, it is not checked against the file for accuracy.
173
174 FILE is the path to the picture file to be imported, or the URL if MIME type is -->
175
176 For example, "|image/jpeg|||../cover.jpg" will embed the JPEG file at ../cover.jpg, defaulting to type 3 (front cover) and an empty description.  The resolution and color info will be retrieved from the file itself.
177
178 The specification "4|-->|CD|320x300x24/173|http://blah.blah/backcover.tiff" will embed the given URL, with type 4 (back cover), description "CD", and a manually specified resolution of 320x300, 24 bits-per-pixel, and 173 colors.  The file at the URL will not be fetched; the URL itself is stored in the PICTURE metadata block.
179 .TP
180 \fB--add-replay-gain\fR
181 Calculates the title and album gains/peaks of the given FLAC
182 files as if all the files were part of one album, then stores
183 them in the VORBIS_COMMENT block.  The tags are the same as
184 those used by vorbisgain.  Existing ReplayGain tags will be
185 replaced.  If only one FLAC file is given, the album and title
186 gains will be the same.  Since this operation requires two
187 passes, it is always executed last, after all other operations
188 have been completed and written to disk.  All FLAC files
189 specified must have the same resolution, sample rate, and
190 number of channels.  The sample rate must be one of 8, 11.025,
191 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.
192 .TP
193 \fB--remove-replay-gain\fR
194 Removes the ReplayGain tags.
195 .TP
196 \fB--add-seekpoint={\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}\fR
197 Add seek points to a SEEKTABLE block.  Using #, a seek point at
198 that sample number is added.  Using X, a placeholder point is
199 added at the end of a the table.  Using #x, # evenly spaced seek
200 points will be added, the first being at sample 0.  Using #s, a
201 seekpoint will be added every # seconds (# does not have to be a
202 whole number; it can be, for example, 9.5, meaning a seekpoint
203 every 9.5 seconds).  If no SEEKTABLE block exists, one will be
204 created.  If one already exists, points will be added to the
205 existing table, and any duplicates will be turned into placeholder
206 points.  You may use many --add-seekpoint options; the resulting
207 SEEKTABLE will be the unique-ified union of all such values.
208 Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100
209 evenly spaced seekpoints and a seekpoint every 3.5 seconds.
210 .TP
211 \fB--add-padding=length\fR
212 Add a padding block of the given length (in bytes).  The overall
213 length of the new block will be 4 + length; the extra 4 bytes is
214 for the metadata block header.
215 .SH "MAJOR OPERATIONS"
216 .TP
217 \fB--list\fR
218 List the contents of one or more metadata blocks to stdout.  By
219 default, all metadata blocks are listed in text format.  Use the
220 following options to change this behavior:
221 .RS
222 .TP
223 \fB--block-number=#[,#[...]]\fR
224 An optional comma-separated list of block numbers to display.
225 The first block, the STREAMINFO block, is block 0.
226 .TP
227 \fB--block-type=type[,type[...]]\fR
228 .TP
229 \fB--except-block-type=type[,type[...]]\fR
230 An optional comma-separated list of block types to be included
231 or ignored with this option.  Use only one of --block-type or
232 --except-block-type.  The valid block types are: STREAMINFO,
233 PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT.  You may
234 narrow down the types of APPLICATION blocks displayed as
235 follows:
236
237 APPLICATION:abcd        The APPLICATION block(s) whose textual repre-
238 sentation of the 4-byte ID is "abcd"
239 APPLICATION:0xXXXXXXXX  The APPLICATION block(s) whose hexadecimal big-
240 endian representation of the 4-byte ID is
241 "0xXXXXXXXX".  For the example "abcd" above the
242 hexadecimal equivalalent is 0x61626364
243 .sp
244 .RS
245 .B "Note:"
246 if both --block-number and --[except-]block-type are
247 specified, the result is the logical AND of both
248 arguments.
249 .RE
250 .TP
251 \fB--application-data-format=hexdump|text\fR
252 If the application block you are displaying contains binary
253 data but your --data-format=text, you can display a hex dump
254 of the application data contents instead using
255 --application-data-format=hexdump.
256 .RE
257 .TP
258 \fB--remove\fR
259 Remove one or more metadata blocks from the metadata.  Unless
260 --dont-use-padding is specified, the blocks will be replaced with
261 padding.  You may not remove the STREAMINFO block.
262 .RS
263 .TP
264 \fB--block-number=#[,#[...]]\fR
265 .TP
266 \fB--block-type=type[,type[...]]\fR
267 .TP
268 \fB--except-block-type=type[,type[...]]\fR
269 See --list above for usage.
270 .sp
271 .RS
272 .B "Note:"
273 if both --block-number and --[except-]block-type are
274 specified, the result is the logical AND of both arguments.
275 .RE
276 .RE
277 .TP
278 \fB--remove-all\fR
279 Remove all metadata blocks (except the STREAMINFO block) from the
280 metadata.  Unless --dont-use-padding is specified, the blocks will
281 be replaced with padding.
282 .TP
283 \fB--merge-padding\fR
284 Merge adjacent PADDING blocks into single blocks.
285 .TP
286 \fB--sort-padding\fR
287 Move all PADDING blocks to the end of the metadata and merge them
288 into a single block.
289 .SH "SEE ALSO"
290 .PP
291 flac(1).