e7b6eb624437e5d06490a5f6cb57e4ec2047c7e5
[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" "17 November 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.  If
100 FILE is '-' (stdin), only one FLAC file may be specified.
101 .TP
102 \fB--export-tags-to=file\fR
103 Export tags to a file.  Use '-' for stdin.  Each
104 line will be of the form NAME=VALUE.  Specify
105 --no-utf8-convert if necessary.
106 .TP
107 \fB--import-cuesheet-from=file\fR
108 Import a cuesheet from a file.  Use '-' for stdin.  Only one
109 FLAC file may be specified.  A seekpoint will be added for each
110 index point in the cuesheet to the SEEKTABLE unless
111 --no-cued-seekpoints is specified.
112 .TP
113 \fB--export-cuesheet-to=file\fR
114 Export CUESHEET block to a cuesheet file, suitable for use by
115 CD authoring software.  Use '-' for stdout.  Only one FLAC file
116 may be specified on the command line.
117 .TP
118 \fB--import-picture-from=\fISPECIFICATION\fB\fR
119 Import 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
120
121 [TYPE]|MIME-TYPE|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE
122
123 TYPE is optional; it is a number from one of:
124
125 0: Other
126
127 1: 32x32 pixels 'file icon' (PNG only)
128
129 2: Other file icon
130
131 3: Cover (front)
132
133 4: Cover (back)
134
135 5: Leaflet page
136
137 6: Media (e.g. label side of CD)
138
139 7: Lead artist/lead performer/soloist
140
141 8: Artist/performer
142
143 9: Conductor
144
145 10: Band/Orchestra
146
147 11: Composer
148
149 12: Lyricist/text writer
150
151 13: Recording Location
152
153 14: During recording
154
155 15: During performance
156
157 16: Movie/video screen capture
158
159 17: A bright coloured fish
160
161 18: Illustration
162
163 19: Band/artist logotype
164
165 20: Publisher/Studio logotype
166
167 The default is 3 (front cover).  There may only be one picture each of type 1 and 2 in a file.
168
169 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.
170
171 DESCRIPTION is optional; the default is an empty string.
172
173 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.
174
175 FILE is the path to the picture file to be imported, or the URL if MIME type is -->
176
177 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.
178
179 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.
180 .TP
181 \fB--export-picture-to=file\fR
182 Export 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
184 \fB--add-replay-gain\fR
185 Calculates the title and album gains/peaks of the given FLAC
186 files as if all the files were part of one album, then stores
187 them in the VORBIS_COMMENT block.  The tags are the same as
188 those used by vorbisgain.  Existing ReplayGain tags will be
189 replaced.  If only one FLAC file is given, the album and title
190 gains will be the same.  Since this operation requires two
191 passes, it is always executed last, after all other operations
192 have been completed and written to disk.  All FLAC files
193 specified must have the same resolution, sample rate, and
194 number of channels.  The sample rate must be one of 8, 11.025,
195 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.
196 .TP
197 \fB--remove-replay-gain\fR
198 Removes the ReplayGain tags.
199 .TP
200 \fB--add-seekpoint={\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}\fR
201 Add seek points to a SEEKTABLE block.  Using #, a seek point at
202 that sample number is added.  Using X, a placeholder point is
203 added at the end of a the table.  Using #x, # evenly spaced seek
204 points will be added, the first being at sample 0.  Using #s, a
205 seekpoint will be added every # seconds (# does not have to be a
206 whole number; it can be, for example, 9.5, meaning a seekpoint
207 every 9.5 seconds).  If no SEEKTABLE block exists, one will be
208 created.  If one already exists, points will be added to the
209 existing table, and any duplicates will be turned into placeholder
210 points.  You may use many --add-seekpoint options; the resulting
211 SEEKTABLE will be the unique-ified union of all such values.
212 Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100
213 evenly spaced seekpoints and a seekpoint every 3.5 seconds.
214 .TP
215 \fB--add-padding=length\fR
216 Add a padding block of the given length (in bytes).  The overall
217 length of the new block will be 4 + length; the extra 4 bytes is
218 for the metadata block header.
219 .SH "MAJOR OPERATIONS"
220 .TP
221 \fB--list\fR
222 List the contents of one or more metadata blocks to stdout.  By
223 default, all metadata blocks are listed in text format.  Use the
224 following options to change this behavior:
225 .RS
226 .TP
227 \fB--block-number=#[,#[...]]\fR
228 An optional comma-separated list of block numbers to display.
229 The 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
234 An optional comma-separated list of block types to be included
235 or ignored with this option.  Use only one of --block-type or
236 --except-block-type.  The valid block types are: STREAMINFO,
237 PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT.  You may
238 narrow down the types of APPLICATION blocks displayed as
239 follows:
240
241 APPLICATION:abcd        The APPLICATION block(s) whose textual repre-
242 sentation of the 4-byte ID is "abcd"
243 APPLICATION:0xXXXXXXXX  The APPLICATION block(s) whose hexadecimal big-
244 endian representation of the 4-byte ID is
245 "0xXXXXXXXX".  For the example "abcd" above the
246 hexadecimal equivalalent is 0x61626364
247 .sp
248 .RS
249 .B "Note:"
250 if both --block-number and --[except-]block-type are
251 specified, the result is the logical AND of both
252 arguments.
253 .RE
254 .TP
255 \fB--application-data-format=hexdump|text\fR
256 If the application block you are displaying contains binary
257 data but your --data-format=text, you can display a hex dump
258 of the application data contents instead using
259 --application-data-format=hexdump.
260 .RE
261 .TP
262 \fB--remove\fR
263 Remove one or more metadata blocks from the metadata.  Unless
264 --dont-use-padding is specified, the blocks will be replaced with
265 padding.  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
273 See --list above for usage.
274 .sp
275 .RS
276 .B "Note:"
277 if both --block-number and --[except-]block-type are
278 specified, the result is the logical AND of both arguments.
279 .RE
280 .RE
281 .TP
282 \fB--remove-all\fR
283 Remove all metadata blocks (except the STREAMINFO block) from the
284 metadata.  Unless --dont-use-padding is specified, the blocks will
285 be replaced with padding.
286 .TP
287 \fB--merge-padding\fR
288 Merge adjacent PADDING blocks into single blocks.
289 .TP
290 \fB--sort-padding\fR
291 Move all PADDING blocks to the end of the metadata and merge them
292 into a single block.
293 .SH "SEE ALSO"
294 .PP
295 flac(1).