metaflac.sgml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
  2. <!-- Process this file with docbook-to-man to generate an nroff manual
  3. page: `docbook-to-man manpage.sgml > manpage.1'. You may view
  4. the manual page with: `docbook-to-man manpage.sgml | nroff -man |
  5. less'. A typical entry in a Makefile or Makefile.am is:
  6. manpage.1: manpage.sgml
  7. docbook-to-man $< > $@
  8. -->
  9. <!-- This is based on an example constructed by Colin Watson
  10. <email>[email protected]</email>, based on a man page template
  11. provided by Tom Christiansen <email>[email protected]</email>
  12. and a DocBook man page example by Craig Small
  13. <email>[email protected]</email>.
  14. -->
  15. <!-- Fill in the various UPPER CASE things here. -->
  16. <!ENTITY manfirstname "<firstname>dann</firstname>">
  17. <!ENTITY mansurname "<surname>frazier</surname>">
  18. <!-- Please adjust the date whenever revising the manpage. -->
  19. <!ENTITY mandate "<date>2013/04/30</date>">
  20. <!-- SECTION should be 1-8, maybe with subsection. Other parameters are
  21. allowed: see man(7), man(1). -->
  22. <!ENTITY mansection "<manvolnum>1</manvolnum>">
  23. <!ENTITY manemail "<email>[email protected]</email>">
  24. <!ENTITY manusername "dannf">
  25. <!ENTITY manucpackage "<refentrytitle>METAFLAC</refentrytitle>">
  26. <!ENTITY manpackage "metaflac">
  27. ]>
  28. <refentry>
  29. <refentryinfo>
  30. <address>
  31. &manemail;
  32. </address>
  33. <author>
  34. &manfirstname;
  35. &mansurname;
  36. </author>
  37. <copyright>
  38. <year>2002-2005, 2011-2013</year>
  39. <holder>&manusername;</holder>
  40. </copyright>
  41. &mandate;
  42. </refentryinfo>
  43. <refmeta>
  44. &manucpackage;
  45. &mansection;
  46. </refmeta>
  47. <refnamediv>
  48. <refname>&manpackage;</refname>
  49. <refpurpose>
  50. program to list, add, remove, or edit metadata in one or more FLAC files.
  51. </refpurpose>
  52. </refnamediv>
  53. <refsynopsisdiv>
  54. <cmdsynopsis>
  55. <command>&manpackage;</command>
  56. <group choice="opt"><arg><replaceable>options</replaceable></arg></group>
  57. <group choice="opt">
  58. <arg><replaceable>operations</replaceable></arg></group>
  59. <arg rep="repeat" choice="req"><replaceable>FLACfile</replaceable></arg>
  60. </cmdsynopsis>
  61. </refsynopsisdiv>
  62. <refsect1>
  63. <title>DESCRIPTION</title>
  64. <para>Use <command>&manpackage;</command> to list, add, remove, or edit
  65. metadata in one or more FLAC files. You may perform one major operation,
  66. or many shorthand operations at a time.</para>
  67. </refsect1>
  68. <refsect1>
  69. <title>OPTIONS</title>
  70. <variablelist>
  71. <varlistentry>
  72. <term><option>--preserve-modtime</option></term>
  73. <listitem>
  74. <para>
  75. Preserve the original modification time in spite of edits.
  76. </para>
  77. </listitem>
  78. </varlistentry>
  79. <varlistentry>
  80. <term><option>--with-filename</option></term>
  81. <listitem>
  82. <para>
  83. Prefix each output line with the FLAC file name (the default if
  84. more than one FLAC file is specified).
  85. </para>
  86. </listitem>
  87. </varlistentry>
  88. <varlistentry>
  89. <term><option>--no-filename</option></term>
  90. <listitem>
  91. <para>
  92. Do not prefix each output line with the FLAC file name (the default
  93. if only one FLAC file is specified).
  94. </para>
  95. </listitem>
  96. </varlistentry>
  97. <varlistentry>
  98. <term><option>--no-utf8-convert</option></term>
  99. <listitem>
  100. <para>
  101. Do not convert tags from UTF-8 to local charset, or vice versa. This is
  102. useful for scripts, and setting tags in situations where the locale is wrong.
  103. </para>
  104. </listitem>
  105. </varlistentry>
  106. <varlistentry>
  107. <term><option>--dont-use-padding</option></term>
  108. <listitem>
  109. <para>
  110. By default metaflac tries to use padding where possible to avoid
  111. rewriting the entire file if the metadata size changes. Use this
  112. option to tell metaflac to not take advantage of padding this way.
  113. </para>
  114. </listitem>
  115. </varlistentry>
  116. </variablelist>
  117. </refsect1>
  118. <refsect1>
  119. <title>SHORTHAND OPERATIONS</title>
  120. <variablelist>
  121. <varlistentry>
  122. <term><option>--show-md5sum</option></term>
  123. <listitem>
  124. <para>
  125. Show the MD5 signature from the STREAMINFO block.
  126. </para>
  127. </listitem>
  128. </varlistentry>
  129. <varlistentry>
  130. <term><option>--show-min-blocksize</option></term>
  131. <listitem>
  132. <para>
  133. Show the minimum block size from the STREAMINFO block.
  134. </para>
  135. </listitem>
  136. </varlistentry>
  137. <varlistentry>
  138. <term><option>--show-max-blocksize</option></term>
  139. <listitem>
  140. <para>
  141. Show the maximum block size from the STREAMINFO block.
  142. </para>
  143. </listitem>
  144. </varlistentry>
  145. <varlistentry>
  146. <term><option>--show-min-framesize</option></term>
  147. <listitem>
  148. <para>
  149. Show the minimum frame size from the STREAMINFO block.
  150. </para>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry>
  154. <term><option>--show-max-framesize</option></term>
  155. <listitem>
  156. <para>
  157. Show the maximum frame size from the STREAMINFO block.
  158. </para>
  159. </listitem>
  160. </varlistentry>
  161. <varlistentry>
  162. <term><option>--show-sample-rate</option></term>
  163. <listitem>
  164. <para>
  165. Show the sample rate from the STREAMINFO block.
  166. </para>
  167. </listitem>
  168. </varlistentry>
  169. <varlistentry>
  170. <term><option>--show-channels</option></term>
  171. <listitem>
  172. <para>
  173. Show the number of channels from the STREAMINFO block.
  174. </para>
  175. </listitem>
  176. </varlistentry>
  177. <varlistentry>
  178. <term><option>--show-bps</option></term>
  179. <listitem>
  180. <para>
  181. Show the # of bits per sample from the STREAMINFO block.
  182. </para>
  183. </listitem>
  184. </varlistentry>
  185. <varlistentry>
  186. <term><option>--show-total-samples</option></term>
  187. <listitem>
  188. <para>
  189. Show the total # of samples from the STREAMINFO block.
  190. </para>
  191. </listitem>
  192. </varlistentry>
  193. <varlistentry>
  194. <term><option>--show-vendor-tag</option></term>
  195. <listitem>
  196. <para>
  197. Show the vendor string from the VORBIS_COMMENT block.
  198. </para>
  199. </listitem>
  200. </varlistentry>
  201. <varlistentry>
  202. <term><option>--show-tag=name</option></term>
  203. <listitem>
  204. <para>
  205. Show all tags where the field name matches 'name'.
  206. </para>
  207. </listitem>
  208. </varlistentry>
  209. <varlistentry>
  210. <term><option>--remove-tag=name</option></term>
  211. <listitem>
  212. <para>
  213. Remove all tags whose field name is 'name'.
  214. </para>
  215. </listitem>
  216. </varlistentry>
  217. <varlistentry>
  218. <term><option>--remove-first-tag=name</option></term>
  219. <listitem>
  220. <para>
  221. Remove first tag whose field name is 'name'.
  222. </para>
  223. </listitem>
  224. </varlistentry>
  225. <varlistentry>
  226. <term><option>--remove-all-tags</option></term>
  227. <listitem>
  228. <para>
  229. Remove all tags, leaving only the vendor string.
  230. </para>
  231. </listitem>
  232. </varlistentry>
  233. <varlistentry>
  234. <term><option>--set-tag=field</option></term>
  235. <listitem>
  236. <para>
  237. Add a tag. The field must comply with the
  238. Vorbis comment spec, of the form "NAME=VALUE". If there is
  239. currently no tag block, one will be created.
  240. </para>
  241. </listitem>
  242. </varlistentry>
  243. <varlistentry>
  244. <term><option>--set-tag-from-file=field</option></term>
  245. <listitem>
  246. <para>
  247. Like --set-tag, except the VALUE is a filename whose
  248. contents will be read verbatim to set the tag value.
  249. Unless --no-utf8-convert is specified, the contents will be
  250. converted to UTF-8 from the local charset. This can be used
  251. to store a cuesheet in a tag (e.g.
  252. --set-tag-from-file="CUESHEET=image.cue"). Do not try to
  253. store binary data in tag fields! Use APPLICATION blocks for
  254. that.
  255. </para>
  256. </listitem>
  257. </varlistentry>
  258. <varlistentry>
  259. <term><option>--import-tags-from=file</option></term>
  260. <listitem>
  261. <para>
  262. Import tags from a file. Use '-' for stdin. Each
  263. line should be of the form NAME=VALUE. Multi-line comments
  264. are currently not supported. Specify --remove-all-tags and/or
  265. --no-utf8-convert before --import-tags-from if necessary. If
  266. FILE is '-' (stdin), only one FLAC file may be specified.
  267. </para>
  268. </listitem>
  269. </varlistentry>
  270. <varlistentry>
  271. <term><option>--export-tags-to=file</option></term>
  272. <listitem>
  273. <para>
  274. Export tags to a file. Use '-' for stdout. Each
  275. line will be of the form NAME=VALUE. Specify
  276. --no-utf8-convert if necessary.
  277. </para>
  278. </listitem>
  279. </varlistentry>
  280. <varlistentry>
  281. <term><option>--import-cuesheet-from=file</option></term>
  282. <listitem>
  283. <para>
  284. Import a cuesheet from a file. Use '-' for stdin. Only one
  285. FLAC file may be specified. A seekpoint will be added for each
  286. index point in the cuesheet to the SEEKTABLE unless
  287. --no-cued-seekpoints is specified.
  288. </para>
  289. </listitem>
  290. </varlistentry>
  291. <varlistentry>
  292. <term><option>--export-cuesheet-to=file</option></term>
  293. <listitem>
  294. <para>
  295. Export CUESHEET block to a cuesheet file, suitable for use by
  296. CD authoring software. Use '-' for stdout. Only one FLAC file
  297. may be specified on the command line.
  298. </para>
  299. </listitem>
  300. </varlistentry>
  301. <varlistentry>
  302. <term><option>--import-picture-from</option>={<replaceable>FILENAME</replaceable>|<replaceable>SPECIFICATION</replaceable>}</term>
  303. <listitem>
  304. <para>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</para>
  305. <para>[TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE</para>
  306. <para>TYPE is optional; it is a number from one of:</para>
  307. <para>0: Other</para>
  308. <para>1: 32x32 pixels 'file icon' (PNG only)</para>
  309. <para>2: Other file icon</para>
  310. <para>3: Cover (front)</para>
  311. <para>4: Cover (back)</para>
  312. <para>5: Leaflet page</para>
  313. <para>6: Media (e.g. label side of CD)</para>
  314. <para>7: Lead artist/lead performer/soloist</para>
  315. <para>8: Artist/performer</para>
  316. <para>9: Conductor</para>
  317. <para>10: Band/Orchestra</para>
  318. <para>11: Composer</para>
  319. <para>12: Lyricist/text writer</para>
  320. <para>13: Recording Location</para>
  321. <para>14: During recording</para>
  322. <para>15: During performance</para>
  323. <para>16: Movie/video screen capture</para>
  324. <para>17: A bright coloured fish</para>
  325. <para>18: Illustration</para>
  326. <para>19: Band/artist logotype</para>
  327. <para>20: Publisher/Studio logotype</para>
  328. <para>The default is 3 (front cover). There may only be one picture each of type 1 and 2 in a file.</para>
  329. <para>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 --&gt; to mean that FILE is actually a URL to an image, though this use is discouraged.</para>
  330. <para>DESCRIPTION is optional; the default is an empty string.</para>
  331. <para>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.</para>
  332. <para>FILE is the path to the picture file to be imported, or the URL if MIME type is --&gt;</para>
  333. <para>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.</para>
  334. <para>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.</para>
  335. </listitem>
  336. </varlistentry>
  337. <varlistentry>
  338. <term><option>--export-picture-to=file</option></term>
  339. <listitem>
  340. <para>
  341. 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.
  342. </para>
  343. </listitem>
  344. </varlistentry>
  345. <varlistentry>
  346. <term><option>--add-replay-gain</option></term>
  347. <listitem>
  348. <para>
  349. Calculates the title and album gains/peaks of the given FLAC
  350. files as if all the files were part of one album, then stores
  351. them as FLAC tags. The tags are the same as
  352. those used by vorbisgain. Existing ReplayGain tags will be
  353. replaced. If only one FLAC file is given, the album and title
  354. gains will be the same. Since this operation requires two
  355. passes, it is always executed last, after all other operations
  356. have been completed and written to disk. All FLAC files
  357. specified must have the same resolution, sample rate, and
  358. number of channels. The sample rate must be one of 8, 11.025,
  359. 12, 16, 18.9, 22.05, 24, 28, 32, 37.8, 44.1, 48, 56, 64, 88.2,
  360. 96, 112, 128, 144, 176.4, or 192kHz.
  361. </para>
  362. </listitem>
  363. </varlistentry>
  364. <varlistentry>
  365. <term><option>--scan-replay-gain</option></term>
  366. <listitem>
  367. <para>
  368. Like --add-replay-gain, but only analyzes the files rather
  369. than writing them to the tags.
  370. </para>
  371. </listitem>
  372. </varlistentry>
  373. <varlistentry>
  374. <term><option>--remove-replay-gain</option></term>
  375. <listitem>
  376. <para>
  377. Removes the ReplayGain tags.
  378. </para>
  379. </listitem>
  380. </varlistentry>
  381. <varlistentry>
  382. <term><option>--add-seekpoint</option>={<replaceable>#</replaceable>|<replaceable>X</replaceable>|<replaceable>#x</replaceable>|<replaceable>#s</replaceable>}</term>
  383. <listitem>
  384. <para>
  385. Add seek points to a SEEKTABLE block. Using #, a seek point at
  386. that sample number is added. Using X, a placeholder point is
  387. added at the end of a the table. Using #x, # evenly spaced seek
  388. points will be added, the first being at sample 0. Using #s, a
  389. seekpoint will be added every # seconds (# does not have to be a
  390. whole number; it can be, for example, 9.5, meaning a seekpoint
  391. every 9.5 seconds). If no SEEKTABLE block exists, one will be
  392. created. If one already exists, points will be added to the
  393. existing table, and any duplicates will be turned into placeholder
  394. points. You may use many --add-seekpoint options; the resulting
  395. SEEKTABLE will be the unique-ified union of all such values.
  396. Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100
  397. evenly spaced seekpoints and a seekpoint every 3.5 seconds.
  398. </para>
  399. </listitem>
  400. </varlistentry>
  401. <varlistentry>
  402. <term><option>--add-padding=length</option></term>
  403. <listitem>
  404. <para>
  405. Add a padding block of the given length (in bytes). The overall
  406. length of the new block will be 4 + length; the extra 4 bytes is
  407. for the metadata block header.
  408. </para>
  409. </listitem>
  410. </varlistentry>
  411. </variablelist>
  412. </refsect1>
  413. <refsect1>
  414. <title>MAJOR OPERATIONS</title>
  415. <variablelist>
  416. <varlistentry>
  417. <term><option>--list</option></term>
  418. <listitem>
  419. <para>
  420. List the contents of one or more metadata blocks to stdout. By
  421. default, all metadata blocks are listed in text format. Use the
  422. following options to change this behavior:
  423. </para>
  424. <variablelist>
  425. <varlistentry>
  426. <term><option>--block-number=#[,#[...]]</option></term>
  427. <listitem>
  428. <para>
  429. An optional comma-separated list of block numbers to display.
  430. The first block, the STREAMINFO block, is block 0.
  431. </para>
  432. </listitem>
  433. </varlistentry>
  434. <varlistentry>
  435. <term><option>--block-type=type[,type[...]]</option></term>
  436. <listitem><para></para></listitem>
  437. </varlistentry>
  438. <varlistentry>
  439. <term><option>--except-block-type=type[,type[...]]</option></term>
  440. <listitem>
  441. <para>
  442. An optional comma-separated list of block types to be included
  443. or ignored with this option. Use only one of --block-type or
  444. --except-block-type. The valid block types are: STREAMINFO,
  445. PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT, PICTURE. You
  446. may narrow down the types of APPLICATION blocks displayed as
  447. follows:
  448. </para>
  449. <para>
  450. APPLICATION:abcd The APPLICATION block(s) whose textual repre-
  451. sentation of the 4-byte ID is "abcd"
  452. APPLICATION:0xXXXXXXXX The APPLICATION block(s) whose hexadecimal big-
  453. endian representation of the 4-byte ID is
  454. "0xXXXXXXXX". For the example "abcd" above the
  455. hexadecimal equivalalent is 0x61626364
  456. </para>
  457. <note>
  458. <para>
  459. if both --block-number and --[except-]block-type are
  460. specified, the result is the logical AND of both
  461. arguments.</para></note>
  462. </listitem>
  463. </varlistentry>
  464. <varlistentry>
  465. <term><option>--application-data-format=hexdump|text</option></term>
  466. <listitem>
  467. <para>
  468. If the application block you are displaying contains binary
  469. data but your --data-format=text, you can display a hex dump
  470. of the application data contents instead using
  471. --application-data-format=hexdump.
  472. </para>
  473. </listitem>
  474. </varlistentry>
  475. </variablelist>
  476. </listitem>
  477. </varlistentry>
  478. <varlistentry>
  479. <term><option>--remove</option></term>
  480. <listitem>
  481. <para>
  482. Remove one or more metadata blocks from the metadata. Unless
  483. --dont-use-padding is specified, the blocks will be replaced with
  484. padding. You may not remove the STREAMINFO block.
  485. </para>
  486. <variablelist>
  487. <varlistentry>
  488. <term><option>--block-number=#[,#[...]]</option></term>
  489. <listitem><para></para></listitem>
  490. </varlistentry>
  491. <varlistentry>
  492. <term><option>--block-type=type[,type[...]]</option></term>
  493. <listitem><para></para></listitem>
  494. </varlistentry>
  495. <varlistentry>
  496. <term><option>--except-block-type=type[,type[...]]</option></term>
  497. <listitem>
  498. <para>See --list above for usage.</para>
  499. <note>
  500. <para>
  501. if both --block-number and --[except-]block-type are
  502. specified, the result is the logical AND of both arguments.
  503. </para></note>
  504. </listitem>
  505. </varlistentry>
  506. </variablelist>
  507. </listitem>
  508. </varlistentry>
  509. <varlistentry>
  510. <term><option>--remove-all</option></term>
  511. <listitem>
  512. <para>
  513. Remove all metadata blocks (except the STREAMINFO block) from the
  514. metadata. Unless --dont-use-padding is specified, the blocks will
  515. be replaced with padding.
  516. </para>
  517. </listitem>
  518. </varlistentry>
  519. <varlistentry>
  520. <term><option>--merge-padding</option></term>
  521. <listitem>
  522. <para>
  523. Merge adjacent PADDING blocks into single blocks.
  524. </para>
  525. </listitem>
  526. </varlistentry>
  527. <varlistentry>
  528. <term><option>--sort-padding</option></term>
  529. <listitem>
  530. <para>
  531. Move all PADDING blocks to the end of the metadata and merge them
  532. into a single block.
  533. </para>
  534. </listitem>
  535. </varlistentry>
  536. </variablelist>
  537. </refsect1>
  538. <refsect1>
  539. <title>SEE ALSO</title>
  540. <para>flac(1).</para>
  541. </refsect1>
  542. </refentry>
  543. <!-- Keep this comment at the end of the file
  544. Local variables:
  545. mode: sgml
  546. sgml-omittag:t
  547. sgml-shorttag:t
  548. sgml-minimize-attributes:nil
  549. sgml-always-quote-attributes:t
  550. sgml-indent-step:2
  551. sgml-indent-data:t
  552. sgml-parent-document:nil
  553. sgml-default-dtd-file:nil
  554. sgml-exposed-tags:nil
  555. sgml-local-catalogs:nil
  556. sgml-local-ecat-files:nil
  557. End:
  558. -->