Lines Matching +full:- +full:- +full:out
1 /* metaflac - Command-line FLAC metadata editor
2 * Copyright (C) 2001-2009 Josh Coalson
3 * Copyright (C) 2011-2016 Xiph.Org Foundation
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 static void usage_header(FILE *out) in usage_header() argument
32 fprintf(out, "==============================================================================\n"); in usage_header()
33 fprintf(out, "metaflac - Command-line FLAC metadata editor version %s\n", FLAC__VERSION_STRING); in usage_header()
34 fprintf(out, "Copyright (C) 2001-2009 Josh Coalson\n"); in usage_header()
35 fprintf(out, "Copyright (C) 2011-2016 Xiph.Org Foundation\n"); in usage_header()
36 fprintf(out, "\n"); in usage_header()
37 fprintf(out, "This program is free software; you can redistribute it and/or\n"); in usage_header()
38 fprintf(out, "modify it under the terms of the GNU General Public License\n"); in usage_header()
39 fprintf(out, "as published by the Free Software Foundation; either version 2\n"); in usage_header()
40 fprintf(out, "of the License, or (at your option) any later version.\n"); in usage_header()
41 fprintf(out, "\n"); in usage_header()
42 fprintf(out, "This program is distributed in the hope that it will be useful,\n"); in usage_header()
43 fprintf(out, "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); in usage_header()
44 fprintf(out, "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"); in usage_header()
45 fprintf(out, "GNU General Public License for more details.\n"); in usage_header()
46 fprintf(out, "\n"); in usage_header()
47 fprintf(out, "You should have received a copy of the GNU General Public License along\n"); in usage_header()
48 fprintf(out, "with this program; if not, write to the Free Software Foundation, Inc.,\n"); in usage_header()
49 fprintf(out, "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n"); in usage_header()
50 fprintf(out, "==============================================================================\n"); in usage_header()
53 static void usage_summary(FILE *out) in usage_summary() argument
55 fprintf(out, "Usage:\n"); in usage_summary()
56 fprintf(out, " metaflac [options] [operations] FLACfile [FLACfile ...]\n"); in usage_summary()
57 fprintf(out, "\n"); in usage_summary()
58 fprintf(out, "Use metaflac to list, add, remove, or edit metadata in one or more FLAC files.\n"); in usage_summary()
59 fprintf(out, "You may perform one major operation, or many shorthand operations at a time.\n"); in usage_summary()
60 fprintf(out, "\n"); in usage_summary()
61 fprintf(out, "Options:\n"); in usage_summary()
62 fprintf(out, "--preserve-modtime Preserve the original modification time in spite of edits\n"); in usage_summary()
63 fprintf(out, "--with-filename Prefix each output line with the FLAC file name\n"); in usage_summary()
64 fprintf(out, " (the default if more than one FLAC file is specified)\n"); in usage_summary()
65 fprintf(out, "--no-filename Do not prefix each output line with the FLAC file name\n"); in usage_summary()
66 fprintf(out, " (the default if only one FLAC file is specified)\n"); in usage_summary()
67 fprintf(out, "--no-utf8-convert Do not convert tags from UTF-8 to local charset,\n"); in usage_summary()
68 fprintf(out, " or vice versa. This is useful for scripts, and setting\n"); in usage_summary()
69 fprintf(out, " tags in situations where the locale is wrong.\n"); in usage_summary()
70 fprintf(out, "--dont-use-padding By default metaflac tries to use padding where possible\n"); in usage_summary()
71 fprintf(out, " to avoid rewriting the entire file if the metadata size\n"); in usage_summary()
72 fprintf(out, " changes. Use this option to tell metaflac to not take\n"); in usage_summary()
73 fprintf(out, " advantage of padding this way.\n"); in usage_summary()
90 flac_fprintf(stderr, "This is the short help; for full help use 'metaflac --help'\n"); in short_usage()
99 FILE *out = (message? stderr : stdout); in long_usage() local
110 usage_header(out); in long_usage()
111 fprintf(out, "\n"); in long_usage()
112 usage_summary(out); in long_usage()
113 fprintf(out, "\n"); in long_usage()
114 fprintf(out, "Shorthand operations:\n"); in long_usage()
115 fprintf(out, "--show-md5sum Show the MD5 signature from the STREAMINFO block.\n"); in long_usage()
116 fprintf(out, "--show-min-blocksize Show the minimum block size from the STREAMINFO block.\n"); in long_usage()
117 fprintf(out, "--show-max-blocksize Show the maximum block size from the STREAMINFO block.\n"); in long_usage()
118 fprintf(out, "--show-min-framesize Show the minimum frame size from the STREAMINFO block.\n"); in long_usage()
119 fprintf(out, "--show-max-framesize Show the maximum frame size from the STREAMINFO block.\n"); in long_usage()
120 fprintf(out, "--show-sample-rate Show the sample rate from the STREAMINFO block.\n"); in long_usage()
121 fprintf(out, "--show-channels Show the number of channels from the STREAMINFO block.\n"); in long_usage()
122 fprintf(out, "--show-bps Show the # of bits per sample from the STREAMINFO block.\n"); in long_usage()
123 fprintf(out, "--show-total-samples Show the total # of samples from the STREAMINFO block.\n"); in long_usage()
124 fprintf(out, "\n"); in long_usage()
125 fprintf(out, "--show-vendor-tag Show the vendor string from the VORBIS_COMMENT block.\n"); in long_usage()
126 fprintf(out, "--show-tag=NAME Show all tags where the field name matches 'NAME'.\n"); in long_usage()
127 fprintf(out, "--remove-tag=NAME Remove all tags whose field name is 'NAME'.\n"); in long_usage()
128 fprintf(out, "--remove-first-tag=NAME Remove first tag whose field name is 'NAME'.\n"); in long_usage()
129 fprintf(out, "--remove-all-tags Remove all tags, leaving only the vendor string.\n"); in long_usage()
130 fprintf(out, "--set-tag=FIELD Add a tag. The FIELD must comply with the Vorbis comment\n"); in long_usage()
131 fprintf(out, " spec, of the form \"NAME=VALUE\". If there is currently\n"); in long_usage()
132 fprintf(out, " no tag block, one will be created.\n"); in long_usage()
133 fprintf(out, "--set-tag-from-file=FIELD Like --set-tag, except the VALUE is a filename\n"); in long_usage()
134 fprintf(out, " whose contents will be read verbatim to set the tag value.\n"); in long_usage()
135 fprintf(out, " Unless --no-utf8-convert is specified, the contents will\n"); in long_usage()
136 fprintf(out, " be converted to UTF-8 from the local charset. This can\n"); in long_usage()
137 fprintf(out, " be used to store a cuesheet in a tag (e.g.\n"); in long_usage()
138 fprintf(out, " --set-tag-from-file=\"CUESHEET=image.cue\"). Do not try\n"); in long_usage()
139 fprintf(out, " to store binary data in tag fields! Use APPLICATION\n"); in long_usage()
140 fprintf(out, " blocks for that.\n"); in long_usage()
141 fprintf(out, "--import-tags-from=FILE Import tags from a file. Use '-' for stdin. Each line\n"); in long_usage()
142 fprintf(out, " should be of the form NAME=VALUE. Multi-line comments\n"); in long_usage()
143 fprintf(out, " are currently not supported. Specify --remove-all-tags\n"); in long_usage()
144 fprintf(out, " and/or --no-utf8-convert before --import-tags-from if\n"); in long_usage()
145 fprintf(out, " necessary. If FILE is '-' (stdin), only one FLAC file\n"); in long_usage()
146 fprintf(out, " may be specified.\n"); in long_usage()
147 fprintf(out, "--export-tags-to=FILE Export tags to a file. Use '-' for stdout. Each line\n"); in long_usage()
148 fprintf(out, " will be of the form NAME=VALUE. Specify\n"); in long_usage()
149 fprintf(out, " --no-utf8-convert if necessary.\n"); in long_usage()
150 fprintf(out, "--import-cuesheet-from=FILE Import a cuesheet from a file. Use '-' for stdin.\n"); in long_usage()
151 fprintf(out, " Only one FLAC file may be specified. A seekpoint will be\n"); in long_usage()
152 fprintf(out, " added for each index point in the cuesheet to the\n"); in long_usage()
153 fprintf(out, " SEEKTABLE unless --no-cued-seekpoints is specified.\n"); in long_usage()
154 fprintf(out, "--export-cuesheet-to=FILE Export CUESHEET block to a cuesheet file, suitable\n"); in long_usage()
155 fprintf(out, " for use by CD authoring software. Use '-' for stdout.\n"); in long_usage()
156 fprintf(out, " Only one FLAC file may be specified on the command line.\n"); in long_usage()
157 fprintf(out, "--import-picture-from=FILENAME|SPECIFICATION Import a picture and store it in a\n"); in long_usage()
158 fprintf(out, " PICTURE block. Either a filename for the picture file or\n"); in long_usage()
159 fprintf(out, " a more complete specification form can be used. The\n"); in long_usage()
160 fprintf(out, " SPECIFICATION is a string whose parts are separated by |\n"); in long_usage()
161 fprintf(out, " characters. Some parts may be left empty to invoke\n"); in long_usage()
162 fprintf(out, " default values. FILENAME is just shorthand for\n"); in long_usage()
163 fprintf(out, " \"||||FILENAME\". The format of SPECIFICATION is:\n"); in long_usage()
164 fprintf(out, " [TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE\n"); in long_usage()
165 fprintf(out, " TYPE is optional; it is a number from one of:\n"); in long_usage()
166 fprintf(out, " 0: Other\n"); in long_usage()
167 fprintf(out, " 1: 32x32 pixels 'file icon' (PNG only)\n"); in long_usage()
168 fprintf(out, " 2: Other file icon\n"); in long_usage()
169 fprintf(out, " 3: Cover (front)\n"); in long_usage()
170 fprintf(out, " 4: Cover (back)\n"); in long_usage()
171 fprintf(out, " 5: Leaflet page\n"); in long_usage()
172 fprintf(out, " 6: Media (e.g. label side of CD)\n"); in long_usage()
173 fprintf(out, " 7: Lead artist/lead performer/soloist\n"); in long_usage()
174 fprintf(out, " 8: Artist/performer\n"); in long_usage()
175 fprintf(out, " 9: Conductor\n"); in long_usage()
176 fprintf(out, " 10: Band/Orchestra\n"); in long_usage()
177 fprintf(out, " 11: Composer\n"); in long_usage()
178 fprintf(out, " 12: Lyricist/text writer\n"); in long_usage()
179 fprintf(out, " 13: Recording Location\n"); in long_usage()
180 fprintf(out, " 14: During recording\n"); in long_usage()
181 fprintf(out, " 15: During performance\n"); in long_usage()
182 fprintf(out, " 16: Movie/video screen capture\n"); in long_usage()
183 fprintf(out, " 17: A bright coloured fish\n"); in long_usage()
184 fprintf(out, " 18: Illustration\n"); in long_usage()
185 fprintf(out, " 19: Band/artist logotype\n"); in long_usage()
186 fprintf(out, " 20: Publisher/Studio logotype\n"); in long_usage()
187 fprintf(out, " The default is 3 (front cover). There may only be one picture each\n"); in long_usage()
188 fprintf(out, " of type 1 and 2 in a file.\n"); in long_usage()
189 fprintf(out, " MIME-TYPE is optional; if left blank, it will be detected from the\n"); in long_usage()
190 fprintf(out, " file. For best compatibility with players, use pictures with MIME\n"); in long_usage()
191 fprintf(out, " type image/jpeg or image/png. The MIME type can also be --> to\n"); in long_usage()
192 fprintf(out, " mean that FILE is actually a URL to an image, though this use is\n"); in long_usage()
193 fprintf(out, " discouraged.\n"); in long_usage()
194 fprintf(out, " DESCRIPTION is optional; the default is an empty string\n"); in long_usage()
195 fprintf(out, " The next part specifies the resolution and color information. If\n"); in long_usage()
196 fprintf(out, " the MIME-TYPE is image/jpeg, image/png, or image/gif, you can\n"); in long_usage()
197 fprintf(out, " usually leave this empty and they can be detected from the file.\n"); in long_usage()
198 fprintf(out, " Otherwise, you must specify the width in pixels, height in pixels,\n"); in long_usage()
199 fprintf(out, " and color depth in bits-per-pixel. If the image has indexed colors\n"); in long_usage()
200 fprintf(out, " you should also specify the number of colors used.\n"); in long_usage()
201 fprintf(out, " FILE is the path to the picture file to be imported, or the URL if\n"); in long_usage()
202 fprintf(out, " MIME type is -->\n"); in long_usage()
203 fprintf(out, "--export-picture-to=FILE Export PICTURE block to a file. Use '-' for stdout.\n"); in long_usage()
204 fprintf(out, " Only one FLAC file may be specified. The first PICTURE\n"); in long_usage()
205 fprintf(out, " block will be exported unless --export-picture-to is\n"); in long_usage()
206 fprintf(out, " preceded by a --block-number=# option to specify the exact\n"); in long_usage()
207 fprintf(out, " metadata block to extract. Note that the block number is\n"); in long_usage()
208 fprintf(out, " the one shown by --list.\n"); in long_usage()
209 fprintf(out, "--add-replay-gain Calculates the title and album gains/peaks of the given\n"); in long_usage()
210 fprintf(out, " FLAC files as if all the files were part of one album,\n"); in long_usage()
211 fprintf(out, " then stores them in the VORBIS_COMMENT block. The tags\n"); in long_usage()
212 fprintf(out, " are the same as those used by vorbisgain. Existing\n"); in long_usage()
213 fprintf(out, " ReplayGain tags will be replaced. If only one FLAC file\n"); in long_usage()
214 fprintf(out, " is given, the album and title gains will be the same.\n"); in long_usage()
215 fprintf(out, " Since this operation requires two passes, it is always\n"); in long_usage()
216 fprintf(out, " executed last, after all other operations have been\n"); in long_usage()
217 fprintf(out, " completed and written to disk. All FLAC files specified\n"); in long_usage()
218 fprintf(out, " must have the same resolution, sample rate, and number\n"); in long_usage()
219 fprintf(out, " of channels. The sample rate must be one of 8, 11.025,\n"); in long_usage()
220 fprintf(out, " 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.\n"); in long_usage()
221 fprintf(out, "--scan-replay-gain Like --add-replay-gain, but only analyzes the files\n"); in long_usage()
222 fprintf(out, " rather than writing them to tags.\n"); in long_usage()
223 fprintf(out, "--remove-replay-gain Removes the ReplayGain tags.\n"); in long_usage()
224 fprintf(out, "--add-seekpoint={#|X|#x|#s} Add seek points to a SEEKTABLE block\n"); in long_usage()
225 fprintf(out, " # : a specific sample number for a seek point\n"); in long_usage()
226 fprintf(out, " X : a placeholder point (always goes at the end of the SEEKTABLE)\n"); in long_usage()
227 fprintf(out, " #x : # evenly spaced seekpoints, the first being at sample 0\n"); in long_usage()
228 fprintf(out, " #s : a seekpoint every # seconds; # does not have to be a whole number\n"); in long_usage()
229 fprintf(out, " If no SEEKTABLE block exists, one will be created. If\n"); in long_usage()
230 fprintf(out, " one already exists, points will be added to the existing\n"); in long_usage()
231 fprintf(out, " table, and any duplicates will be turned into placeholder\n"); in long_usage()
232 fprintf(out, " points. You may use many --add-seekpoint options; the\n"); in long_usage()
233 fprintf(out, " resulting SEEKTABLE will be the unique-ified union of\n"); in long_usage()
234 fprintf(out, " all such values. Example: --add-seekpoint=100x\n"); in long_usage()
235 fprintf(out, " --add-seekpoint=3.5s will add 100 evenly spaced\n"); in long_usage()
236 fprintf(out, " seekpoints and a seekpoint every 3.5 seconds.\n"); in long_usage()
237 fprintf(out, "--add-padding=length Add a padding block of the given length (in bytes).\n"); in long_usage()
238 fprintf(out, " The overall length of the new block will be 4 + length;\n"); in long_usage()
239 fprintf(out, " the extra 4 bytes is for the metadata block header.\n"); in long_usage()
240 fprintf(out, "\n"); in long_usage()
241 fprintf(out, "Major operations:\n"); in long_usage()
242 fprintf(out, "--version\n"); in long_usage()
243 fprintf(out, " Show the metaflac version number.\n"); in long_usage()
244 fprintf(out, "--list\n"); in long_usage()
245 fprintf(out, " List the contents of one or more metadata blocks to stdout. By default,\n"); in long_usage()
246 fprintf(out, " all metadata blocks are listed in text format. Use the following options\n"); in long_usage()
247 fprintf(out, " to change this behavior:\n"); in long_usage()
248 fprintf(out, "\n"); in long_usage()
249 fprintf(out, " --block-number=#[,#[...]]\n"); in long_usage()
250 fprintf(out, " An optional comma-separated list of block numbers to display. The first\n"); in long_usage()
251 fprintf(out, " block, the STREAMINFO block, is block 0.\n"); in long_usage()
252 fprintf(out, "\n"); in long_usage()
253 fprintf(out, " --block-type=type[,type[...]]\n"); in long_usage()
254 fprintf(out, " --except-block-type=type[,type[...]]\n"); in long_usage()
255 fprintf(out, " An optional comma-separated list of block types to be included or ignored\n"); in long_usage()
256 fprintf(out, " with this option. Use only one of --block-type or --except-block-type.\n"); in long_usage()
257 fprintf(out, " The valid block types are: STREAMINFO, PADDING, APPLICATION, SEEKTABLE,\n"); in long_usage()
258 fprintf(out, " VORBIS_COMMENT. You may narrow down the types of APPLICATION blocks\n"); in long_usage()
259 fprintf(out, " displayed as follows:\n"); in long_usage()
260 fprintf(out, " APPLICATION:abcd The APPLICATION block(s) whose textual repre-\n"); in long_usage()
261 fprintf(out, " sentation of the 4-byte ID is \"abcd\"\n"); in long_usage()
262 fprintf(out, " APPLICATION:0xXXXXXXXX The APPLICATION block(s) whose hexadecimal big-\n"); in long_usage()
263 fprintf(out, " endian representation of the 4-byte ID is\n"); in long_usage()
264 …fprintf(out, " \"0xXXXXXXXX\". For the example \"abcd\" above the\… in long_usage()
265 fprintf(out, " hexadecimal equivalalent is 0x61626364\n"); in long_usage()
266 fprintf(out, "\n"); in long_usage()
267 fprintf(out, " NOTE: if both --block-number and --[except-]block-type are specified,\n"); in long_usage()
268 fprintf(out, " the result is the logical AND of both arguments.\n"); in long_usage()
269 fprintf(out, "\n"); in long_usage()
272 fprintf(out, " --data-format=binary|text\n"); in long_usage()
273 fprintf(out, " By default a human-readable text representation of the data is displayed.\n"); in long_usage()
274 fprintf(out, " You may specify --data-format=binary to dump the raw binary form of each\n"); in long_usage()
275 fprintf(out, " metadata block. The output can be read in using a subsequent call to\n"); in long_usage()
276 fprintf(out, " "metaflac --append --from-file=..."\n"); in long_usage()
277 fprintf(out, "\n"); in long_usage()
279 fprintf(out, " --application-data-format=hexdump|text\n"); in long_usage()
280 fprintf(out, " If the application block you are displaying contains binary data but your\n"); in long_usage()
281 fprintf(out, " --data-format=text, you can display a hex dump of the application data\n"); in long_usage()
282 fprintf(out, " contents instead using --application-data-format=hexdump\n"); in long_usage()
283 fprintf(out, "\n"); in long_usage()
286 fprintf(out, "--append\n"); in long_usage()
287 fprintf(out, " Insert a metadata block from a file. The input file must be in the same\n"); in long_usage()
288 fprintf(out, " format as generated with --list.\n"); in long_usage()
289 fprintf(out, "\n"); in long_usage()
290 fprintf(out, " --block-number=#\n"); in long_usage()
291 fprintf(out, " Specify the insertion point (defaults to last block). The new block will\n"); in long_usage()
292 fprintf(out, " be added after the given block number. This prevents the illegal insertion\n"); in long_usage()
293 fprintf(out, " of a block before the first STREAMINFO block. You may not --append another\n"); in long_usage()
294 fprintf(out, " STREAMINFO block.\n"); in long_usage()
295 fprintf(out, "\n"); in long_usage()
296 fprintf(out, " --from-file=filename\n"); in long_usage()
297 fprintf(out, " Mandatory 'option' to specify the input file containing the block contents.\n"); in long_usage()
298 fprintf(out, "\n"); in long_usage()
299 fprintf(out, " --data-format=binary|text\n"); in long_usage()
300 fprintf(out, " By default the block contents are assumed to be in binary format. You can\n"); in long_usage()
301 fprintf(out, " override this by specifying --data-format=text\n"); in long_usage()
302 fprintf(out, "\n"); in long_usage()
304 fprintf(out, "--remove\n"); in long_usage()
305 fprintf(out, " Remove one or more metadata blocks from the metadata. Unless\n"); in long_usage()
306 fprintf(out, " --dont-use-padding is specified, the blocks will be replaced with padding.\n"); in long_usage()
307 fprintf(out, " You may not remove the STREAMINFO block.\n"); in long_usage()
308 fprintf(out, "\n"); in long_usage()
309 fprintf(out, " --block-number=#[,#[...]]\n"); in long_usage()
310 fprintf(out, " --block-type=type[,type[...]]\n"); in long_usage()
311 fprintf(out, " --except-block-type=type[,type[...]]\n"); in long_usage()
312 fprintf(out, " See --list above for usage.\n"); in long_usage()
313 fprintf(out, "\n"); in long_usage()
314 fprintf(out, " NOTE: if both --block-number and --[except-]block-type are specified,\n"); in long_usage()
315 fprintf(out, " the result is the logical AND of both arguments.\n"); in long_usage()
316 fprintf(out, "\n"); in long_usage()
317 fprintf(out, "--remove-all\n"); in long_usage()
318 fprintf(out, " Remove all metadata blocks (except the STREAMINFO block) from the\n"); in long_usage()
319 fprintf(out, " metadata. Unless --dont-use-padding is specified, the blocks will be\n"); in long_usage()
320 fprintf(out, " replaced with padding.\n"); in long_usage()
321 fprintf(out, "\n"); in long_usage()
322 fprintf(out, "--merge-padding\n"); in long_usage()
323 fprintf(out, " Merge adjacent PADDING blocks into single blocks.\n"); in long_usage()
324 fprintf(out, "\n"); in long_usage()
325 fprintf(out, "--sort-padding\n"); in long_usage()
326 fprintf(out, " Move all PADDING blocks to the end of the metadata and merge them into a\n"); in long_usage()
327 fprintf(out, " single block.\n"); in long_usage()