1METAFLAC(1)                                                        METAFLAC(1)
2
3
4

NAME

6       metaflac  -  program  to  list, add, remove, or edit metadata in one or
7       more FLAC files.
8

SYNOPSIS

10       metaflac [ options ] [ operations ] FLACfile ...
11
12

DESCRIPTION

14       Use metaflac to list, add, remove, or edit metadata in one or more FLAC
15       files.   You  may perform one major operation, or many shorthand opera‐
16       tions at a time.
17

OPTIONS

19       --preserve-modtime
20              Preserve the original modification time in spite of edits.
21
22       --with-filename
23              Prefix each output line with the FLAC file name (the default  if
24              more than one FLAC file is specified).
25
26       --no-filename
27              Do  not  prefix  each  output  line with the FLAC file name (the
28              default if only one FLAC file is specified).
29
30       --no-utf8-convert
31              Do not convert tags from UTF-8 to local charset, or vice  versa.
32              This is useful for scripts, and setting tags in situations where
33              the locale is wrong.
34
35       --dont-use-padding
36              By default metaflac tries to use padding where possible to avoid
37              rewriting  the  entire  file  if the metadata size changes.  Use
38              this option to tell metaflac to not take  advantage  of  padding
39              this way.
40

SHORTHAND OPERATIONS

42       --show-md5sum
43              Show the MD5 signature from the STREAMINFO block.
44
45       --show-min-blocksize
46              Show the minimum block size from the STREAMINFO block.
47
48       --show-max-blocksize
49              Show the maximum block size from the STREAMINFO block.
50
51       --show-min-framesize
52              Show the minimum frame size from the STREAMINFO block.
53
54       --show-max-framesize
55              Show the maximum frame size from the STREAMINFO block.
56
57       --show-sample-rate
58              Show the sample rate from the STREAMINFO block.
59
60       --show-channels
61              Show the number of channels from the STREAMINFO block.
62
63       --show-bps
64              Show the # of bits per sample from the STREAMINFO block.
65
66       --show-total-samples
67              Show the total # of samples from the STREAMINFO block.
68
69       --show-vendor-tag
70              Show the vendor string from the VORBIS_COMMENT block.
71
72       --show-tag=name
73              Show all tags where the the field name matches 'name'.
74
75       --remove-tag=name
76              Remove all tags whose field name is 'name'.
77
78       --remove-first-tag=name
79              Remove first tag whose field name is 'name'.
80
81       --remove-all-tags
82              Remove all tags, leaving only the vendor string.
83
84       --set-tag=field
85              Add  a tag.  The field must comply with the Vorbis comment spec,
86              of the form "NAME=VALUE".  If there is currently no  tag  block,
87              one will be created.
88
89       --set-tag-from-file=field
90              Like  --set-tag,  except  the VALUE is a filename whose contents
91              will be read verbatim  to  set  the  tag  value.   Unless  --no-
92              utf8-convert  is  specified,  the  contents will be converted to
93              UTF-8 from the local charset.  This  can  be  used  to  store  a
94              cuesheet      in      a      tag      (e.g.      --set-tag-from-
95              file="CUESHEET=image.cue").  Do not try to store binary data  in
96              tag fields!  Use APPLICATION blocks for that.
97
98       --import-tags-from=file
99              Import  tags  from a file.  Use '-' for stdin.  Each line should
100              be of the form NAME=VALUE.  Multi-line  comments  are  currently
101              not  supported.  Specify --remove-all-tags and/or --no-utf8-con‐
102              vert before --import-tags-from if necessary.   If  FILE  is  '-'
103              (stdin), only one FLAC file may be specified.
104
105       --export-tags-to=file
106              Export  tags  to a file.  Use '-' for stdout.  Each line will be
107              of the form NAME=VALUE.  Specify --no-utf8-convert if necessary.
108
109       --import-cuesheet-from=file
110              Import a cuesheet from a file.  Use '-'  for  stdin.   Only  one
111              FLAC  file may be specified.  A seekpoint will be added for each
112              index point in the cuesheet to the SEEKTABLE  unless  --no-cued-
113              seekpoints is specified.
114
115       --export-cuesheet-to=file
116              Export CUESHEET block to a cuesheet file, suitable for use by CD
117              authoring software.  Use '-' for stdout.  Only one FLAC file may
118              be specified on the command line.
119
120       --import-picture-from={FILENAME|SPECIFICATION}
121              Import a picture and store it in a PICTURE metadata block.  More
122              than one --import-picture-from command can be specified.  Either
123              a filename for the picture file or a more complete specification
124              form can be used.  The SPECIFICATION is a string whose parts are
125              separated  by | (pipe) characters.  Some parts may be left empty
126              to invoke  default  values.   FILENAME  is  just  shorthand  for
127              "||||FILENAME".  The format of SPECIFICATION is
128
129              [TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COL‐
130              ORS]]|FILE
131
132              TYPE is optional; it is a number from one of:
133
134              0: Other
135
136              1: 32x32 pixels 'file icon' (PNG only)
137
138              2: Other file icon
139
140              3: Cover (front)
141
142              4: Cover (back)
143
144              5: Leaflet page
145
146              6: Media (e.g. label side of CD)
147
148              7: Lead artist/lead performer/soloist
149
150              8: Artist/performer
151
152              9: Conductor
153
154              10: Band/Orchestra
155
156              11: Composer
157
158              12: Lyricist/text writer
159
160              13: Recording Location
161
162              14: During recording
163
164              15: During performance
165
166              16: Movie/video screen capture
167
168              17: A bright coloured fish
169
170              18: Illustration
171
172              19: Band/artist logotype
173
174              20: Publisher/Studio logotype
175
176              The default is 3 (front cover).  There may only be  one  picture
177              each of type 1 and 2 in a file.
178
179              MIME-TYPE  is  optional; if left blank, it will be detected from
180              the file.  For best compatibility  with  players,  use  pictures
181              with  MIME type image/jpeg or image/png.  The MIME type can also
182              be --> to mean that FILE is actually a URL to an  image,  though
183              this use is discouraged.
184
185              DESCRIPTION is optional; the default is an empty string.
186
187              The next part specfies the resolution and color information.  If
188              the MIME-TYPE is image/jpeg, image/png, or  image/gif,  you  can
189              usually leave this empty and they can be detected from the file.
190              Otherwise, you must specify the width in pixels, height in  pix‐
191              els,  and  color  depth  in  bits-per-pixel.   If  the image has
192              indexed colors you should also  specify  the  number  of  colors
193              used.   When  manually  specified, it is not checked against the
194              file for accuracy.
195
196              FILE is the path to the picture file to be imported, or the  URL
197              if MIME type is -->
198
199              For  example,  "|image/jpeg|||../cover.jpg"  will embed the JPEG
200              file at ../cover.jpg, defaulting to type 3 (front cover) and  an
201              empty  description.   The  resolution  and  color  info  will be
202              retrieved from the file itself.
203
204              The                                                specification
205              "4|-->|CD|320x300x24/173|http://blah.blah/backcover.tiff"   will
206              embed the given URL, with type 4 (back cover), description "CD",
207              and  a  manually  specified  resolution of 320x300, 24 bits-per-
208              pixel, and 173 colors.  The file at the URL will not be fetched;
209              the URL itself is stored in the PICTURE metadata block.
210
211       --export-picture-to=file
212              Export  PICTURE  block to a file.  Use '-' for stdout.  Only one
213              FLAC file may be specified on the command line.  The first  PIC‐
214              TURE  block  will be exported unless --export-picture-to is pre‐
215              ceded by a --block-number=# option to specify the exact metadata
216              block  to  extract.  Note that the block number is the one shown
217              by --list.
218
219       --add-replay-gain
220              Calculates the title and album gains/peaks  of  the  given  FLAC
221              files  as  if  all the files were part of one album, then stores
222              them as FLAC tags.  The tags are the same as those used by  vor‐
223              bisgain.   Existing  ReplayGain  tags will be replaced.  If only
224              one FLAC file is given, the album and title gains  will  be  the
225              same.   Since  this  operation requires two passes, it is always
226              executed last, after all other operations  have  been  completed
227              and  written  to  disk.   All FLAC files specified must have the
228              same resolution, sample rate, and number of channels.  The  sam‐
229              ple  rate must be one of 8, 11.025, 12, 16, 18.9, 22.05, 24, 28,
230              32, 37.8, 44.1, 48, 56, 64, 88.2, 96, 112, 128, 144,  176.4,  or
231              192kHz.
232
233       --remove-replay-gain
234              Removes the ReplayGain tags.
235
236       --add-seekpoint={#|X|#x|#s}
237              Add  seek points to a SEEKTABLE block.  Using #, a seek point at
238              that sample number is added.  Using X, a  placeholder  point  is
239              added at the end of a the table.  Using #x, # evenly spaced seek
240              points will be added, the first being at sample 0.  Using #s,  a
241              seekpoint will be added every # seconds (# does not have to be a
242              whole number; it can be, for example, 9.5, meaning  a  seekpoint
243              every  9.5  seconds).  If no SEEKTABLE block exists, one will be
244              created.  If one already exists, points will  be  added  to  the
245              existing  table,  and  any duplicates will be turned into place‐
246              holder points.  You may use many  --add-seekpoint  options;  the
247              resulting  SEEKTABLE  will be the unique-ified union of all such
248              values.  Example: --add-seekpoint=100x --add-seekpoint=3.5s will
249              add  100 evenly spaced seekpoints and a seekpoint every 3.5 sec‐
250              onds.
251
252       --add-padding=length
253              Add a padding block of the given length (in bytes).  The overall
254              length of the new block will be 4 + length; the extra 4 bytes is
255              for the metadata block header.
256

MAJOR OPERATIONS

258       --list List the contents of one or more metadata blocks to stdout.   By
259              default, all metadata blocks are listed in text format.  Use the
260              following options to change this behavior:
261
262              --block-number=#[,#[...]]
263                     An optional comma-separated list of block numbers to dis‐
264                     play.  The first block, the STREAMINFO block, is block 0.
265
266              --block-type=type[,type[...]]
267
268              --except-block-type=type[,type[...]]
269                     An  optional  comma-separated  list  of block types to be
270                     included or ignored with this option.  Use  only  one  of
271                     --block-type  or  --except-block-type.   The  valid block
272                     types are: STREAMINFO, PADDING,  APPLICATION,  SEEKTABLE,
273                     VORBIS_COMMENT,  PICTURE.   You may narrow down the types
274                     of APPLICATION blocks displayed as follows:
275
276                     APPLICATION:abcd        The  APPLICATION  block(s)  whose
277                     textual  repre-  sentation  of  the  4-byte  ID is "abcd"
278                     APPLICATION:0xXXXXXXXX  The  APPLICATION  block(s)  whose
279                     hexadecimal  big-  endian representation of the 4-byte ID
280                     is "0xXXXXXXXX".  For the example "abcd" above the  hexa‐
281                     decimal equivalalent is 0x61626364
282
283                     Note:  if  both  --block-number and --[except-]block-type
284                     are specified, the result is  the  logical  AND  of  both
285                     arguments.
286
287              --application-data-format=hexdump|text
288                     If  the  application  block  you  are displaying contains
289                     binary data but your --data-format=text, you can  display
290                     a hex dump of the application data contents instead using
291                     --application-data-format=hexdump.
292
293       --remove
294              Remove one or more metadata blocks from  the  metadata.   Unless
295              --dont-use-padding  is  specified,  the  blocks will be replaced
296              with padding.  You may not remove the STREAMINFO block.
297
298              --block-number=#[,#[...]]
299
300              --block-type=type[,type[...]]
301
302              --except-block-type=type[,type[...]]
303                     See --list above for usage.
304
305                     Note: if both  --block-number  and  --[except-]block-type
306                     are  specified,  the  result  is  the logical AND of both
307                     arguments.
308
309       --remove-all
310              Remove all metadata blocks (except the  STREAMINFO  block)  from
311              the  metadata.   Unless  --dont-use-padding  is  specified,  the
312              blocks will be replaced with padding.
313
314       --merge-padding
315              Merge adjacent PADDING blocks into single blocks.
316
317       --sort-padding
318              Move all PADDING blocks to the end of  the  metadata  and  merge
319              them into a single block.
320

SEE ALSO

322       flac(1).
323
324
325
326                                  2013/04/30                       METAFLAC(1)
Impressum