1metaflac(1)         Free Lossless Audio Codec metadata tool        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

DESCRIPTION

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

GENERAL USAGE

18       metaflac is the command-line .flac file metadata editor.  You  can  use
19       it  to  list  the  contents  of metadata blocks, edit, delete or insert
20       blocks, and manage padding.
21
22       metaflac takes a set of “options” (though some are not optional) and  a
23       set of FLAC files to operate on.  There are three kinds of “options”:
24
25       • Major  operations,  which  specify  a  mode of operation like listing
26         blocks, removing blocks, etc.  These  will  have  sub-operations  de‐
27         scribing exactly what is to be done.
28
29       • Shorthand  operations, which are convenient synonyms for major opera‐
30         tions.  For example, there is a shorthand operation –show-sample-rate
31         that  shows  just  the sample rate field from the STREAMINFO metadata
32         block.
33
34       • Global options, which affect all the operations.
35
36       All of these are described in the tables below.  At least one shorthand
37       or  major  operation  must be supplied.  You can use multiple shorthand
38       operations to do more than one thing to a file or set of  files.   Most
39       of  the  common things to do to metadata have shorthand operations.  As
40       an example, here is how to show the MD5 signatures for a set  of  three
41       FLAC files:
42
43       metaflac --show-md5sum file1.flac file2.flac file3.flac
44
45       Another example; this removes all DESCRIPTION and COMMENT tags in a set
46       of FLAC files, and uses the –preserve-modtime global option to keep the
47       FLAC  file  modification  times the same (usually when files are edited
48       the modification time is set to the current time):
49
50       metaflac --preserve-modtime --remove-tag=DESCRIPTION  --remove-tag=COM‐
51       MENT file1.flac file2.flac file3.flac
52

OPTIONS

54       --preserve-modtime
55              Preserve the original modification time in spite of edits.
56
57       --with-filename
58              Prefix  each output line with the FLAC file name (the default if
59              more than one FLAC file is specified).  This option has  no  ef‐
60              fect for options exporting to a file, like –export-tags-to.
61
62       --no-filename
63              Do  not prefix each output line with the FLAC file name (the de‐
64              fault if only one FLAC file is specified).
65
66       --no-utf8-convert
67              Do not convert tags from UTF-8 to local charset, or vice  versa.
68              This is useful for scripts, and setting tags in situations where
69              the locale is wrong.
70
71       --dont-use-padding
72              By default metaflac tries to use padding where possible to avoid
73              rewriting  the  entire  file  if the metadata size changes.  Use
74              this option to tell metaflac to not take  advantage  of  padding
75              this way.
76

SHORTHAND OPERATIONS

78       --show-md5sum
79              Show the MD5 signature from the STREAMINFO block.
80
81       --show-min-blocksize
82              Show the minimum block size from the STREAMINFO block.
83
84       --show-max-blocksize
85              Show the maximum block size from the STREAMINFO block.
86
87       --show-min-framesize
88              Show the minimum frame size from the STREAMINFO block.
89
90       --show-max-framesize
91              Show the maximum frame size from the STREAMINFO block.
92
93       --show-sample-rate
94              Show the sample rate from the STREAMINFO block.
95
96       --show-channels
97              Show the number of channels from the STREAMINFO block.
98
99       --show-bps
100              Show the # of bits per sample from the STREAMINFO block.
101
102       --show-total-samples
103              Show the total # of samples from the STREAMINFO block.
104
105       --show-vendor-tag
106              Show the vendor string from the VORBIS_COMMENT block.
107
108       --show-tag=name
109              Show all tags where the field name matches `name'.
110
111       --show-all-tags
112              Show all tags.  This is an alias for –export-tags-to=-.
113
114       --remove-tag=name
115              Remove all tags whose field name is `name'.
116
117       --remove-first-tag=name
118              Remove first tag whose field name is `name'.
119
120       --remove-all-tags
121              Remove all tags, leaving only the vendor string.
122
123       --remove-all-tags-except=NAME1[=NAME2[=...]]
124              Remove  all  tags,  except  the  vendor string and the tag names
125              specified.  Tag names must be separated by an = character.
126
127       --set-tag=field
128              Add a tag.  The field must comply with the Vorbis comment  spec,
129              of  the  form “NAME=VALUE”.  If there is currently no tag block,
130              one will be created.
131
132       --set-tag-from-file=field
133              Like --set-tag, except the VALUE is a  filename  whose  contents
134              will  be  read  verbatim  to  set  the  tag value.  Unless --no-
135              utf8-convert is specified, the contents  will  be  converted  to
136              UTF-8  from  the  local  charset.   This  can be used to store a
137              cuesheet  in  a  tag  (e.g.    --set-tag-from-file=“CUESHEET=im‐
138              age.cue”).   Do  not try to store binary data in tag fields! Use
139              APPLICATION blocks for that.
140
141       --import-tags-from=file
142              Import tags from a file.  Use `-' for stdin.  Each  line  should
143              be  of  the  form NAME=VALUE.  Multi-line comments are currently
144              not supported.  Specify --remove-all-tags and/or  --no-utf8-con‐
145              vert  before  --import-tags-from  if  necessary.  If FILE is `-'
146              (stdin), only one FLAC file may be specified.
147
148       --export-tags-to=file
149              Export tags to a file.  Use `-' for stdout.  Each line  will  be
150              of the form NAME=VALUE.  Specify --no-utf8-convert if necessary.
151
152       --import-cuesheet-from=file
153              Import  a  cuesheet  from  a file.  Use `-' for stdin.  Only one
154              FLAC file may be specified.  A seekpoint will be added for  each
155              index  point  in the cuesheet to the SEEKTABLE unless --no-cued-
156              seekpoints is specified.
157
158       --export-cuesheet-to=file
159              Export CUESHEET block to a cuesheet file, suitable for use by CD
160              authoring software.  Use `-' for stdout.  Only one FLAC file may
161              be specified on the command line.
162
163       --import-picture-from={FILENAME|SPECIFICATION}
164              Import a picture and store it in a PICTURE metadata block.  More
165              than one --import-picture-from command can be specified.  Either
166              a filename for the picture file or a more complete specification
167              form can be used.  The SPECIFICATION is a string whose parts are
168              separated by | (pipe) characters.  Some parts may be left  empty
169              to  invoke  default  values.   FILENAME  is  just  shorthand for
170              “||||FILENAME”.  For details on the specification, see the  sec‐
171              tion Picture specification in the flac(1) man page.
172
173       --export-picture-to=file
174              Export  PICTURE  block to a file.  Use `-' for stdout.  Only one
175              FLAC file may be specified on the command line.  The first  PIC‐
176              TURE  block  will be exported unless --export-picture-to is pre‐
177              ceded by a --block-number=# option to specify the exact metadata
178              block  to  extract.  Note that the block number is the one shown
179              by --list.
180
181       --add-replay-gain
182              Calculates the title and album gains/peaks  of  the  given  FLAC
183              files  as  if  all the files were part of one album, then stores
184              them as FLAC tags.  The tags are the same as those used by  vor‐
185              bisgain.   Existing  ReplayGain  tags will be replaced.  If only
186              one FLAC file is given, the album and title gains  will  be  the
187              same.   Since  this  operation requires two passes, it is always
188              executed last, after all other operations  have  been  completed
189              and  written  to  disk.   All FLAC files specified must have the
190              same resolution, sample rate, and number of channels.  Only mono
191              and  stereo  files  are  allowed, and the sample rate must be 8,
192              11.025, 12, 16, 18.9, 22.05, 24, 28, 32, 36, 37.8, 44.1, 48, 56,
193              64,  72,  75.6, 88.2, 96, 112, 128, 144, 151.2, 176.4, 192, 224,
194              256, 288, 302.4, 352.8, 384, 448, 512, 576, or 604.8 kHz.
195
196       --scan-replay-gain
197              Like --add-replay-gain, but only analyzes the files rather  than
198              writing them to the tags.
199
200       --remove-replay-gain
201              Removes the ReplayGain tags.
202
203       --add-seekpoint={#|X|#x|#s}
204              Add  seek points to a SEEKTABLE block.  Using #, a seek point at
205              that sample number is added.  Using X, a  placeholder  point  is
206              added at the end of a the table.  Using #x, # evenly spaced seek
207              points will be added, the first being at sample 0.  Using #s,  a
208              seekpoint will be added every # seconds (# does not have to be a
209              whole number; it can be, for example, 9.5, meaning  a  seekpoint
210              every  9.5  seconds).  If no SEEKTABLE block exists, one will be
211              created.  If one already exists, points will be added to the ex‐
212              isting table, and any duplicates will be turned into placeholder
213              points.  You may use many --add-seekpoint options; the resulting
214              SEEKTABLE  will  be  the  unique-ified union of all such values.
215              Example: --add-seekpoint=100x --add-seekpoint=3.5s will add  100
216              evenly spaced seekpoints and a seekpoint every 3.5 seconds.
217
218       --add-padding=length
219              Add a padding block of the given length (in bytes).  The overall
220              length of the new block will be 4 + length; the extra 4 bytes is
221              for the metadata block header.
222

MAJOR OPERATIONS

224       --list List  the contents of one or more metadata blocks to stdout.  By
225              default, all metadata blocks are listed in text format.  Use the
226              options  --block-number,  --block-type or --except-block-type to
227              change this behavior.
228
229       --remove
230              Remove one or more metadata blocks from the metadata.   Use  the
231              options  --block-number,  --block-type or --except-block-type to
232              specify which blocks should  be  removed.   Note  that  if  both
233              --block-number  and --[except-]block-type are specified, the re‐
234              sult is the logical AND of both arguments.   Unless  --dont-use-
235              padding  is specified, the blocks will be replaced with padding.
236              You may not remove the STREAMINFO block.
237
238       --block-number=#[,#[...]]
239              An optional comma-separated list of block  numbers  to  display.
240              The first block, the STREAMINFO block, is block 0.
241
242       --block-type=type[,type[...]]
243
244       --except-block-type=type[,type[...]]
245              An  optional  comma-separated list of block types to be included
246              or ignored with this option.  Use only one  of  --block-type  or
247              --except-block-type.   The  valid  block  types are: STREAMINFO,
248              PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT,  PICTURE.   You
249              may  narrow down the types of APPLICATION blocks selected by ap‐
250              pending APPLICATION with a colon and the ID of  the  APPLICATION
251              block  in either ASCII or hexadecimal representation.  E.g.  AP‐
252              PLICATION:abcd for the APPLICATION block(s) whose textual repre‐
253              sentation  of  the 4-byte ID is “abcd” or APPLICATION:0xXXXXXXXX
254              for the APPLICATION block(s) whose hexadecimal big- endian  rep‐
255              resentation  of  the 4-byte ID is “0xXXXXXXXX”.  For the example
256              “abcd” above the hexadecimal equivalalent is 0x61626364
257
258       --application-data-format=hexdump|text
259              If the application block you are displaying contains binary data
260              but  your  --data-format=text, you can display a hex dump of the
261              application data contents instead using  --application-data-for‐
262              mat=hexdump.
263
264       --data-format=binary|binary-headerless|text
265              For  use with –list.  By default a human-readable text represen‐
266              tation of the data is  isplayed.   You  may  specify  –data-for‐
267              mat=binary  to  dump the raw binary form of each metadata block.
268              Specify –data-format=binary-headerless to omit output of metada‐
269              ta  block  headers,  including  the  id  of APPLICATION metadata
270              blocks.
271
272       --append
273              Insert a metadata block from a file.   This  must  be  a  binary
274              block as exported with –list –data-format=binary.  The insertion
275              point is defined with –block-number=#.  The new  block  will  be
276              added  after  the given block number.  This prevents the illegal
277              insertion of a block before the first STREAMINFO block.  You may
278              not  –append another STREAMINFO block.  It is possible to copy a
279              metadata block from one file to another with this  option.   For
280              example  use  metaflac  --list --data-format=binary --block-num‐
281              ber=6 file.flac > block to export the block, and then import  it
282              with metaflac --append anotherfile.flac < block
283
284       --remove-all
285              Remove  all  metadata  blocks (except the STREAMINFO block) from
286              the  metadata.   Unless  --dont-use-padding  is  specified,  the
287              blocks will be replaced with padding.
288
289       --merge-padding
290              Merge adjacent PADDING blocks into single blocks.
291
292       --sort-padding
293              Move  all  PADDING  blocks  to the end of the metadata and merge
294              them into a single block.
295

SEE ALSO

297       flac(1)
298
299
300
301Version 1.4.3                                                      metaflac(1)
Impressum