metaflac.1 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. .\" This manpage has been automatically generated by docbook2man
  2. .\" from a DocBook document. This tool can be found at:
  3. .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
  4. .\" Please send any bug reports, improvements, comments, patches,
  5. .\" etc. to Steve Cheng <[email protected]>.
  6. .TH "METAFLAC" "1" "2013/04/30" "" ""
  7. .SH NAME
  8. metaflac \- program to list, add, remove, or edit metadata in one or more FLAC files.
  9. .SH SYNOPSIS
  10. \fBmetaflac\fR [ \fB\fIoptions\fB\fR ] [ \fB\fIoperations\fB\fR ] \fB\fIFLACfile\fB\fR\fI ...\fR
  11. .SH "DESCRIPTION"
  12. .PP
  13. Use \fBmetaflac\fR to list, add, remove, or edit
  14. metadata in one or more FLAC files. You may perform one major operation,
  15. or many shorthand operations at a time.
  16. .SH "OPTIONS"
  17. .TP
  18. \fB--preserve-modtime\fR
  19. Preserve the original modification time in spite of edits.
  20. .TP
  21. \fB--with-filename\fR
  22. Prefix each output line with the FLAC file name (the default if
  23. more than one FLAC file is specified).
  24. .TP
  25. \fB--no-filename\fR
  26. Do not prefix each output line with the FLAC file name (the default
  27. if only one FLAC file is specified).
  28. .TP
  29. \fB--no-utf8-convert\fR
  30. Do not convert tags from UTF-8 to local charset, or vice versa. This is
  31. useful for scripts, and setting tags in situations where the locale is wrong.
  32. .TP
  33. \fB--dont-use-padding\fR
  34. By default metaflac tries to use padding where possible to avoid
  35. rewriting the entire file if the metadata size changes. Use this
  36. option to tell metaflac to not take advantage of padding this way.
  37. .SH "SHORTHAND OPERATIONS"
  38. .TP
  39. \fB--show-md5sum\fR
  40. Show the MD5 signature from the STREAMINFO block.
  41. .TP
  42. \fB--show-min-blocksize\fR
  43. Show the minimum block size from the STREAMINFO block.
  44. .TP
  45. \fB--show-max-blocksize\fR
  46. Show the maximum block size from the STREAMINFO block.
  47. .TP
  48. \fB--show-min-framesize\fR
  49. Show the minimum frame size from the STREAMINFO block.
  50. .TP
  51. \fB--show-max-framesize\fR
  52. Show the maximum frame size from the STREAMINFO block.
  53. .TP
  54. \fB--show-sample-rate\fR
  55. Show the sample rate from the STREAMINFO block.
  56. .TP
  57. \fB--show-channels\fR
  58. Show the number of channels from the STREAMINFO block.
  59. .TP
  60. \fB--show-bps\fR
  61. Show the # of bits per sample from the STREAMINFO block.
  62. .TP
  63. \fB--show-total-samples\fR
  64. Show the total # of samples from the STREAMINFO block.
  65. .TP
  66. \fB--show-vendor-tag\fR
  67. Show the vendor string from the VORBIS_COMMENT block.
  68. .TP
  69. \fB--show-tag=name\fR
  70. Show all tags where the field name matches 'name'.
  71. .TP
  72. \fB--remove-tag=name\fR
  73. Remove all tags whose field name is 'name'.
  74. .TP
  75. \fB--remove-first-tag=name\fR
  76. Remove first tag whose field name is 'name'.
  77. .TP
  78. \fB--remove-all-tags\fR
  79. Remove all tags, leaving only the vendor string.
  80. .TP
  81. \fB--set-tag=field\fR
  82. Add a tag. The field must comply with the
  83. Vorbis comment spec, of the form "NAME=VALUE". If there is
  84. currently no tag block, one will be created.
  85. .TP
  86. \fB--set-tag-from-file=field\fR
  87. Like --set-tag, except the VALUE is a filename whose
  88. contents will be read verbatim to set the tag value.
  89. Unless --no-utf8-convert is specified, the contents will be
  90. converted to UTF-8 from the local charset. This can be used
  91. to store a cuesheet in a tag (e.g.
  92. --set-tag-from-file="CUESHEET=image.cue"). Do not try to
  93. store binary data in tag fields! Use APPLICATION blocks for
  94. that.
  95. .TP
  96. \fB--import-tags-from=file\fR
  97. Import tags from a file. Use '-' for stdin. Each
  98. line should be of the form NAME=VALUE. Multi-line comments
  99. are currently not supported. Specify --remove-all-tags and/or
  100. --no-utf8-convert before --import-tags-from if necessary. If
  101. FILE is '-' (stdin), only one FLAC file may be specified.
  102. .TP
  103. \fB--export-tags-to=file\fR
  104. Export tags to a file. Use '-' for stdout. Each
  105. line will be of the form NAME=VALUE. Specify
  106. --no-utf8-convert if necessary.
  107. .TP
  108. \fB--import-cuesheet-from=file\fR
  109. Import a cuesheet from a file. Use '-' for stdin. Only one
  110. FLAC file may be specified. A seekpoint will be added for each
  111. index point in the cuesheet to the SEEKTABLE unless
  112. --no-cued-seekpoints is specified.
  113. .TP
  114. \fB--export-cuesheet-to=file\fR
  115. Export CUESHEET block to a cuesheet file, suitable for use by
  116. CD authoring software. Use '-' for stdout. Only one FLAC file
  117. may be specified on the command line.
  118. .TP
  119. \fB--import-picture-from={\fIFILENAME\fB|\fISPECIFICATION\fB}\fR
  120. 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
  121. [TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE
  122. TYPE is optional; it is a number from one of:
  123. 0: Other
  124. 1: 32x32 pixels 'file icon' (PNG only)
  125. 2: Other file icon
  126. 3: Cover (front)
  127. 4: Cover (back)
  128. 5: Leaflet page
  129. 6: Media (e.g. label side of CD)
  130. 7: Lead artist/lead performer/soloist
  131. 8: Artist/performer
  132. 9: Conductor
  133. 10: Band/Orchestra
  134. 11: Composer
  135. 12: Lyricist/text writer
  136. 13: Recording Location
  137. 14: During recording
  138. 15: During performance
  139. 16: Movie/video screen capture
  140. 17: A bright coloured fish
  141. 18: Illustration
  142. 19: Band/artist logotype
  143. 20: Publisher/Studio logotype
  144. The default is 3 (front cover). There may only be one picture each of type 1 and 2 in a file.
  145. 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.
  146. DESCRIPTION is optional; the default is an empty string.
  147. 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.
  148. FILE is the path to the picture file to be imported, or the URL if MIME type is -->
  149. 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.
  150. 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.
  151. .TP
  152. \fB--export-picture-to=file\fR
  153. 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.
  154. .TP
  155. \fB--add-replay-gain\fR
  156. Calculates the title and album gains/peaks of the given FLAC
  157. files as if all the files were part of one album, then stores
  158. them as FLAC tags. The tags are the same as
  159. those used by vorbisgain. Existing ReplayGain tags will be
  160. replaced. If only one FLAC file is given, the album and title
  161. gains will be the same. Since this operation requires two
  162. passes, it is always executed last, after all other operations
  163. have been completed and written to disk. All FLAC files
  164. specified must have the same resolution, sample rate, and
  165. number of channels. The sample rate must be one of 8, 11.025,
  166. 12, 16, 18.9, 22.05, 24, 28, 32, 37.8, 44.1, 48, 56, 64, 88.2,
  167. 96, 112, 128, 144, 176.4, or 192kHz.
  168. .TP
  169. \fB--scan-replay-gain\fR
  170. Like --add-replay-gain, but only analyzes the files rather than
  171. writing them to the tags.
  172. .TP
  173. \fB--remove-replay-gain\fR
  174. Removes the ReplayGain tags.
  175. .TP
  176. \fB--add-seekpoint={\fI#\fB|\fIX\fB|\fI#x\fB|\fI#s\fB}\fR
  177. Add seek points to a SEEKTABLE block. Using #, a seek point at
  178. that sample number is added. Using X, a placeholder point is
  179. added at the end of a the table. Using #x, # evenly spaced seek
  180. points will be added, the first being at sample 0. Using #s, a
  181. seekpoint will be added every # seconds (# does not have to be a
  182. whole number; it can be, for example, 9.5, meaning a seekpoint
  183. every 9.5 seconds). If no SEEKTABLE block exists, one will be
  184. created. If one already exists, points will be added to the
  185. existing table, and any duplicates will be turned into placeholder
  186. points. You may use many --add-seekpoint options; the resulting
  187. SEEKTABLE will be the unique-ified union of all such values.
  188. Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100
  189. evenly spaced seekpoints and a seekpoint every 3.5 seconds.
  190. .TP
  191. \fB--add-padding=length\fR
  192. Add a padding block of the given length (in bytes). The overall
  193. length of the new block will be 4 + length; the extra 4 bytes is
  194. for the metadata block header.
  195. .SH "MAJOR OPERATIONS"
  196. .TP
  197. \fB--list\fR
  198. List the contents of one or more metadata blocks to stdout. By
  199. default, all metadata blocks are listed in text format. Use the
  200. following options to change this behavior:
  201. .RS
  202. .TP
  203. \fB--block-number=#[,#[...]]\fR
  204. An optional comma-separated list of block numbers to display.
  205. The first block, the STREAMINFO block, is block 0.
  206. .TP
  207. \fB--block-type=type[,type[...]]\fR
  208. .TP
  209. \fB--except-block-type=type[,type[...]]\fR
  210. An optional comma-separated list of block types to be included
  211. or ignored with this option. Use only one of --block-type or
  212. --except-block-type. The valid block types are: STREAMINFO,
  213. PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT, PICTURE. You
  214. may narrow down the types of APPLICATION blocks displayed as
  215. follows:
  216. APPLICATION:abcd The APPLICATION block(s) whose textual repre-
  217. sentation of the 4-byte ID is "abcd"
  218. APPLICATION:0xXXXXXXXX The APPLICATION block(s) whose hexadecimal big-
  219. endian representation of the 4-byte ID is
  220. "0xXXXXXXXX". For the example "abcd" above the
  221. hexadecimal equivalalent is 0x61626364
  222. .sp
  223. .RS
  224. .B "Note:"
  225. if both --block-number and --[except-]block-type are
  226. specified, the result is the logical AND of both
  227. arguments.
  228. .RE
  229. .TP
  230. \fB--application-data-format=hexdump|text\fR
  231. If the application block you are displaying contains binary
  232. data but your --data-format=text, you can display a hex dump
  233. of the application data contents instead using
  234. --application-data-format=hexdump.
  235. .RE
  236. .TP
  237. \fB--remove\fR
  238. Remove one or more metadata blocks from the metadata. Unless
  239. --dont-use-padding is specified, the blocks will be replaced with
  240. padding. You may not remove the STREAMINFO block.
  241. .RS
  242. .TP
  243. \fB--block-number=#[,#[...]]\fR
  244. .TP
  245. \fB--block-type=type[,type[...]]\fR
  246. .TP
  247. \fB--except-block-type=type[,type[...]]\fR
  248. See --list above for usage.
  249. .sp
  250. .RS
  251. .B "Note:"
  252. if both --block-number and --[except-]block-type are
  253. specified, the result is the logical AND of both arguments.
  254. .RE
  255. .RE
  256. .TP
  257. \fB--remove-all\fR
  258. Remove all metadata blocks (except the STREAMINFO block) from the
  259. metadata. Unless --dont-use-padding is specified, the blocks will
  260. be replaced with padding.
  261. .TP
  262. \fB--merge-padding\fR
  263. Merge adjacent PADDING blocks into single blocks.
  264. .TP
  265. \fB--sort-padding\fR
  266. Move all PADDING blocks to the end of the metadata and merge them
  267. into a single block.
  268. .SH "SEE ALSO"
  269. .PP
  270. flac(1).