blob: e7b6eb624437e5d06490a5f6cb57e4ec2047c7e5 [file] [log] [blame]
Josh Coalsoneb7a8e42002-12-21 03:27:14 +00001.\" 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>.
Josh Coalson86325ef2006-11-17 16:06:15 +00006.TH "METAFLAC" "1" "17 November 2006" "" ""
Josh Coalsonb0468ee2006-10-10 03:47:36 +00007
Josh Coalsoneb7a8e42002-12-21 03:27:14 +00008.SH NAME
9metaflac \- 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
16Use \fBmetaflac\fR to list, add, remove, or edit
17metadata in one or more FLAC files. You may perform one major operation,
18or many shorthand operations at a time.
19.SH "OPTIONS"
20.TP
21\fB--preserve-modtime\fR
22Preserve the original modification time in spite of edits.
23.TP
24\fB--with-filename\fR
25Prefix each output line with the FLAC file name (the default if
26more than one FLAC file is specified).
27.TP
28\fB--no-filename\fR
29Do not prefix each output line with the FLAC file name (the default
30if only one FLAC file is specified).
31.TP
32\fB--dont-use-padding\fR
33By default metaflac tries to use padding where possible to avoid
34rewriting the entire file if the metadata size changes. Use this
35option to tell metaflac to not take advantage of padding this way.
36.SH "SHORTHAND OPERATIONS"
37.TP
38\fB--show-md5sum\fR
39Show the MD5 signature from the STREAMINFO block.
40.TP
41\fB--show-min-blocksize\fR
42Show the minimum block size from the STREAMINFO block.
43.TP
44\fB--show-max-blocksize\fR
45Show the maximum block size from the STREAMINFO block.
46.TP
47\fB--show-min-framesize\fR
48Show the minimum frame size from the STREAMINFO block.
49.TP
50\fB--show-max-framesize\fR
51Show the maximum frame size from the STREAMINFO block.
52.TP
53\fB--show-sample-rate\fR
54Show the sample rate from the STREAMINFO block.
55.TP
56\fB--show-channels\fR
57Show the number of channels from the STREAMINFO block.
58.TP
59\fB--show-bps\fR
60Show the # of bits per sample from the STREAMINFO block.
61.TP
62\fB--show-total-samples\fR
63Show the total # of samples from the STREAMINFO block.
64.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000065\fB--show-vendor-tag\fR
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000066Show the vendor string from the VORBIS_COMMENT block.
67.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000068\fB--show-tag=name\fR
69Show all tags where the the field name matches 'name'.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000070.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000071\fB--remove-tag=name\fR
72Remove all tags whose field name is 'name'.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000073.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000074\fB--remove-first-tag=name\fR
75Remove first tag whose field name is 'name'.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000076.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000077\fB--remove-all-tags\fR
78Remove all tags, leaving only the vendor string.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000079.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000080\fB--set-tag=field\fR
81Add a tag. The field must comply with the
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000082Vorbis comment spec, of the form "NAME=VALUE". If there is
Josh Coalson41b22d52004-09-15 00:52:48 +000083currently no tag block, one will be created.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000084.TP
Josh Coalsonb0468ee2006-10-10 03:47:36 +000085\fB--set-tag-from-file=field\fR
86Like --set-tag, except the VALUE is a filename whose
87contents will be read verbatim to set the tag value.
88Unless --no-utf8-convert is specified, the contents will be
89converted to UTF-8 from the local charset. This can be used
90to store a cuesheet in a tag (e.g.
91--set-tag-from-file="CUESHEET=image.cue"). Do not try to
92store binary data in tag fields! Use APPLICATION blocks for
93that.
94.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000095\fB--import-tags-from=file\fR
96Import tags from a file. Use '-' for stdin. Each
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000097line should be of the form NAME=VALUE. Multi-line comments
Josh Coalson41b22d52004-09-15 00:52:48 +000098are currently not supported. Specify --remove-all-tags and/or
Josh Coalson86325ef2006-11-17 16:06:15 +000099--no-utf8-convert before --import-tags-from if necessary. If
100FILE is '-' (stdin), only one FLAC file may be specified.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000101.TP
Josh Coalson41b22d52004-09-15 00:52:48 +0000102\fB--export-tags-to=file\fR
103Export tags to a file. Use '-' for stdin. Each
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000104line will be of the form NAME=VALUE. Specify
105--no-utf8-convert if necessary.
106.TP
107\fB--import-cuesheet-from=file\fR
Josh Coalson91ccea92005-02-02 04:35:49 +0000108Import a cuesheet from a file. Use '-' for stdin. Only one
109FLAC file may be specified. A seekpoint will be added for each
110index point in the cuesheet to the SEEKTABLE unless
111--no-cued-seekpoints is specified.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000112.TP
113\fB--export-cuesheet-to=file\fR
114Export CUESHEET block to a cuesheet file, suitable for use by
Josh Coalson91ccea92005-02-02 04:35:49 +0000115CD authoring software. Use '-' for stdout. Only one FLAC file
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000116may be specified on the command line.
117.TP
Josh Coalson86325ef2006-11-17 16:06:15 +0000118\fB--import-picture-from=\fISPECIFICATION\fB\fR
119Import a picture and store it in a PICTURE metadata block. More than one --import-picture-from 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
Josh Coalsonb0468ee2006-10-10 03:47:36 +0000120
121[TYPE]|MIME-TYPE|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE
122
123TYPE is optional; it is a number from one of:
124
1250: Other
126
1271: 32x32 pixels 'file icon' (PNG only)
128
1292: Other file icon
130
1313: Cover (front)
132
1334: Cover (back)
134
1355: Leaflet page
136
1376: Media (e.g. label side of CD)
138
1397: Lead artist/lead performer/soloist
140
1418: Artist/performer
142
1439: Conductor
144
14510: Band/Orchestra
146
14711: Composer
148
14912: Lyricist/text writer
150
15113: Recording Location
152
15314: During recording
154
15515: During performance
156
15716: Movie/video screen capture
158
15917: A bright coloured fish
160
16118: Illustration
162
16319: Band/artist logotype
164
16520: Publisher/Studio logotype
166
167The default is 3 (front cover). There may only be one picture each of type 1 and 2 in a file.
168
169MIME-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.
170
171DESCRIPTION is optional; the default is an empty string.
172
173The 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.
174
175FILE is the path to the picture file to be imported, or the URL if MIME type is -->
176
177For 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.
178
179The 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.
180.TP
Josh Coalson86325ef2006-11-17 16:06:15 +0000181\fB--export-picture-to=file\fR
182Export 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.
183.TP
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000184\fB--add-replay-gain\fR
185Calculates the title and album gains/peaks of the given FLAC
186files as if all the files were part of one album, then stores
187them in the VORBIS_COMMENT block. The tags are the same as
188those used by vorbisgain. Existing ReplayGain tags will be
189replaced. If only one FLAC file is given, the album and title
190gains will be the same. Since this operation requires two
191passes, it is always executed last, after all other operations
192have been completed and written to disk. All FLAC files
193specified must have the same resolution, sample rate, and
194number of channels. The sample rate must be one of 8, 11.025,
19512, 16, 22.05, 24, 32, 44.1, or 48 kHz.
196.TP
Josh Coalsonb0468ee2006-10-10 03:47:36 +0000197\fB--remove-replay-gain\fR
198Removes the ReplayGain tags.
199.TP
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000200\fB--add-seekpoint={\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}\fR
201Add seek points to a SEEKTABLE block. Using #, a seek point at
202that sample number is added. Using X, a placeholder point is
203added at the end of a the table. Using #x, # evenly spaced seek
204points will be added, the first being at sample 0. Using #s, a
205seekpoint will be added every # seconds (# does not have to be a
206whole number; it can be, for example, 9.5, meaning a seekpoint
207every 9.5 seconds). If no SEEKTABLE block exists, one will be
208created. If one already exists, points will be added to the
209existing table, and any duplicates will be turned into placeholder
210points. You may use many --add-seekpoint options; the resulting
211SEEKTABLE will be the unique-ified union of all such values.
212Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100
213evenly spaced seekpoints and a seekpoint every 3.5 seconds.
214.TP
215\fB--add-padding=length\fR
216Add a padding block of the given length (in bytes). The overall
217length of the new block will be 4 + length; the extra 4 bytes is
218for the metadata block header.
219.SH "MAJOR OPERATIONS"
220.TP
221\fB--list\fR
222List the contents of one or more metadata blocks to stdout. By
223default, all metadata blocks are listed in text format. Use the
224following options to change this behavior:
225.RS
226.TP
227\fB--block-number=#[,#[...]]\fR
228An optional comma-separated list of block numbers to display.
229The first block, the STREAMINFO block, is block 0.
230.TP
231\fB--block-type=type[,type[...]]\fR
232.TP
233\fB--except-block-type=type[,type[...]]\fR
Josh Coalson91ccea92005-02-02 04:35:49 +0000234An optional comma-separated list of block types to be included
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000235or ignored with this option. Use only one of --block-type or
236--except-block-type. The valid block types are: STREAMINFO,
237PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT. You may
238narrow down the types of APPLICATION blocks displayed as
239follows:
240
241APPLICATION:abcd The APPLICATION block(s) whose textual repre-
242sentation of the 4-byte ID is "abcd"
243APPLICATION:0xXXXXXXXX The APPLICATION block(s) whose hexadecimal big-
244endian representation of the 4-byte ID is
245"0xXXXXXXXX". For the example "abcd" above the
246hexadecimal equivalalent is 0x61626364
247.sp
248.RS
249.B "Note:"
250if both --block-number and --[except-]block-type are
251specified, the result is the logical AND of both
252arguments.
253.RE
254.TP
255\fB--application-data-format=hexdump|text\fR
256If the application block you are displaying contains binary
257data but your --data-format=text, you can display a hex dump
258of the application data contents instead using
259--application-data-format=hexdump.
260.RE
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.RE
281.TP
282\fB--remove-all\fR
283Remove all metadata blocks (except the STREAMINFO block) from the
284metadata. Unless --dont-use-padding is specified, the blocks will
285be replaced with padding.
286.TP
287\fB--merge-padding\fR
288Merge adjacent PADDING blocks into single blocks.
289.TP
290\fB--sort-padding\fR
291Move all PADDING blocks to the end of the metadata and merge them
292into a single block.
293.SH "SEE ALSO"
294.PP
295flac(1).