document --keep-foreign-metadata
[platform/upstream/flac.git] / man / metaflac.sgml
index 0bab491..f904a6c 100644 (file)
@@ -20,7 +20,7 @@ manpage.1: manpage.sgml
   <!ENTITY manfirstname "<firstname>dann</firstname>">
   <!ENTITY mansurname   "<surname>frazier</surname>">
   <!-- Please adjust the date whenever revising the manpage. -->
-  <!ENTITY mandate      "<date>2002-11-30</date>">
+  <!ENTITY mandate      "<date>2006-11-14</date>">
   <!-- SECTION should be 1-8, maybe with subsection. Other parameters are
        allowed: see man(7), man(1). -->
   <!ENTITY mansection   "<manvolnum>1</manvolnum>">
@@ -40,7 +40,7 @@ manpage.1: manpage.sgml
       &mansurname;
     </author>
     <copyright>
-      <year>2002</year>
+      <year>2002,2003,2004,2005</year>
       <holder>&manusername;</holder>
     </copyright>
     &mandate;
@@ -106,6 +106,15 @@ manpage.1: manpage.sgml
         </listitem>
       </varlistentry>
       <varlistentry>
+        <term><option>--no-utf8-convert</option></term>
+        <listitem>
+          <para>
+           Do not convert tags from UTF-8 to local charset, or vice versa. This is
+           useful for scripts, and setting tags in situations where the locale is wrong.
+         </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
         <term><option>--dont-use-padding</option></term>
         <listitem>
           <para>
@@ -194,7 +203,7 @@ manpage.1: manpage.sgml
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term><option>--show-vc-vendor</option></term>
+        <term><option>--show-vendor-tag</option></term>
         <listitem>
           <para>
            Show the vendor string from the VORBIS_COMMENT block.
@@ -202,65 +211,79 @@ manpage.1: manpage.sgml
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term><option>--show-vc-field=name</option></term>
+        <term><option>--show-tag=name</option></term>
         <listitem>
           <para>
-           Show all Vorbis comment fields where the the field name matches
-           'name'.
+           Show all tags where the the field name matches 'name'.
          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term><option>--remove-vc-field=name</option></term>
+        <term><option>--remove-tag=name</option></term>
         <listitem>
           <para>
-           Remove all Vorbis comment fields whose field name is 'name'.
+           Remove all tags whose field name is 'name'.
          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term><option>--remove-vc-firstfield=name</option></term>
+        <term><option>--remove-first-tag=name</option></term>
         <listitem>
           <para>
-           Remove first Vorbis comment field whose field name is 'name'.
+           Remove first tag whose field name is 'name'.
          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term><option>--remove-vc-all</option></term>
+        <term><option>--remove-all-tags</option></term>
         <listitem>
           <para>
-           Remove all Vorbis comment fields, leaving only the vendor string
-           in the VORBIS_COMMENT block.
+           Remove all tags, leaving only the vendor string.
          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term><option>--set-vc-field=field</option></term>
+        <term><option>--set-tag=field</option></term>
         <listitem>
           <para>
-           Add a Vorbis comment field.  The field must comply with the
+           Add a tag.  The field must comply with the
            Vorbis comment spec, of the form "NAME=VALUE".  If there is
-           currently no VORBIS_COMMENT block, one will be created.
+           currently no tag block, one will be created.
+         </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--set-tag-from-file=field</option></term>
+        <listitem>
+          <para>
+           Like --set-tag, except the VALUE is a filename whose
+           contents will be read verbatim to set the tag value.
+           Unless --no-utf8-convert is specified, the contents will be
+           converted to UTF-8 from the local charset.  This can be used
+           to store a cuesheet in a tag (e.g.
+           --set-tag-from-file="CUESHEET=image.cue").  Do not try to
+           store binary data in tag fields!  Use APPLICATION blocks for
+           that.
          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
-       <term><option>--import-vc-from=file</option></term>
+       <term><option>--import-tags-from=file</option></term>
         <listitem>
          <para>
-           Import Vorbis comments from a file.  Use '-' for stdin.  Each
+           Import tags from a file.  Use '-' for stdin.  Each
            line should be of the form NAME=VALUE.  Multi-line comments
-           are currently not supported.  Specify --remove-vc-all and/or
-           --no-utf8-convert before --import-vc-from if necessary.
+           are currently not supported.  Specify --remove-all-tags and/or
+           --no-utf8-convert before --import-tags-from if necessary.  If
+           FILE is '-' (stdin), only one FLAC file may be specified.
          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
-       <term><option>--export-vc-to=file</option></term>
+       <term><option>--export-tags-to=file</option></term>
         <listitem>
          <para>
-           Export Vorbis comments to a file.  Use '-' for stdin.  Each
+           Export tags to a file.  Use '-' for stdout.  Each
            line will be of the form NAME=VALUE.  Specify
            --no-utf8-convert if necessary.
          </para>
@@ -270,10 +293,10 @@ manpage.1: manpage.sgml
        <term><option>--import-cuesheet-from=file</option></term>
         <listitem>
          <para>
-           Import a cuesheet from a file.  Only one FLAC file may be
-           specified.  A seekpoint will be added for each index point in
-           the cuesheet to the SEEKTABLE unless --no-cued-seekpoints is
-           specified.
+           Import a cuesheet from a file.  Use '-' for stdin.  Only one
+           FLAC file may be specified.  A seekpoint will be added for each
+           index point in the cuesheet to the SEEKTABLE unless
+           --no-cued-seekpoints is specified.
          </para>
         </listitem>
       </varlistentry>
@@ -282,12 +305,62 @@ manpage.1: manpage.sgml
         <listitem>
          <para>
            Export CUESHEET block to a cuesheet file, suitable for use by
-           CD authoring software.  Use '-' for stdin.  Only one FLAC file
+           CD authoring software.  Use '-' for stdout.  Only one FLAC file
            may be specified on the command line.
          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
+       <term><option>--import-picture-from</option>={<replaceable>FILENAME</replaceable>|<replaceable>SPECIFICATION</replaceable>}</term>
+       <listitem>
+         <para>Import 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</para>
+         <para>[TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE</para>
+         <para>TYPE is optional; it is a number from one of:</para>
+         <para>0: Other</para>
+         <para>1: 32x32 pixels 'file icon' (PNG only)</para>
+         <para>2: Other file icon</para>
+         <para>3: Cover (front)</para>
+         <para>4: Cover (back)</para>
+         <para>5: Leaflet page</para>
+         <para>6: Media (e.g. label side of CD)</para>
+         <para>7: Lead artist/lead performer/soloist</para>
+         <para>8: Artist/performer</para>
+         <para>9: Conductor</para>
+         <para>10: Band/Orchestra</para>
+         <para>11: Composer</para>
+         <para>12: Lyricist/text writer</para>
+         <para>13: Recording Location</para>
+         <para>14: During recording</para>
+         <para>15: During performance</para>
+         <para>16: Movie/video screen capture</para>
+         <para>17: A bright coloured fish</para>
+         <para>18: Illustration</para>
+         <para>19: Band/artist logotype</para>
+         <para>20: Publisher/Studio logotype</para>
+         <para>The default is 3 (front cover).  There may only be one picture each of type 1 and 2 in a file.</para>
+
+         <para>MIME-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 --&gt; to mean that FILE is actually a URL to an image, though this use is discouraged.</para>
+
+         <para>DESCRIPTION is optional; the default is an empty string.</para>
+
+         <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>
+
+         <para>FILE is the path to the picture file to be imported, or the URL if MIME type is --&gt;</para>
+
+         <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>
+
+         <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>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><option>--export-picture-to=file</option></term>
+        <listitem>
+         <para>
+           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.
+         </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
        <term><option>--add-replay-gain</option></term>
         <listitem>
          <para>
@@ -306,8 +379,16 @@ manpage.1: manpage.sgml
         </listitem>
       </varlistentry>
       <varlistentry>
-       <listitem>
+       <term><option>--remove-replay-gain</option></term>
+        <listitem>
+         <para>
+           Removes the ReplayGain tags.
+         </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
        <term><option>--add-seekpoint</option>={<replaceable>#</replaceable>|<replaceable>X</replaceable>|<replaceable>#x</replaceable>|<replaceable>#s</replaceable>}</term>
+       <listitem>
          <para>
            Add seek points to a SEEKTABLE block.  Using #, a seek point at
            that sample number is added.  Using X, a placeholder point is
@@ -367,7 +448,7 @@ manpage.1: manpage.sgml
              <term><option>--except-block-type=type[,type[...]]</option></term>
              <listitem>
                <para>
-                 An optional comma-separated list of block types to included
+                 An optional comma-separated list of block types to be included
                  or ignored with this option.  Use only one of --block-type or
                  --except-block-type.  The valid block types are: STREAMINFO,
                  PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT.  You may