blob: e9e77f74f125f75da6ac1a380340e9cf42571c5f [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>.
Erik de Castro Lopob1982fb2013-05-25 17:11:19 +10006.TH "METAFLAC" "1" "2013/04/30" "" ""
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
Josh Coalsona9502bf2007-01-30 16:58:51 +000032\fB--no-utf8-convert\fR
33Do not convert tags from UTF-8 to local charset, or vice versa. This is
Josh Coalson3038f522007-09-14 15:04:49 +000034useful for scripts, and setting tags in situations where the locale is wrong.
Josh Coalsona9502bf2007-01-30 16:58:51 +000035.TP
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000036\fB--dont-use-padding\fR
37By default metaflac tries to use padding where possible to avoid
38rewriting the entire file if the metadata size changes. Use this
39option to tell metaflac to not take advantage of padding this way.
40.SH "SHORTHAND OPERATIONS"
41.TP
42\fB--show-md5sum\fR
43Show the MD5 signature from the STREAMINFO block.
44.TP
45\fB--show-min-blocksize\fR
46Show the minimum block size from the STREAMINFO block.
47.TP
48\fB--show-max-blocksize\fR
49Show the maximum block size from the STREAMINFO block.
50.TP
51\fB--show-min-framesize\fR
52Show the minimum frame size from the STREAMINFO block.
53.TP
54\fB--show-max-framesize\fR
55Show the maximum frame size from the STREAMINFO block.
56.TP
57\fB--show-sample-rate\fR
58Show the sample rate from the STREAMINFO block.
59.TP
60\fB--show-channels\fR
61Show the number of channels from the STREAMINFO block.
62.TP
63\fB--show-bps\fR
64Show the # of bits per sample from the STREAMINFO block.
65.TP
66\fB--show-total-samples\fR
67Show the total # of samples from the STREAMINFO block.
68.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000069\fB--show-vendor-tag\fR
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000070Show the vendor string from the VORBIS_COMMENT block.
71.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000072\fB--show-tag=name\fR
Zoë Blade7b757e42014-12-01 14:38:11 +000073Show all tags where the field name matches 'name'.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000074.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000075\fB--remove-tag=name\fR
76Remove all tags whose field name is 'name'.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000077.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000078\fB--remove-first-tag=name\fR
79Remove first tag whose field name is 'name'.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000080.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000081\fB--remove-all-tags\fR
82Remove all tags, leaving only the vendor string.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000083.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000084\fB--set-tag=field\fR
85Add a tag. The field must comply with the
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000086Vorbis comment spec, of the form "NAME=VALUE". If there is
Josh Coalson41b22d52004-09-15 00:52:48 +000087currently no tag block, one will be created.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000088.TP
Josh Coalsonb0468ee2006-10-10 03:47:36 +000089\fB--set-tag-from-file=field\fR
90Like --set-tag, except the VALUE is a filename whose
91contents will be read verbatim to set the tag value.
92Unless --no-utf8-convert is specified, the contents will be
93converted to UTF-8 from the local charset. This can be used
94to store a cuesheet in a tag (e.g.
95--set-tag-from-file="CUESHEET=image.cue"). Do not try to
96store binary data in tag fields! Use APPLICATION blocks for
97that.
98.TP
Josh Coalson41b22d52004-09-15 00:52:48 +000099\fB--import-tags-from=file\fR
100Import tags from a file. Use '-' for stdin. Each
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000101line should be of the form NAME=VALUE. Multi-line comments
Josh Coalson41b22d52004-09-15 00:52:48 +0000102are currently not supported. Specify --remove-all-tags and/or
Josh Coalson86325ef2006-11-17 16:06:15 +0000103--no-utf8-convert before --import-tags-from if necessary. If
104FILE is '-' (stdin), only one FLAC file may be specified.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000105.TP
Josh Coalson41b22d52004-09-15 00:52:48 +0000106\fB--export-tags-to=file\fR
Josh Coalsona9502bf2007-01-30 16:58:51 +0000107Export tags to a file. Use '-' for stdout. Each
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000108line will be of the form NAME=VALUE. Specify
109--no-utf8-convert if necessary.
110.TP
111\fB--import-cuesheet-from=file\fR
Josh Coalson91ccea92005-02-02 04:35:49 +0000112Import a cuesheet from a file. Use '-' for stdin. Only one
113FLAC file may be specified. A seekpoint will be added for each
114index point in the cuesheet to the SEEKTABLE unless
115--no-cued-seekpoints is specified.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000116.TP
117\fB--export-cuesheet-to=file\fR
118Export CUESHEET block to a cuesheet file, suitable for use by
Josh Coalson91ccea92005-02-02 04:35:49 +0000119CD authoring software. Use '-' for stdout. Only one FLAC file
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000120may be specified on the command line.
121.TP
Josh Coalson9c17e6e2007-02-14 01:28:01 +0000122\fB--import-picture-from={\fIFILENAME\fB|\fISPECIFICATION\fB}\fR
123Import 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
Josh Coalsonb0468ee2006-10-10 03:47:36 +0000124
Josh Coalson9c17e6e2007-02-14 01:28:01 +0000125[TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE
Josh Coalsonb0468ee2006-10-10 03:47:36 +0000126
127TYPE is optional; it is a number from one of:
128
1290: Other
130
1311: 32x32 pixels 'file icon' (PNG only)
132
1332: Other file icon
134
1353: Cover (front)
136
1374: Cover (back)
138
1395: Leaflet page
140
1416: Media (e.g. label side of CD)
142
1437: Lead artist/lead performer/soloist
144
1458: Artist/performer
146
1479: Conductor
148
14910: Band/Orchestra
150
15111: Composer
152
15312: Lyricist/text writer
154
15513: Recording Location
156
15714: During recording
158
15915: During performance
160
16116: Movie/video screen capture
162
16317: A bright coloured fish
164
16518: Illustration
166
16719: Band/artist logotype
168
16920: Publisher/Studio logotype
170
171The default is 3 (front cover). There may only be one picture each of type 1 and 2 in a file.
172
Josh Coalson9c17e6e2007-02-14 01:28:01 +0000173MIME-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.
Josh Coalsonb0468ee2006-10-10 03:47:36 +0000174
175DESCRIPTION is optional; the default is an empty string.
176
177The 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.
178
179FILE is the path to the picture file to be imported, or the URL if MIME type is -->
180
181For 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.
182
183The 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.
184.TP
Josh Coalson86325ef2006-11-17 16:06:15 +0000185\fB--export-picture-to=file\fR
186Export 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.
187.TP
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000188\fB--add-replay-gain\fR
189Calculates the title and album gains/peaks of the given FLAC
190files as if all the files were part of one album, then stores
Josh Coalson3038f522007-09-14 15:04:49 +0000191them as FLAC tags. The tags are the same as
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000192those used by vorbisgain. Existing ReplayGain tags will be
193replaced. If only one FLAC file is given, the album and title
194gains will be the same. Since this operation requires two
195passes, it is always executed last, after all other operations
196have been completed and written to disk. All FLAC files
197specified must have the same resolution, sample rate, and
198number of channels. The sample rate must be one of 8, 11.025,
Erik de Castro Lopoa2923e62012-09-19 18:06:49 +100019912, 16, 18.9, 22.05, 24, 28, 32, 37.8, 44.1, 48, 56, 64, 88.2,
20096, 112, 128, 144, 176.4, or 192kHz.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000201.TP
Ben Boeckelf7c52c82015-08-12 21:45:04 -0400202\fB--scan-replay-gain\fR
203Like --add-replay-gain, but only analyzes the files rather than
204writing them to the tags.
205.TP
Josh Coalsonb0468ee2006-10-10 03:47:36 +0000206\fB--remove-replay-gain\fR
207Removes the ReplayGain tags.
208.TP
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000209\fB--add-seekpoint={\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}\fR
210Add seek points to a SEEKTABLE block. Using #, a seek point at
211that sample number is added. Using X, a placeholder point is
212added at the end of a the table. Using #x, # evenly spaced seek
213points will be added, the first being at sample 0. Using #s, a
214seekpoint will be added every # seconds (# does not have to be a
215whole number; it can be, for example, 9.5, meaning a seekpoint
216every 9.5 seconds). If no SEEKTABLE block exists, one will be
217created. If one already exists, points will be added to the
218existing table, and any duplicates will be turned into placeholder
219points. You may use many --add-seekpoint options; the resulting
220SEEKTABLE will be the unique-ified union of all such values.
221Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100
222evenly spaced seekpoints and a seekpoint every 3.5 seconds.
223.TP
224\fB--add-padding=length\fR
225Add a padding block of the given length (in bytes). The overall
226length of the new block will be 4 + length; the extra 4 bytes is
227for the metadata block header.
228.SH "MAJOR OPERATIONS"
229.TP
230\fB--list\fR
231List the contents of one or more metadata blocks to stdout. By
232default, all metadata blocks are listed in text format. Use the
233following options to change this behavior:
234.RS
235.TP
236\fB--block-number=#[,#[...]]\fR
237An optional comma-separated list of block numbers to display.
238The first block, the STREAMINFO block, is block 0.
239.TP
240\fB--block-type=type[,type[...]]\fR
241.TP
242\fB--except-block-type=type[,type[...]]\fR
Josh Coalson91ccea92005-02-02 04:35:49 +0000243An optional comma-separated list of block types to be included
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000244or ignored with this option. Use only one of --block-type or
245--except-block-type. The valid block types are: STREAMINFO,
Erik de Castro Lopoa2923e62012-09-19 18:06:49 +1000246PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT, PICTURE. You
247may narrow down the types of APPLICATION blocks displayed as
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000248follows:
249
250APPLICATION:abcd The APPLICATION block(s) whose textual repre-
251sentation of the 4-byte ID is "abcd"
252APPLICATION:0xXXXXXXXX The APPLICATION block(s) whose hexadecimal big-
253endian representation of the 4-byte ID is
254"0xXXXXXXXX". For the example "abcd" above the
255hexadecimal equivalalent is 0x61626364
256.sp
257.RS
258.B "Note:"
259if both --block-number and --[except-]block-type are
260specified, the result is the logical AND of both
261arguments.
262.RE
263.TP
264\fB--application-data-format=hexdump|text\fR
265If the application block you are displaying contains binary
266data but your --data-format=text, you can display a hex dump
267of the application data contents instead using
268--application-data-format=hexdump.
269.RE
270.TP
271\fB--remove\fR
272Remove one or more metadata blocks from the metadata. Unless
273--dont-use-padding is specified, the blocks will be replaced with
274padding. You may not remove the STREAMINFO block.
275.RS
276.TP
277\fB--block-number=#[,#[...]]\fR
278.TP
279\fB--block-type=type[,type[...]]\fR
280.TP
281\fB--except-block-type=type[,type[...]]\fR
282See --list above for usage.
283.sp
284.RS
285.B "Note:"
286if both --block-number and --[except-]block-type are
287specified, the result is the logical AND of both arguments.
288.RE
289.RE
290.TP
291\fB--remove-all\fR
292Remove all metadata blocks (except the STREAMINFO block) from the
293metadata. Unless --dont-use-padding is specified, the blocks will
294be replaced with padding.
295.TP
296\fB--merge-padding\fR
297Merge adjacent PADDING blocks into single blocks.
298.TP
299\fB--sort-padding\fR
300Move all PADDING blocks to the end of the metadata and merge them
301into a single block.
302.SH "SEE ALSO"
303.PP
304flac(1).