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