blob: 480ede7391dc897db29b6c42ec48703398b58659 [file] [log] [blame]
Josh Coalsoneb7a8e42002-12-21 03:27:14 +00001<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2
3<!-- Process this file with docbook-to-man to generate an nroff manual
4 page: `docbook-to-man manpage.sgml > manpage.1'. You may view
5 the manual page with: `docbook-to-man manpage.sgml | nroff -man |
6 less'. A typical entry in a Makefile or Makefile.am is:
7
8manpage.1: manpage.sgml
9 docbook-to-man $< > $@
10 -->
11
12<!-- This is based on an example constructed by Colin Watson
13 <email>cjwatson@debian.org</email>, based on a man page template
14 provided by Tom Christiansen <email>tchrist@jhereg.perl.com</email>
15 and a DocBook man page example by Craig Small
16 <email>csmall@debian.org</email>.
17 -->
18
19 <!-- Fill in the various UPPER CASE things here. -->
20 <!ENTITY manfirstname "<firstname>dann</firstname>">
21 <!ENTITY mansurname "<surname>frazier</surname>">
22 <!-- Please adjust the date whenever revising the manpage. -->
Josh Coalson4ff08692005-02-03 04:18:59 +000023 <!ENTITY mandate "<date>2005-02-02</date>">
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000024 <!-- SECTION should be 1-8, maybe with subsection. Other parameters are
25 allowed: see man(7), man(1). -->
26 <!ENTITY mansection "<manvolnum>1</manvolnum>">
27 <!ENTITY manemail "<email>dannf@debian.org</email>">
28 <!ENTITY manusername "dannf">
29 <!ENTITY manucpackage "<refentrytitle>METAFLAC</refentrytitle>">
30 <!ENTITY manpackage "metaflac">
31]>
32
33<refentry>
34 <refentryinfo>
35 <address>
36 &manemail;
37 </address>
38 <author>
39 &manfirstname;
40 &mansurname;
41 </author>
42 <copyright>
Josh Coalson4ff08692005-02-03 04:18:59 +000043 <year>2002,2003,2004,2005</year>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +000044 <holder>&manusername;</holder>
45 </copyright>
46 &mandate;
47 </refentryinfo>
48 <refmeta>
49 &manucpackage;
50
51 &mansection;
52 </refmeta>
53 <refnamediv>
54 <refname>&manpackage;</refname>
55
56 <refpurpose>
57 program to list, add, remove, or edit metadata in one or more FLAC files.
58 </refpurpose>
59 </refnamediv>
60 <refsynopsisdiv>
61 <cmdsynopsis>
62 <command>&manpackage;</command>
63
64 <group choice="opt"><arg><replaceable>options</replaceable></arg></group>
65 <group choice="opt">
66 <arg><replaceable>operations</replaceable></arg></group>
67 <arg rep="repeat" choice="req"><replaceable>FLACfile</replaceable></arg>
68 </cmdsynopsis>
69 </refsynopsisdiv>
70 <refsect1>
71 <title>DESCRIPTION</title>
72
73 <para>Use <command>&manpackage;</command> to list, add, remove, or edit
74 metadata in one or more FLAC files. You may perform one major operation,
75 or many shorthand operations at a time.</para>
76
77 </refsect1>
78 <refsect1>
79 <title>OPTIONS</title>
80
81 <variablelist>
82 <varlistentry>
83 <term><option>--preserve-modtime</option></term>
84 <listitem>
85 <para>
86 Preserve the original modification time in spite of edits.
87 </para>
88 </listitem>
89 </varlistentry>
90 <varlistentry>
91 <term><option>--with-filename</option></term>
92 <listitem>
93 <para>
94 Prefix each output line with the FLAC file name (the default if
95 more than one FLAC file is specified).
96 </para>
97 </listitem>
98 </varlistentry>
99 <varlistentry>
100 <term><option>--no-filename</option></term>
101 <listitem>
102 <para>
103 Do not prefix each output line with the FLAC file name (the default
104 if only one FLAC file is specified).
105 </para>
106 </listitem>
107 </varlistentry>
108 <varlistentry>
109 <term><option>--dont-use-padding</option></term>
110 <listitem>
111 <para>
112 By default metaflac tries to use padding where possible to avoid
113 rewriting the entire file if the metadata size changes. Use this
114 option to tell metaflac to not take advantage of padding this way.
115 </para>
116 </listitem>
117 </varlistentry>
118 </variablelist>
119 </refsect1>
120 <refsect1>
121 <title>SHORTHAND OPERATIONS</title>
122
123 <variablelist>
124 <varlistentry>
125 <term><option>--show-md5sum</option></term>
126 <listitem>
127 <para>
128 Show the MD5 signature from the STREAMINFO block.
129 </para>
130 </listitem>
131 </varlistentry>
132 <varlistentry>
133 <term><option>--show-min-blocksize</option></term>
134 <listitem>
135 <para>
136 Show the minimum block size from the STREAMINFO block.
137 </para>
138 </listitem>
139 </varlistentry>
140 <varlistentry>
141 <term><option>--show-max-blocksize</option></term>
142 <listitem>
143 <para>
144 Show the maximum block size from the STREAMINFO block.
145 </para>
146 </listitem>
147 </varlistentry>
148 <varlistentry>
149 <term><option>--show-min-framesize</option></term>
150 <listitem>
151 <para>
152 Show the minimum frame size from the STREAMINFO block.
153 </para>
154 </listitem>
155 </varlistentry>
156 <varlistentry>
157 <term><option>--show-max-framesize</option></term>
158 <listitem>
159 <para>
160 Show the maximum frame size from the STREAMINFO block.
161 </para>
162 </listitem>
163 </varlistentry>
164 <varlistentry>
165 <term><option>--show-sample-rate</option></term>
166 <listitem>
167 <para>
168 Show the sample rate from the STREAMINFO block.
169 </para>
170 </listitem>
171 </varlistentry>
172 <varlistentry>
173 <term><option>--show-channels</option></term>
174 <listitem>
175 <para>
176 Show the number of channels from the STREAMINFO block.
177 </para>
178 </listitem>
179 </varlistentry>
180 <varlistentry>
181 <term><option>--show-bps</option></term>
182 <listitem>
183 <para>
184 Show the # of bits per sample from the STREAMINFO block.
185 </para>
186 </listitem>
187 </varlistentry>
188 <varlistentry>
189 <term><option>--show-total-samples</option></term>
190 <listitem>
191 <para>
192 Show the total # of samples from the STREAMINFO block.
193 </para>
194 </listitem>
195 </varlistentry>
196 <varlistentry>
Josh Coalson41b22d52004-09-15 00:52:48 +0000197 <term><option>--show-vendor-tag</option></term>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000198 <listitem>
199 <para>
200 Show the vendor string from the VORBIS_COMMENT block.
201 </para>
202 </listitem>
203 </varlistentry>
204 <varlistentry>
Josh Coalson41b22d52004-09-15 00:52:48 +0000205 <term><option>--show-tag=name</option></term>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000206 <listitem>
207 <para>
Josh Coalson41b22d52004-09-15 00:52:48 +0000208 Show all tags where the the field name matches 'name'.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000209 </para>
210 </listitem>
211 </varlistentry>
212 <varlistentry>
Josh Coalson41b22d52004-09-15 00:52:48 +0000213 <term><option>--remove-tag=name</option></term>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000214 <listitem>
215 <para>
Josh Coalson41b22d52004-09-15 00:52:48 +0000216 Remove all tags whose field name is 'name'.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000217 </para>
218 </listitem>
219 </varlistentry>
220 <varlistentry>
Josh Coalson41b22d52004-09-15 00:52:48 +0000221 <term><option>--remove-first-tag=name</option></term>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000222 <listitem>
223 <para>
Josh Coalson41b22d52004-09-15 00:52:48 +0000224 Remove first tag whose field name is 'name'.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000225 </para>
226 </listitem>
227 </varlistentry>
228 <varlistentry>
Josh Coalson41b22d52004-09-15 00:52:48 +0000229 <term><option>--remove-all-tags</option></term>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000230 <listitem>
231 <para>
Josh Coalson41b22d52004-09-15 00:52:48 +0000232 Remove all tags, leaving only the vendor string.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000233 </para>
234 </listitem>
235 </varlistentry>
236 <varlistentry>
Josh Coalson41b22d52004-09-15 00:52:48 +0000237 <term><option>--set-tag=field</option></term>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000238 <listitem>
239 <para>
Josh Coalson41b22d52004-09-15 00:52:48 +0000240 Add a tag. The field must comply with the
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000241 Vorbis comment spec, of the form "NAME=VALUE". If there is
Josh Coalson41b22d52004-09-15 00:52:48 +0000242 currently no tag block, one will be created.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000243 </para>
244 </listitem>
245 </varlistentry>
246 <varlistentry>
Josh Coalson26c82352006-05-18 07:57:16 +0000247 <term><option>--set-tag-from-file=field</option></term>
248 <listitem>
249 <para>
250 Like --set-tag, except the VALUE is a filename whose
251 contents will be read verbatim to set the tag value.
252 Unless --no-utf8-convert is specified, the contents will be
253 converted to UTF-8 from the local charset. This can be used
254 to store a cuesheet in a tag (e.g.
255 --set-tag-from-file="CUESHEET=image.cue"). Do not try to
256 store binary data in tag fields! Use APPLICATION blocks for
257 that.
258 </para>
259 </listitem>
260 </varlistentry>
261 <varlistentry>
Josh Coalson41b22d52004-09-15 00:52:48 +0000262 <term><option>--import-tags-from=file</option></term>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000263 <listitem>
264 <para>
Josh Coalson41b22d52004-09-15 00:52:48 +0000265 Import tags from a file. Use '-' for stdin. Each
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000266 line should be of the form NAME=VALUE. Multi-line comments
Josh Coalson41b22d52004-09-15 00:52:48 +0000267 are currently not supported. Specify --remove-all-tags and/or
268 --no-utf8-convert before --import-tags-from if necessary.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000269 </para>
270 </listitem>
271 </varlistentry>
272 <varlistentry>
Josh Coalson41b22d52004-09-15 00:52:48 +0000273 <term><option>--export-tags-to=file</option></term>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000274 <listitem>
275 <para>
Josh Coalson41b22d52004-09-15 00:52:48 +0000276 Export tags to a file. Use '-' for stdin. Each
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000277 line will be of the form NAME=VALUE. Specify
278 --no-utf8-convert if necessary.
279 </para>
280 </listitem>
281 </varlistentry>
282 <varlistentry>
283 <term><option>--import-cuesheet-from=file</option></term>
284 <listitem>
285 <para>
Josh Coalson2a9ae6a2004-12-30 03:55:29 +0000286 Import a cuesheet from a file. Use '-' for stdin. Only one
287 FLAC file may be specified. A seekpoint will be added for each
288 index point in the cuesheet to the SEEKTABLE unless
289 --no-cued-seekpoints is specified.
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000290 </para>
291 </listitem>
292 </varlistentry>
293 <varlistentry>
294 <term><option>--export-cuesheet-to=file</option></term>
295 <listitem>
296 <para>
297 Export CUESHEET block to a cuesheet file, suitable for use by
Josh Coalson2a9ae6a2004-12-30 03:55:29 +0000298 CD authoring software. Use '-' for stdout. Only one FLAC file
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000299 may be specified on the command line.
300 </para>
301 </listitem>
302 </varlistentry>
303 <varlistentry>
Josh Coalsonb02574e2006-09-26 00:43:48 +0000304 <term><option>--import-picture</option>=<replaceable>SPECIFICATION</replaceable></term>
305 <listitem>
306 <para>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</para>
307 <para>[TYPE]|MIME-TYPE|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE</para>
308 <para>TYPE is optional; it is a number from one of:</para>
309 <para>0: Other</para>
310 <para>1: 32x32 pixels 'file icon' (PNG only)</para>
311 <para>2: Other file icon</para>
312 <para>3: Cover (front)</para>
313 <para>4: Cover (back)</para>
314 <para>5: Leaflet page</para>
315 <para>6: Media (e.g. label side of CD)</para>
316 <para>7: Lead artist/lead performer/soloist</para>
317 <para>8: Artist/performer</para>
318 <para>9: Conductor</para>
319 <para>10: Band/Orchestra</para>
320 <para>11: Composer</para>
321 <para>12: Lyricist/text writer</para>
322 <para>13: Recording Location</para>
323 <para>14: During recording</para>
324 <para>15: During performance</para>
325 <para>16: Movie/video screen capture</para>
326 <para>17: A bright coloured fish</para>
327 <para>18: Illustration</para>
328 <para>19: Band/artist logotype</para>
329 <para>20: Publisher/Studio logotype</para>
330 <para>The default is 3 (front cover). There may only be one picture each of type 1 and 2 in a file.</para>
331
332 <para>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 --&gt; to mean that FILE is actually a URL to an image, though this use is discouraged.</para>
333
334 <para>DESCRIPTION is optional; the default is an empty string.</para>
335
336 <para>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.</para>
337
338 <para>FILE is the path to the picture file to be imported, or the URL if MIME type is --&gt;</para>
339
340 <para>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.</para>
341
342 <para>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.</para>
343 </listitem>
344 </varlistentry>
345 <varlistentry>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000346 <term><option>--add-replay-gain</option></term>
347 <listitem>
348 <para>
349 Calculates the title and album gains/peaks of the given FLAC
350 files as if all the files were part of one album, then stores
351 them in the VORBIS_COMMENT block. The tags are the same as
352 those used by vorbisgain. Existing ReplayGain tags will be
353 replaced. If only one FLAC file is given, the album and title
354 gains will be the same. Since this operation requires two
355 passes, it is always executed last, after all other operations
356 have been completed and written to disk. All FLAC files
357 specified must have the same resolution, sample rate, and
358 number of channels. The sample rate must be one of 8, 11.025,
359 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.
360 </para>
361 </listitem>
362 </varlistentry>
363 <varlistentry>
Josh Coalson83b8d282005-08-31 00:30:41 +0000364 <term><option>--remove-replay-gain</option></term>
365 <listitem>
366 <para>
367 Removes the ReplayGain tags.
368 </para>
369 </listitem>
370 </varlistentry>
371 <varlistentry>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000372 <term><option>--add-seekpoint</option>={<replaceable>#</replaceable>|<replaceable>X</replaceable>|<replaceable>#x</replaceable>|<replaceable>#s</replaceable>}</term>
Josh Coalson8ee19c02003-01-02 23:57:01 +0000373 <listitem>
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000374 <para>
375 Add seek points to a SEEKTABLE block. Using #, a seek point at
376 that sample number is added. Using X, a placeholder point is
377 added at the end of a the table. Using #x, # evenly spaced seek
378 points will be added, the first being at sample 0. Using #s, a
379 seekpoint will be added every # seconds (# does not have to be a
380 whole number; it can be, for example, 9.5, meaning a seekpoint
381 every 9.5 seconds). If no SEEKTABLE block exists, one will be
382 created. If one already exists, points will be added to the
383 existing table, and any duplicates will be turned into placeholder
384 points. You may use many --add-seekpoint options; the resulting
385 SEEKTABLE will be the unique-ified union of all such values.
386 Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100
387 evenly spaced seekpoints and a seekpoint every 3.5 seconds.
388 </para>
389 </listitem>
390 </varlistentry>
391 <varlistentry>
392 <term><option>--add-padding=length</option></term>
393 <listitem>
394 <para>
395 Add a padding block of the given length (in bytes). The overall
396 length of the new block will be 4 + length; the extra 4 bytes is
397 for the metadata block header.
398 </para>
399 </listitem>
400 </varlistentry>
401 </variablelist>
402 </refsect1>
403 <refsect1>
404 <title>MAJOR OPERATIONS</title>
405
406 <variablelist>
407 <varlistentry>
408 <term><option>--list</option></term>
409 <listitem>
410 <para>
411 List the contents of one or more metadata blocks to stdout. By
412 default, all metadata blocks are listed in text format. Use the
413 following options to change this behavior:
414 </para>
415 <variablelist>
416 <varlistentry>
417 <term><option>--block-number=#[,#[...]]</option></term>
418 <listitem>
419 <para>
420 An optional comma-separated list of block numbers to display.
421 The first block, the STREAMINFO block, is block 0.
422 </para>
423 </listitem>
424 </varlistentry>
425 <varlistentry>
426 <term><option>--block-type=type[,type[...]]</option></term>
427 <listitem><para></para></listitem>
428 </varlistentry>
429 <varlistentry>
430 <term><option>--except-block-type=type[,type[...]]</option></term>
431 <listitem>
432 <para>
Josh Coalson2a9ae6a2004-12-30 03:55:29 +0000433 An optional comma-separated list of block types to be included
Josh Coalsoneb7a8e42002-12-21 03:27:14 +0000434 or ignored with this option. Use only one of --block-type or
435 --except-block-type. The valid block types are: STREAMINFO,
436 PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT. You may
437 narrow down the types of APPLICATION blocks displayed as
438 follows:
439 </para>
440 <para>
441 APPLICATION:abcd The APPLICATION block(s) whose textual repre-
442 sentation of the 4-byte ID is "abcd"
443 APPLICATION:0xXXXXXXXX The APPLICATION block(s) whose hexadecimal big-
444 endian representation of the 4-byte ID is
445 "0xXXXXXXXX". For the example "abcd" above the
446 hexadecimal equivalalent is 0x61626364
447 </para>
448 <note>
449 <para>
450 if both --block-number and --[except-]block-type are
451 specified, the result is the logical AND of both
452 arguments.</para></note>
453 </listitem>
454 </varlistentry>
455 <varlistentry>
456 <term><option>--application-data-format=hexdump|text</option></term>
457 <listitem>
458 <para>
459 If the application block you are displaying contains binary
460 data but your --data-format=text, you can display a hex dump
461 of the application data contents instead using
462 --application-data-format=hexdump.
463 </para>
464 </listitem>
465 </varlistentry>
466 </variablelist>
467 </listitem>
468 </varlistentry>
469 <varlistentry>
470 <term><option>--remove</option></term>
471 <listitem>
472 <para>
473 Remove one or more metadata blocks from the metadata. Unless
474 --dont-use-padding is specified, the blocks will be replaced with
475 padding. You may not remove the STREAMINFO block.
476 </para>
477 <variablelist>
478 <varlistentry>
479 <term><option>--block-number=#[,#[...]]</option></term>
480 <listitem><para></para></listitem>
481 </varlistentry>
482 <varlistentry>
483 <term><option>--block-type=type[,type[...]]</option></term>
484 <listitem><para></para></listitem>
485 </varlistentry>
486 <varlistentry>
487 <term><option>--except-block-type=type[,type[...]]</option></term>
488 <listitem>
489 <para>See --list above for usage.</para>
490 <note>
491 <para>
492 if both --block-number and --[except-]block-type are
493 specified, the result is the logical AND of both arguments.
494 </para></note>
495 </listitem>
496 </varlistentry>
497 </variablelist>
498 </listitem>
499 </varlistentry>
500 <varlistentry>
501 <term><option>--remove-all</option></term>
502 <listitem>
503 <para>
504 Remove all metadata blocks (except the STREAMINFO block) from the
505 metadata. Unless --dont-use-padding is specified, the blocks will
506 be replaced with padding.
507 </para>
508 </listitem>
509 </varlistentry>
510 <varlistentry>
511 <term><option>--merge-padding</option></term>
512 <listitem>
513 <para>
514 Merge adjacent PADDING blocks into single blocks.
515 </para>
516 </listitem>
517 </varlistentry>
518 <varlistentry>
519 <term><option>--sort-padding</option></term>
520 <listitem>
521 <para>
522 Move all PADDING blocks to the end of the metadata and merge them
523 into a single block.
524 </para>
525 </listitem>
526 </varlistentry>
527 </variablelist>
528 </refsect1>
529
530 <refsect1>
531 <title>SEE ALSO</title>
532
533 <para>flac(1).</para>
534 </refsect1>
535</refentry>
536
537<!-- Keep this comment at the end of the file
538Local variables:
539mode: sgml
540sgml-omittag:t
541sgml-shorttag:t
542sgml-minimize-attributes:nil
543sgml-always-quote-attributes:t
544sgml-indent-step:2
545sgml-indent-data:t
546sgml-parent-document:nil
547sgml-default-dtd-file:nil
548sgml-exposed-tags:nil
549sgml-local-catalogs:nil
550sgml-local-ecat-files:nil
551End:
552-->