From 01fb720434b53f88e1252a8e68dd838f5ad5420c Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Thu, 30 Dec 2004 03:53:56 +0000 Subject: [PATCH] add docs for metaflac --- doc/html/documentation.html | 401 +++++++++++++++++++++++++++++++++++- 1 file changed, 399 insertions(+), 2 deletions(-) diff --git a/doc/html/documentation.html b/doc/html/documentation.html index f13bd038..d2c2c6db 100644 --- a/doc/html/documentation.html +++ b/doc/html/documentation.html @@ -984,10 +984,407 @@

- metaflac is the command-line .flac file metadata editor. You can use it to list the contents of blocks, delete or insert blocks, and manage padding. + metaflac is the command-line .flac file metadata editor. You can use it to list the contents of metadata blocks, edit, delete or insert blocks, and manage padding.

- The HTML documentation for metaflac is currently being rewritten, but the usage screen should explain it pretty well, and there is a man page. Do metaflac --help to see the full usage. + metaflac takes a set of "options" (though some are not optional) and a set of FLAC files to operate on. There are three kinds of "options": +

    +
  • + Major operations, which specify a mode of operation like listing blocks, removing blocks, etc. These will have sub-operations describing exactly what is to be done. +
  • +
  • + Shorthand operations, which are convenient synonyms for major operations. For example, there is a shorthand operation --show-sample-rate that shows just the sample rate field from the STREAMINFO metadata block. +
  • +
  • + Global options, which affect all the operations. +
  • +
+

+

+ All of these are described in the tables below. At least one shorthand or major operation must be supplied. You can use multiple shorthand operations to do more than one thing to a file or set of files. Most of the common things to do to metadata have shorthand operations. As an example, here is how to show the MD5 signatures for a set of three FLAC files: +

+

+ metaflac --show-md5sum file1.flac file2.flac file3.flac +

+

+ Another example; this removes all DESCRIPTION and COMMENT tags in a set of FLAC files, and uses the --preserve-modtime global option to keep the FLAC file modification times the same (usually when files are edited the modification time is set to the current time): +

+

+ metaflac --preserve-modtime --remove-tag=DESCRIPTION --remove-tag=COMMENT file1.flac file2.flac file3.flac +

+

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Global 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) +
+ + --no-utf8-convert + + Do not convert tags from UTF-8 to local charset, or vice versa. This is useful for scripts. +
+ + --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. +
+ + --show-total-samples + + Show the total # of samples from the STREAMINFO block. +
+ + --show-vendor-tag + + Show the vendor string from the VORBIS_COMMENT block. +
+ + --show-tag=NAME + + Show all tags where the the field name matches NAME. +
+ + --remove-tag=NAME + + Remove all tags whose field name is NAME. +
+ + --remove-first-tag=NAME + + Remove first tag whose field name is NAME. +
+ + --remove-all-tags + + Remove all tags, leaving only the vendor string. +
+ + --set-tag=FIELD + + Add a tag. The FIELD must comply with the Vorbis comment spec, of the form NAME=VALUE. If there is currently no tag block, one will be created. +
+ + --import-tags-from=FILE + + 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-all-tags and/or --no-utf8-convert before --import-tags-from if necessary. +
+ + --export-tags-to=FILE + + Export tags 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. 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. +
+ + --export-cuesheet-to=FILE + + Export CUESHEET block to a cuesheet file, suitable for use by CD authoring software. Use '-' for stdout. 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 specified 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:
+
    +
  • + : a specific sample number for a seek point +
  • +
  • + : a placeholder point (always goes at the end of the SEEKTABLE) +
  • +
  • + #x : # evenly spaced seekpoints, the first being at sample 0 +
  • +
  • + #s : a seekpoint every # seconds; # does not have to be a whole number, it can be, for example, 9.5, meaning a seekpoint every 9.5 seconds +
  • +
+ If no SEEKTABLE block exists, one will be created. If one already exists, points will be added to the existing table, and any duplicates will be turned into placeholder points.
+ You may use many --add-seekpoint options; the resulting SEEKTABLE will be the unique-ified union of all such values. Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100 evenly spaced seekpoints and a seekpoint every 3.5 seconds.
+
+ + --add-padding=# + + 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 +
+ + --version + + Show the metaflac version number. +
+ + --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 display. 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 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 narrow down the types of APPLICATION blocks displayed as follows:
+ + + + + +
APPLICATION:abcdThe APPLICATION block(s) whose textual representation of the 4-byte ID is "abcd" +
APPLICATION:0xXXXXXXXXThe APPLICATION block(s) whose hexadecimal big- endian representation of the 4-byte ID is "0xXXXXXXXX". For the example "abcd" above the hexadecimal 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 arguments. +

+ + --remove-all + + Remove all metadata blocks (except the STREAMINFO block) from the metadata. Unless --dont-use-padding is specified, the blocks will be replaced with padding. +
+ + --merge-padding + + Merge adjacent PADDING blocks into single blocks. +
+ + --sort-padding + + Move all PADDING blocks to the end of the metadata and merge them into a single block. +
+