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

MAJOR OPERATIONS

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

SEE ALSO

321       flac(1).
322
323
324
325                               14 September 2007                   METAFLAC(1)
Impressum