metaflac (1)





NAME

       metaflac  -  program  to  list, add, remove, or edit metadata in one or
       more FLAC files.


SYNOPSIS

       metaflac [ options ] [ operations ] FLACfile ...


DESCRIPTION

       Use metaflac to list, add, remove, or edit metadata in one or more FLAC
       files.   You  may perform one major operation, or many shorthand opera-
       tions at a time.


OPTIONS

       --preserve-modtime
              Preserve the original modification time in spite of edits.

       --with-filename
              Prefix each output line with the FLAC file name (the default  if
              more than one FLAC file is specified).

       --no-filename
              Do  not  prefix  each  output  line with the FLAC file name (the
              default if only one FLAC file is specified).

       --dont-use-padding
              By default metaflac tries to use padding where possible to avoid
              rewriting  the  entire  file  if the metadata size changes.  Use
              this option to tell metaflac to not take  advantage  of  padding
              this way.


SHORTHAND OPERATIONS

       --show-md5sum
              Show the MD5 signature from the STREAMINFO block.

       --show-min-blocksize
              Show the minimum block size from the STREAMINFO block.

       --show-max-blocksize
              Show the maximum block size from the STREAMINFO block.

       --show-min-framesize
              Show the minimum frame size from the STREAMINFO block.

       --show-max-framesize
              Show the maximum frame size from the STREAMINFO block.

       --show-sample-rate
              Show the sample rate from the STREAMINFO block.

       --show-channels
              Show the number of channels from the STREAMINFO block.

       --show-bps
              Show the # of bits per sample from the STREAMINFO block.
              'name'.

       --remove-vc-field=name
              Remove all Vorbis comment fields whose field name is 'name'.

       --remove-vc-firstfield=name
              Remove first Vorbis comment field whose field name is 'name'.

       --remove-vc-all
              Remove all Vorbis comment fields, leaving only the vendor string
              in the VORBIS_COMMENT block.

       --set-vc-field=field
              Add a Vorbis comment field.  The field must comply with the Vor-
              bis comment spec, of the form "NAME=VALUE".  If  there  is  cur-
              rently no VORBIS_COMMENT block, one will be created.

       --import-vc-from=file
              Import  Vorbis  comments  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.

       --export-vc-to=file
              Export Vorbis comments to a file.  Use '-' for stdin.  Each line
              will  be  of  the form NAME=VALUE.  Specify --no-utf8-convert if
              necessary.

       --import-cuesheet-from=file
              Import a cuesheet from a file.  Only one FLAC file may be speci-
              fied.   A  seekpoint  will  be added for each index point in the
              cuesheet to the SEEKTABLE unless --no-cued-seekpoints is  speci-
              fied.

       --export-cuesheet-to=file
              Export CUESHEET block to a cuesheet file, suitable for use by CD
              authoring software.  Use '-' for stdin.  Only one FLAC file  may
              be specified on the command line.

       --add-replay-gain
              Calculates  the  title  and  album gains/peaks of the given FLAC
              files as if all the files were part of one  album,  then  stores
              them  in  the  VORBIS_COMMENT  block.   The tags are the same as
              those used by vorbisgain.   Existing  ReplayGain  tags  will  be
              replaced.   If  only one FLAC file is given, the album and title
              gains will be the  same.   Since  this  operation  requires  two
              passes,  it  is always executed last, after all other operations
              have been completed and written to disk.  All FLAC files  speci-
              fied  must  have the same resolution, sample rate, and number of
              channels.  The sample rate must be one of  8,  11.025,  12,  16,
              22.05, 24, 32, 44.1, or 48 kHz.

       --add-seekpoint={#|X|#x|#s}
              Add  seek points to a SEEKTABLE block.  Using #, a seek point at
              that sample number is added.  Using X, a  placeholder  point  is
              added at the end of a the table.  Using #x, # evenly spaced seek
              points will be added, the first being at sample 0.  Using #s,  a
              onds.

       --add-padding=length
              Add a padding block of the given length (in bytes).  The overall
              length of the new block will be 4 + length; the extra 4 bytes is
              for the metadata block header.


MAJOR OPERATIONS

       --list List the contents of one or more metadata blocks to stdout.   By
              default, all metadata blocks are listed in text format.  Use the
              following options to change this behavior:

              --block-number=#[,#[...]]
                     An optional comma-separated list of block numbers to dis-
                     play.  The first block, the STREAMINFO block, is block 0.

              --block-type=type[,type[...]]

              --except-block-type=type[,type[...]]
                     An  optional  comma-separated  list  of  block  types  to
                     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 narrow down the types of  APPLI-
                     CATION blocks displayed as follows:

                     APPLICATION:abcd         The  APPLICATION  block(s) whose
                     textual repre- sentation  of  the  4-byte  ID  is  "abcd"
                     APPLICATION:0xXXXXXXXX   The  APPLICATION  block(s) whose
                     hexadecimal big- endian representation of the  4-byte  ID
                     is  "0xXXXXXXXX".   For the example "abcd" above the hex-
                     adecimal equivalalent is 0x61626364

                     Note: if both  --block-number  and  --[except-]block-type
                     are  specified,  the  result  is  the logical AND of both
                     arguments.

              --application-data-format=hexdump|text
                     If the application  block  you  are  displaying  contains
                     binary  data but your --data-format=text, you can display
                     a hex dump of the application data contents instead using
                     --application-data-format=hexdump.

       --remove
              Remove  one  or  more metadata blocks from the metadata.  Unless
              --dont-use-padding is specified, the  blocks  will  be  replaced
              with padding.  You may not remove the STREAMINFO block.

              --block-number=#[,#[...]]

              --block-type=type[,type[...]]

              --except-block-type=type[,type[...]]
                     See --list above for usage.

                     Note:  if  both  --block-number and --[except-]block-type
                     are specified, the result is  the  logical  AND  of  both

       --sort-padding
              Move  all  PADDING  blocks  to the end of the metadata and merge
              them into a single block.


SEE ALSO

       flac(1).

                                02 January 2003                    metaflac(1)