Chris@1: .\" This manpage has been automatically generated by docbook2man
Chris@1: .\" from a DocBook document. This tool can be found at:
Chris@1: .\"
Chris@1: .\" Please send any bug reports, improvements, comments, patches,
Chris@1: .\" etc. to Steve Cheng .
Chris@1: .TH "METAFLAC" "1" "14 September 2007" "" ""
Chris@1:
Chris@1: .SH NAME
Chris@1: metaflac \- program to list, add, remove, or edit metadata in one or more FLAC files.
Chris@1: .SH SYNOPSIS
Chris@1:
Chris@1: \fBmetaflac\fR [ \fB\fIoptions\fB\fR ] [ \fB\fIoperations\fB\fR ] \fB\fIFLACfile\fB\fR\fI ...\fR
Chris@1:
Chris@1: .SH "DESCRIPTION"
Chris@1: .PP
Chris@1: Use \fBmetaflac\fR to list, add, remove, or edit
Chris@1: metadata in one or more FLAC files. You may perform one major operation,
Chris@1: or many shorthand operations at a time.
Chris@1: .SH "OPTIONS"
Chris@1: .TP
Chris@1: \fB--preserve-modtime\fR
Chris@1: Preserve the original modification time in spite of edits.
Chris@1: .TP
Chris@1: \fB--with-filename\fR
Chris@1: Prefix each output line with the FLAC file name (the default if
Chris@1: more than one FLAC file is specified).
Chris@1: .TP
Chris@1: \fB--no-filename\fR
Chris@1: Do not prefix each output line with the FLAC file name (the default
Chris@1: if only one FLAC file is specified).
Chris@1: .TP
Chris@1: \fB--no-utf8-convert\fR
Chris@1: Do not convert tags from UTF-8 to local charset, or vice versa. This is
Chris@1: useful for scripts, and setting tags in situations where the locale is wrong.
Chris@1: .TP
Chris@1: \fB--dont-use-padding\fR
Chris@1: By default metaflac tries to use padding where possible to avoid
Chris@1: rewriting the entire file if the metadata size changes. Use this
Chris@1: option to tell metaflac to not take advantage of padding this way.
Chris@1: .SH "SHORTHAND OPERATIONS"
Chris@1: .TP
Chris@1: \fB--show-md5sum\fR
Chris@1: Show the MD5 signature from the STREAMINFO block.
Chris@1: .TP
Chris@1: \fB--show-min-blocksize\fR
Chris@1: Show the minimum block size from the STREAMINFO block.
Chris@1: .TP
Chris@1: \fB--show-max-blocksize\fR
Chris@1: Show the maximum block size from the STREAMINFO block.
Chris@1: .TP
Chris@1: \fB--show-min-framesize\fR
Chris@1: Show the minimum frame size from the STREAMINFO block.
Chris@1: .TP
Chris@1: \fB--show-max-framesize\fR
Chris@1: Show the maximum frame size from the STREAMINFO block.
Chris@1: .TP
Chris@1: \fB--show-sample-rate\fR
Chris@1: Show the sample rate from the STREAMINFO block.
Chris@1: .TP
Chris@1: \fB--show-channels\fR
Chris@1: Show the number of channels from the STREAMINFO block.
Chris@1: .TP
Chris@1: \fB--show-bps\fR
Chris@1: Show the # of bits per sample from the STREAMINFO block.
Chris@1: .TP
Chris@1: \fB--show-total-samples\fR
Chris@1: Show the total # of samples from the STREAMINFO block.
Chris@1: .TP
Chris@1: \fB--show-vendor-tag\fR
Chris@1: Show the vendor string from the VORBIS_COMMENT block.
Chris@1: .TP
Chris@1: \fB--show-tag=name\fR
Chris@1: Show all tags where the the field name matches 'name'.
Chris@1: .TP
Chris@1: \fB--remove-tag=name\fR
Chris@1: Remove all tags whose field name is 'name'.
Chris@1: .TP
Chris@1: \fB--remove-first-tag=name\fR
Chris@1: Remove first tag whose field name is 'name'.
Chris@1: .TP
Chris@1: \fB--remove-all-tags\fR
Chris@1: Remove all tags, leaving only the vendor string.
Chris@1: .TP
Chris@1: \fB--set-tag=field\fR
Chris@1: Add a tag. The field must comply with the
Chris@1: Vorbis comment spec, of the form "NAME=VALUE". If there is
Chris@1: currently no tag block, one will be created.
Chris@1: .TP
Chris@1: \fB--set-tag-from-file=field\fR
Chris@1: Like --set-tag, except the VALUE is a filename whose
Chris@1: contents will be read verbatim to set the tag value.
Chris@1: Unless --no-utf8-convert is specified, the contents will be
Chris@1: converted to UTF-8 from the local charset. This can be used
Chris@1: to store a cuesheet in a tag (e.g.
Chris@1: --set-tag-from-file="CUESHEET=image.cue"). Do not try to
Chris@1: store binary data in tag fields! Use APPLICATION blocks for
Chris@1: that.
Chris@1: .TP
Chris@1: \fB--import-tags-from=file\fR
Chris@1: Import tags from a file. Use '-' for stdin. Each
Chris@1: line should be of the form NAME=VALUE. Multi-line comments
Chris@1: are currently not supported. Specify --remove-all-tags and/or
Chris@1: --no-utf8-convert before --import-tags-from if necessary. If
Chris@1: FILE is '-' (stdin), only one FLAC file may be specified.
Chris@1: .TP
Chris@1: \fB--export-tags-to=file\fR
Chris@1: Export tags to a file. Use '-' for stdout. Each
Chris@1: line will be of the form NAME=VALUE. Specify
Chris@1: --no-utf8-convert if necessary.
Chris@1: .TP
Chris@1: \fB--import-cuesheet-from=file\fR
Chris@1: Import a cuesheet from a file. Use '-' for stdin. Only one
Chris@1: FLAC file may be specified. A seekpoint will be added for each
Chris@1: index point in the cuesheet to the SEEKTABLE unless
Chris@1: --no-cued-seekpoints is specified.
Chris@1: .TP
Chris@1: \fB--export-cuesheet-to=file\fR
Chris@1: Export CUESHEET block to a cuesheet file, suitable for use by
Chris@1: CD authoring software. Use '-' for stdout. Only one FLAC file
Chris@1: may be specified on the command line.
Chris@1: .TP
Chris@1: \fB--import-picture-from={\fIFILENAME\fB|\fISPECIFICATION\fB}\fR
Chris@1: 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
Chris@1:
Chris@1: [TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE
Chris@1:
Chris@1: TYPE is optional; it is a number from one of:
Chris@1:
Chris@1: 0: Other
Chris@1:
Chris@1: 1: 32x32 pixels 'file icon' (PNG only)
Chris@1:
Chris@1: 2: Other file icon
Chris@1:
Chris@1: 3: Cover (front)
Chris@1:
Chris@1: 4: Cover (back)
Chris@1:
Chris@1: 5: Leaflet page
Chris@1:
Chris@1: 6: Media (e.g. label side of CD)
Chris@1:
Chris@1: 7: Lead artist/lead performer/soloist
Chris@1:
Chris@1: 8: Artist/performer
Chris@1:
Chris@1: 9: Conductor
Chris@1:
Chris@1: 10: Band/Orchestra
Chris@1:
Chris@1: 11: Composer
Chris@1:
Chris@1: 12: Lyricist/text writer
Chris@1:
Chris@1: 13: Recording Location
Chris@1:
Chris@1: 14: During recording
Chris@1:
Chris@1: 15: During performance
Chris@1:
Chris@1: 16: Movie/video screen capture
Chris@1:
Chris@1: 17: A bright coloured fish
Chris@1:
Chris@1: 18: Illustration
Chris@1:
Chris@1: 19: Band/artist logotype
Chris@1:
Chris@1: 20: Publisher/Studio logotype
Chris@1:
Chris@1: The default is 3 (front cover). There may only be one picture each of type 1 and 2 in a file.
Chris@1:
Chris@1: 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 --> to mean that FILE is actually a URL to an image, though this use is discouraged.
Chris@1:
Chris@1: DESCRIPTION is optional; the default is an empty string.
Chris@1:
Chris@1: 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.
Chris@1:
Chris@1: FILE is the path to the picture file to be imported, or the URL if MIME type is -->
Chris@1:
Chris@1: 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.
Chris@1:
Chris@1: 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.
Chris@1: .TP
Chris@1: \fB--export-picture-to=file\fR
Chris@1: 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.
Chris@1: .TP
Chris@1: \fB--add-replay-gain\fR
Chris@1: Calculates the title and album gains/peaks of the given FLAC
Chris@1: files as if all the files were part of one album, then stores
Chris@1: them as FLAC tags. The tags are the same as
Chris@1: those used by vorbisgain. Existing ReplayGain tags will be
Chris@1: replaced. If only one FLAC file is given, the album and title
Chris@1: gains will be the same. Since this operation requires two
Chris@1: passes, it is always executed last, after all other operations
Chris@1: have been completed and written to disk. All FLAC files
Chris@1: specified must have the same resolution, sample rate, and
Chris@1: number of channels. The sample rate must be one of 8, 11.025,
Chris@1: 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.
Chris@1: .TP
Chris@1: \fB--remove-replay-gain\fR
Chris@1: Removes the ReplayGain tags.
Chris@1: .TP
Chris@1: \fB--add-seekpoint={\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}\fR
Chris@1: Add seek points to a SEEKTABLE block. Using #, a seek point at
Chris@1: that sample number is added. Using X, a placeholder point is
Chris@1: added at the end of a the table. Using #x, # evenly spaced seek
Chris@1: points will be added, the first being at sample 0. Using #s, a
Chris@1: seekpoint will be added every # seconds (# does not have to be a
Chris@1: whole number; it can be, for example, 9.5, meaning a seekpoint
Chris@1: every 9.5 seconds). If no SEEKTABLE block exists, one will be
Chris@1: created. If one already exists, points will be added to the
Chris@1: existing table, and any duplicates will be turned into placeholder
Chris@1: points. You may use many --add-seekpoint options; the resulting
Chris@1: SEEKTABLE will be the unique-ified union of all such values.
Chris@1: Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100
Chris@1: evenly spaced seekpoints and a seekpoint every 3.5 seconds.
Chris@1: .TP
Chris@1: \fB--add-padding=length\fR
Chris@1: Add a padding block of the given length (in bytes). The overall
Chris@1: length of the new block will be 4 + length; the extra 4 bytes is
Chris@1: for the metadata block header.
Chris@1: .SH "MAJOR OPERATIONS"
Chris@1: .TP
Chris@1: \fB--list\fR
Chris@1: List the contents of one or more metadata blocks to stdout. By
Chris@1: default, all metadata blocks are listed in text format. Use the
Chris@1: following options to change this behavior:
Chris@1: .RS
Chris@1: .TP
Chris@1: \fB--block-number=#[,#[...]]\fR
Chris@1: An optional comma-separated list of block numbers to display.
Chris@1: The first block, the STREAMINFO block, is block 0.
Chris@1: .TP
Chris@1: \fB--block-type=type[,type[...]]\fR
Chris@1: .TP
Chris@1: \fB--except-block-type=type[,type[...]]\fR
Chris@1: An optional comma-separated list of block types to be included
Chris@1: or ignored with this option. Use only one of --block-type or
Chris@1: --except-block-type. The valid block types are: STREAMINFO,
Chris@1: PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT. You may
Chris@1: narrow down the types of APPLICATION blocks displayed as
Chris@1: follows:
Chris@1:
Chris@1: APPLICATION:abcd The APPLICATION block(s) whose textual repre-
Chris@1: sentation of the 4-byte ID is "abcd"
Chris@1: APPLICATION:0xXXXXXXXX The APPLICATION block(s) whose hexadecimal big-
Chris@1: endian representation of the 4-byte ID is
Chris@1: "0xXXXXXXXX". For the example "abcd" above the
Chris@1: hexadecimal equivalalent is 0x61626364
Chris@1: .sp
Chris@1: .RS
Chris@1: .B "Note:"
Chris@1: if both --block-number and --[except-]block-type are
Chris@1: specified, the result is the logical AND of both
Chris@1: arguments.
Chris@1: .RE
Chris@1: .TP
Chris@1: \fB--application-data-format=hexdump|text\fR
Chris@1: If the application block you are displaying contains binary
Chris@1: data but your --data-format=text, you can display a hex dump
Chris@1: of the application data contents instead using
Chris@1: --application-data-format=hexdump.
Chris@1: .RE
Chris@1: .TP
Chris@1: \fB--remove\fR
Chris@1: Remove one or more metadata blocks from the metadata. Unless
Chris@1: --dont-use-padding is specified, the blocks will be replaced with
Chris@1: padding. You may not remove the STREAMINFO block.
Chris@1: .RS
Chris@1: .TP
Chris@1: \fB--block-number=#[,#[...]]\fR
Chris@1: .TP
Chris@1: \fB--block-type=type[,type[...]]\fR
Chris@1: .TP
Chris@1: \fB--except-block-type=type[,type[...]]\fR
Chris@1: See --list above for usage.
Chris@1: .sp
Chris@1: .RS
Chris@1: .B "Note:"
Chris@1: if both --block-number and --[except-]block-type are
Chris@1: specified, the result is the logical AND of both arguments.
Chris@1: .RE
Chris@1: .RE
Chris@1: .TP
Chris@1: \fB--remove-all\fR
Chris@1: Remove all metadata blocks (except the STREAMINFO block) from the
Chris@1: metadata. Unless --dont-use-padding is specified, the blocks will
Chris@1: be replaced with padding.
Chris@1: .TP
Chris@1: \fB--merge-padding\fR
Chris@1: Merge adjacent PADDING blocks into single blocks.
Chris@1: .TP
Chris@1: \fB--sort-padding\fR
Chris@1: Move all PADDING blocks to the end of the metadata and merge them
Chris@1: into a single block.
Chris@1: .SH "SEE ALSO"
Chris@1: .PP
Chris@1: flac(1).