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