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 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  specifies the resolution and color information.
188              If 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       --scan-replay-gain
234              Like  --add-replay-gain, but only analyzes the files rather than
235              writing them to the tags.
236
237       --remove-replay-gain
238              Removes the ReplayGain tags.
239
240       --add-seekpoint={#|X|#x|#s}
241              Add seek points to a SEEKTABLE block.  Using #, a seek point  at
242              that  sample  number  is added.  Using X, a placeholder point is
243              added at the end of a the table.  Using #x, # evenly spaced seek
244              points  will be added, the first being at sample 0.  Using #s, a
245              seekpoint will be added every # seconds (# does not have to be a
246              whole  number;  it can be, for example, 9.5, meaning a seekpoint
247              every 9.5 seconds).  If no SEEKTABLE block exists, one  will  be
248              created.   If  one  already  exists, points will be added to the
249              existing table, and any duplicates will be  turned  into  place‐
250              holder  points.   You  may use many --add-seekpoint options; the
251              resulting SEEKTABLE will be the unique-ified union of  all  such
252              values.  Example: --add-seekpoint=100x --add-seekpoint=3.5s will
253              add 100 evenly spaced seekpoints and a seekpoint every 3.5  sec‐
254              onds.
255
256       --add-padding=length
257              Add a padding block of the given length (in bytes).  The overall
258              length of the new block will be 4 + length; the extra 4 bytes is
259              for the metadata block header.
260

MAJOR OPERATIONS

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

SEE ALSO

326       flac(1).
327
328
329
330                                  2013/04/30                       METAFLAC(1)
Impressum