Debian Codegraph @

USAGE

raw
1
2 % lame [options] inputfile [outputfile]
3 inputfile and/or outputfile can be "-", which means stdin/stdout.
4
5 For more options, just type:
6 % lame --help or lame --longhelp
7
8 Note: The HTML documentation is more complete than this text file.
9
10
11 =======================================================================
12 Constant Bitrate Examples:
13 =======================================================================
14 fixed bit rate jstereo 128 kbps encoding:
15 % lame -b128 sample.wav sample.mp3
16
17 Use highest quality mode, slowest:
18 % lame -q0 -b128 sample.wav sample.mp3
19
20 Use fast encode, low quality (no noise shaping)
21 % lame -f -b128 sample.wav sample.mp3
22
23
24 =======================================================================
25 Variable Bitrate Examples:
26 =======================================================================
27 LAME has two types of variable bitrate: ABR and VBR.
28
29 ABR is the type of variable bitrate encoding usually found in other
30 MP3 encoders, Vorbis and AAC. The number of bits is determined by
31 some metric (like perceptual entropy, or just the number of bits
32 needed for a certain set of encoding tables), and it is not based on
33 computing the actual encoding/quantization error. ABR should always
34 give results equal or better than CBR:
35
36 ABR: (--abr <x> means encode with an average bitrate of around x kbps)
37 % lame --abr 128 sample.wav sample.mp3
38
39 Another way to enable abr is:
40 % lame --preset 128 sample.wav sample.mp3
41
42
43 VBR is a true variable bitrate mode which bases the number of bits for
44 each frame on the measured quantization error relative to the
45 estimated allowed masking. The value 0 is the highest quality, which
46 creates bigger files, and the lowest is 9.999, which creates the smallest
47 files. Decimal values can be specified, like: 4.51.
48 The resulting filesizes depend on the input material. On typical music
49 you can expect -V5 resulting in files averaging 132 kbps, -V2 averaging
50 200 kbps.
51
52 Variable Bitrate (VBR): (use -V n to adjust quality/filesize)
53 % lame -V2 sample.wav sample.mp3
54
55
56 =======================================================================
57 Low Bitrates
58 =======================================================================
59 At lower bitrates, (like 24 kbps per channel), it is recommended that
60 you use a 16 kHz sampling rate combined with lowpass filtering. LAME,
61 as well as commercial encoders (FhG, Xing) will do this automatically.
62 However, if you feel there is too much (or not enough) lowpass
63 filtering, you may need to try different values of the lowpass cutoff
64 and passband width (--resample, --lowpass and --lowpass-width options).
65
66
67 =======================================================================
68 Streaming Example
69 =======================================================================
70
71 % cat inputfile | lame [options] - - > output
72
73
74 =======================================================================
75 Scripts are included (in the 'misc' subdirectory)
76 to run lame on multiple files:
77
78 bash script: mlame Run "mlame -?" for instructions.
79 sh script: auenc Run auenc for instructions
80 sh script: mugeco.sh
81
82 Perl script which will re-encode mp3 files and preserve id3 tags:
83 lameid3.pl
84
85 Windows scripts:
86 lame4dos.bat
87 Lame.vbs (and an HTML frontend: LameGUI.html)
88
89
90 =======================================================================
91 options guide:
92 =======================================================================
93 These options are explained in detail below.
94
95 By default, LAME accepts a PCM audio sample inside a .WAV container as the
96 input file, in 8, 16, 24 and 32 bits integer and in IEEE FLOAT.
97 If it is compiled with libsndfile, then it also supports the extra formats
98 that the library supports.
99 There is also support for raw PCM data and piped input
100
101
102 Input options:
103 --scale <arg> multiply PCM input by <arg>
104 --scale-l <arg> scale channel 0 (left) input (multiply PCM data) by <arg>
105 --scale-r <arg> scale channel 1 (right) input (multiply PCM data) by <arg>
106 --gain number apply Gain adjustment in decibels, range -20.0 to +12.0.
107 --swap-channel Swap Left and Right input channels
108 --mp1input input file is an MPEG 1 Layer I file. decode on the fly
109 --mp2input input file is an MPEG 1 Layer II file. decode on the fly
110 --mp3input input file is an MPEG 1 Layer III file. decode on the fly
111 --nogap <file1> <file2> <...>
112 gapless encoding for a set of contiguous files
113 --nogapout <dir>
114 output dir for gapless encoding (must precede --nogap)
115 --nogaptags allow the use of VBR tags in gapless encoding
116 --out-dir path If no explicit output file is specified, a file will be
117 written at given path. Ignored when using piped/streamed input
118
119
120 Input options for raw PCM:
121 -r read the input file as a raw (headerless) PCM stream
122 -s n input sampling frequency in kHz (Default 44.1Khz)
123 --signed input is signed (default)
124 --unsigned input is unsigned
125 --bitwidth w input bit width is w (default 16)
126 -x swap bytes of input file
127 --little-endian input is little-endian (default)
128 --big-endian input is big-endian
129 -a downmix stereo file to mono file for mono encoding.
130 Needed with raw input for the -mm mode to do the downmix.
131
132 Resampling and filtering:
133 --lowpass Frequency(kHz), lowpass filter cutoff above freq.
134 Range [0.001..50]kHz or [50..50000]Hz
135 --lowpass-width
136 Frequency(kHz), lowpass window width.
137 Range [0.001..16]kHz or [16..50000]Hz
138 (See further restriction in the detailed explanation)
139 --highpass Frequency(kHz), highpass filter cutoff below freq.
140 Range [0.001..16]kHz or [16..50000]Hz
141 (See further restriction in the detailed explanation)
142 --highpass-width
143 Frequency(kHz), highpass window width
144 (See further restriction in the detailed explanation)
145 --resample n Sampling frequency of output file(kHz)
146 Default=automatic depending on settings like bitrate.
147
148 Operational:
149 --preset type Enables some preconfigured settings. Check below for each
150 of the valid values
151 --decode assume input file is an mp3 file, and decode to wav.
152 --decode-mp3delay samples
153 Set the encoder delay to use to decode the input .mp3 file
154 -t disable writing of WAV header when using --decode
155 (decode to raw pcm, native endian format (use -x to swap))
156
157 -m m/s/j/f/a mode selection
158 -q n Internal algorithm quality setting 0..9.
159 0 = slowest algorithms, but potentially highest quality
160 9 = faster algorithms, very poor quality
161 Default is 3. Read the differences between VBR and CBR below.
162 -h same as -q2
163 -f same as -q7
164
165 --priority <type>
166 sets the process priority (Windows and OS/2-specific):
167 0,1 = Low priority (IDLE_PRIORITY_CLASS)
168 2 = normal priority (NORMAL_PRIORITY_CLASS, defaul
169 3,4 = High priority (HIGH_PRIORITY_CLASS))
170 Note: Calling '--priority' without a parameter will set it to 0.
171
172
173
174 Constant Bit Rate (CBR)
175 -b n set bitrate (8, 16, 24, ..., 320)
176 --freeformat produce a free format bitstream. User must also specify
177 a bitrate with -b, between 8 and 640 kbps.
178
179 Variable Bit Rate (VBR)
180 -v VBR ( alias of -V 4 )
181 --vbr-old use old variable bitrate (VBR) routine
182 --vbr-new use new variable bitrate (VBR) routine (default)
183 -V n VBR quality setting (0=highest quality, 9.999=lowest)
184 -b n specify a minimum allowed bitrate (8,16,24,...,320)
185 -B n specify a maximum allowed bitrate (8,16,24,...,320)
186 -F strictly enforce minimum bitrate
187 -t disable VBR informational tag
188 --nohist disable display of VBR bitrate histogram
189
190 --abr n specify average bitrate desired
191
192
193
194 MP3 header/stream options:
195 -e n/5/c de-emphasis
196 -p add CRC error protection
197 -c mark the encoded file as copyrighted
198 -o mark the encoded file as a copy
199 -S don't print progress report, VBR histogram
200 --strictly-enforce-ISO comply as much as possible to ISO MPEG spec
201 --replaygain-fast compute RG fast but slightly inaccurately (default)
202 --replaygain-accurate compute RG more accurately and find the peak sample
203 --noreplaygain disable ReplayGain analysis
204 --clipdetect enable --replaygain-accurate and print a message whether
205 clipping occurs and how far the waveform is from full scale
206
207
208 ID3 tagging:
209
210 --tt <title> audio/song title (max 30 chars for version 1 tag)
211 --ta <artist> audio/song artist (max 30 chars for version 1 tag)
212 --tl <album> audio/song album (max 30 chars for version 1 tag)
213 --ty <year> audio/song year of issue (1 to 9999)
214 --tc <comment> user-defined text (max 30 chars for v1 tag, 28 for v1.1)
215 --tn <track[/total]>
216 audio/song track number (1 to 255, creates v1.1 tag.
217 adding a total force a version 2 tag)
218 --tg <genre> audio/song genre (name or number in list)
219 --ti <file> audio/song albumArt (jpeg/png/gif file, v2.3 tag)
220 --tv <id=value> user-defined frame specified by id and value (v2.3 tag)
221 --add-id3v2 force addition of version 2 tag
222 --id3v1-only add only a version 1 tag
223 --id3v2-only add only a version 2 tag
224 --id3v2-utf16 add following options in unicode text encoding
225 --id3v2-latin1 add following options in latin-1 text encoding
226 --space-id3v1 pad version 1 tag with spaces instead of nulls
227 --pad-id3v2 same as '--pad-id3v2-size 128'
228 --pad-id3v2-size <num>
229 adds version 2 tag, pad with extra <num> bytes
230 --genre-list print alphabetically sorted ID3 genre list and exit
231 --ignore-tag-errors
232 ignore errors in values passed for tags
233
234 Note: A version 2 tag will NOT be added unless one of the input fields
235 won't fit in a version 1 tag (e.g. the title string is longer than 30
236 characters), or the '--add-id3v2' or '--id3v2-only' options are used,
237 or output is redirected to stdout.
238
239
240 Verbosity:
241 --disptime secs Print progress report every secs seconds
242 --nohist Disable VBR histogram display
243 --silent Don't print anything on screen
244 --quiet Don't print anything on screen
245 --verbose Print a lot of useful information
246 --version Print License information
247 --license Print License information
248 --help Shows the common list of switches.
249 Add id3 or dev to get help for a specified topic
250 --usage Shows the common list of switches.
251 Add id3 or dev to get help for a specified topic
252 --longhelp Shows the complete list of switches
253
254
255
256 =======================================================================
257 Detailed description of all options in alphabetical order
258 =======================================================================
259
260
261 =======================================================================
262 Downmix
263 =======================================================================
264 -a
265
266 mix the stereo input file to mono and encode as mono.
267
268 This option is only needed in the case of raw PCM stereo input
269 (because LAME cannot determine the number of channels in the input file).
270 To encode a stereo (RAW) PCM input file as mono, use "lame -m m -a"
271
272 For WAV and AIFF input files, using "-m m" will always produce a
273 mono .mp3 file from both mono and stereo input.
274
275
276 =======================================================================
277 Average bitrate encoding (aka Safe VBR)
278 =======================================================================
279 --abr n
280
281 turns on encoding with a targeted average bitrate of n kbps, allowing
282 to use frames of different sizes. The allowed range of n is 8...320
283 kbps, you can use any integer value within that range.
284
285
286 =======================================================================
287 Use version 2 of the ID3 tag standard
288 =======================================================================
289 --add-id3v2 Force addition of version 2 tag
290
291 Tells LAME to add the tag information as id3v2. This implies adding both,
292 a version 1 and a version 2 tag, if the values fit on a version 1 tag.
293 See --id3v1-only and --id3v2-only if you want a more fine-grained control.
294
295
296 =======================================================================
297 Bitrate
298 =======================================================================
299 -b n
300
301 MPEG-1 layer III sample frequencies (kHz): 32 48 44.1
302 bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320
303
304 MPEG-2 layer III sample frequencies (kHz): 16 24 22.05
305 bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
306
307 MPEG-2.5 layer III sample frequencies (kHz): 8 12 11.025
308 bitrates (kbps): 8 16 24 32 40 48 56 64
309
310 The bitrate to be used. Default is 128kbps in MPEG1 (64 for mono),
311 64kbps in MPEG2 (32 for mono) and 32kbps in MPEG2.5 (16 for mono).
312
313 When used with variable bitrate encodings (VBR), -b specifies the
314 minimum bitrate to use. This is useful only if you need to circumvent
315 a buggy hardware device with strange bitrate constrains.
316
317
318 =======================================================================
319 Max bitrate
320 =======================================================================
321 -B n
322
323 see also option "-b" for allowed bitrates.
324
325 Maximum allowed bitrate when using VBR/ABR.
326
327 Using -B is NOT RECOMMENDED. A 128 kbps CBR bitstream, because of the
328 bit reservoir, can actually have frames which use as many bits as a
329 320 kbps frame. ABR/VBR modes minimize the use of the bit reservoir, and
330 thus need to allow 320 kbps frames to get the same flexability as CBR
331 streams. This is useful only if you need to circumvent a buggy hardware
332 device with strange bitrate constrains.
333
334
335 =======================================================================
336 Endianess, big.
337 =======================================================================
338 --big-endian Set the byte order to big-endian.
339
340 This switch tells LAME that the RAW pcm input is encoded in big-endian
341 instead of little-endian.
342
343
344 =======================================================================
345 Sample bit with
346 =======================================================================
347 --bitwidth Sets the bitwidth value
348
349 With RAW pcm input, this switch lets you specify the bitwidth of the same
350 (8 bits, 16 bits...)
351
352
353 =======================================================================
354 Copyright
355 =======================================================================
356 -c
357
358 flag the encoded file as copyrighted
359
360
361 =======================================================================
362 Clipping detection
363 =======================================================================
364 --clipdetect
365
366 Enable --replaygain-accurate and print a message whether clipping
367 occurs and how far in dB the waveform is from full scale.
368
369 This option is not usable if the MP3 decoder was _explicitly_ disabled
370 in the build of LAME.
371
372 See also: --replaygain-accurate
373
374
375 =======================================================================
376 MPEG audio decode capability
377 =======================================================================
378 --decode
379
380 This uses LAME's HIP decoder to decode an MP3 file (layers 1, 2 and 3) to
381 a wav file.
382
383 If -t is used (disable wav header), LAME will output
384 raw pcm in native endian format (use -x to swap bytes).
385
386 This option is not usable if the MP3 decoder was _explicitly_ disabled
387 in the build of LAME.
388
389 HIP stands for Hip Isn't a Player and is based off of Michael Hipp's mpglib 0.2a
390
391
392 =======================================================================
393 MPEG audio decode capability
394 =======================================================================
395 --decode-mp3delay x Indicate a different encoder delay for decoding
396
397 When decoding an mp3 file, LAME automatically corrects for the start delay
398 that the encoder had to put into it. This setting lets you specify a different
399 delay than LAME's own one, so that it is possible to compensate for the delay
400 of mp3's generated with other encoders.
401
402
403 =======================================================================
404 De-emphasis
405 =======================================================================
406 -e n/5/c
407
408 n = (none, default)
409 5 = 0/15 microseconds
410 c = CCITT j.17
411
412 All this does is set a flag in the bitstream. If you have a PCM
413 input file where one of the above types of (obsolete) emphasis has
414 been applied, you can set this flag in LAME. Then the mp3 decoder
415 should de-emphasize the output during playback, although most
416 decoders ignore this flag.
417
418 A better solution would be to apply the de-emphasis with a standalone
419 utility before encoding, and then encode without -e.
420
421
422 =======================================================================
423 Strictly enforce VBR minimum bitrate
424 =======================================================================
425 -F
426
427 strictly enforce VBR minimum bitrate. Without this option, passages of
428 analog silence will be encoded at the minimum bitrate possible (32 or 8,
429 depending on MPEG version).
430
431
432 =======================================================================
433 Free format bitstreams
434 =======================================================================
435 --freeformat
436
437 LAME will produce a fixed bitrate, free format bitstream. User must
438 specify the desired bitrate in kbps, which can be any integer between
439 8 and 640.
440
441 Not supported by most decoders. Complient decoders (of which there
442 are few) are only required to support up to 320 kbps.
443
444 Decoders known to handle free format:
445
446 supports up to
447 mpg123 640 kbps
448 MAD 640 kbps
449 "lame --decode" 640 kbps
450 l3dec 310 kbps
451
452
453 =======================================================================
454 Gain
455 =======================================================================
456 --gain Apply gain in decibels.
457
458 Apply Gain adjustment in decibels, range -20.0 to +12.0. 0dBFS means no
459 amplification.
460
461
462 =======================================================================
463 High pass filter
464 =======================================================================
465 --highpass number Use a highpass filter when encoding
466
467 Enables a highpass filter of the specified frequency when encoding the source.
468 Range [0.001..50]kHz or [50..50000]Hz.
469 This is usually not required, and the gains are usually minimal. May be useful
470 to remove an interference signal on 50Hz or 60Hz, or a DC offset.
471 (default: disabled)
472 Note: The current implementation has a minimum highpass frequency of
473 (67.5/62)% of the sample rate (I.e. 481Hz at 44Khz).
474
475
476 =======================================================================
477 High pass filter
478 =======================================================================
479 --highpass-width width Set the width of the decaying curve.
480
481 Specify the width in Hz of the decaying curve of the highpass.
482 Range [16..50000]Hz
483 The minimum (and default) width is 75% of a band's width (which is 1/64th of
484 the sample rate).
485 Note: See the remark in the --highpass command above.
486
487
488 =======================================================================
489 ID3 tag modes
490 =======================================================================
491 --id3v1-only Disable the use of id3v2.
492
493 Put it before any tag setting.
494 This setting tells LAME to use ID3 v1 tag only, and not create an ID3v2
495 even if it thinks it should.
496
497 --id3v2-only Disable the user ov id3v1.
498
499 Put it before any tag setting.
500 This setting tells LAME to use ID3 v2 tag only. An ID3 v1 tag would not
501 be written.
502
503 --ignore-tag-errors Ignore tag information errors
504
505 Put it before any tag setting.
506 This tells lame to ignore the tag information it sees as erroneous and
507 continue encoding without those. Without this setting, errors are reported
508 and encoding does not start.
509
510
511 =======================================================================
512 Endianess. little
513 =======================================================================
514 --little-endian Set the byte order to little-endian.
515
516 This switch tells LAME that the RAW pcm input is encoded in little-endian.
517 It is the default setting.
518
519
520 =======================================================================
521 Low pass filter
522 =======================================================================
523 --lowpass number Use a lowpass filter when encoding
524
525 Enables a lowpass filter of the specified frequency when encoding the source.
526 Range [0.001..50]kHz or [50..50000]Hz
527
528 Using a lowpass filter helps reducing the amount of data to encode. This is
529 important in MP3 due to a limitation in very high frequencies (>16Khz).
530 The default value depends on the target bitrate/quality. It is not recommended
531 to change it as a general basis.
532
533 --lowpass-width width Set the width of the decaying curve.
534
535 Specify the width in Hz of the decaying curve of the lowpass.
536 Range [0.001..16]kHz or [16..50000]Hz
537 The lowpass is in the center of this curve. The minimum (and default) width
538 is 75% of a band's width (which is 1/64th of the sample rate).
539
540
541 =======================================================================
542 Modes:
543 =======================================================================
544 -m m mono
545 -m l get only the left channel of a stereo signal for a mono output
546 -m r get only the right channel of a stereo signal for a mono output
547 -m s (forced) L/R stereo
548 -m j joint stereo
549 -m f forced mid/side stereo
550 -m d dual (independent) channels. Its purpose was meant for dual language
551 streams where only one of them should be decoded.
552 Most decoders just decode them as a stereo stream.
553 -m a Currently, a synonym of m j. (In older releases it selected
554 different modes depending on the bitrate)
555
556 MONO is the default mode for mono input files. If "-m m" is specified
557 for a stereo input file, the two channels will be averaged into a mono
558 signal. (Note: See comments about the -a switch for RAW PCM streams)
559
560 (FORCED) L/R STEREO encodes the left and the right signals independently,
561 and gives more or less bits to each, depending on the currently available.
562
563 JOINT STEREO is the default mode of encoding.
564 jstereo means the encoder can use (on a frame by frame basis) either
565 L/R stereo or mid/side stereo. In mid/side stereo, the mid(L+R) and side(L-R)
566 channels are encoded, and more bits are allocated to the mid channel
567 than the side channel. When there isn't too much stereo separation, this
568 effectively increases the bandwidth, so having higher quality with the same
569 amount of bits.
570
571 Using mid/side stereo inappropriately can result in audible
572 compression artifacts. Too much switching between mid/side and L/R
573 stereo can also sound bad. To determine when to switch to mid/side
574 stereo, LAME uses a much more sophisticated algorithm than that
575 described in the ISO documentation.
576
577 FORCED MID/SIDE STEREO forces all frames to be encoded mid/side stereo. It
578 should only be used if you are sure every frame of the input file
579 has very little stereo seperation.
580
581 DUAL CHANNEL mode is similar to encode the left and right as two mono signals.
582 Its purpose was meant for Dual language streams where only one of them should
583 be decoded. Most decoders just decode them as a stereo stream
584
585 INTENSITY STEREO
586 Not supported.
587
588
589 =======================================================================
590 MP3 input file
591 =======================================================================
592 --mp1input --mp2input --mp3input MPEG layer I, II or III input file
593
594 Assume the input file is a MP1/2/3 file. LAME will decode the input file
595 before re-encoding it. Since MP3 is a lossy format, this is not recommended
596 in general. But it is useful for creating low bitrate mp3s from high bitrate
597 mp3s. If the filename ends in ".mp3" LAME will assume it is an MP3. For
598 stdin or MP3 files which dont end in .mp3 you need to use this switch.
599
600
601 =======================================================================
602 No Gap (continuous audio) encoding of multiple files
603 =======================================================================
604 --nogap file1 file2 [...] Encodes multiple continuous files.
605
606 Encodes multiple files (ordered by position) which are meant to be played
607 gaplessly.
608
609 By default, LAME will encode the files with accurate length, but the first
610 and last frame may contain a few erroneous samples for signals that don't
611 fade-in/out (as is the case of continuous playback).
612
613 This setting solves that by using the samples from the next/previous file to
614 compute the encoding.
615
616 --nogapout dir Specify a directory for the output of the files encoded
617 with --nogap
618
619 This setting should precede --nogap, and is used to specify the alternate
620 directory where to store the encoded files. The default one is the input file
621 directory.
622
623 --nogaptags Enables the use of VBR tags with files encoded with --nogap
624
625 Tells LAME to put VBR tags to encoded files if they are encoded in VBR or ABR
626 modes. Else, using the --nogap option doesn't generate it.
627
628
629 =======================================================================
630 Disable historgram display
631 =======================================================================
632 --nohist
633
634 By default, LAME will display a bitrate histogram while producing
635 VBR mp3 files. This will disable that feature.
636
637
638 =======================================================================
639 Disable ReplayGain analysis
640 =======================================================================
641 --noreplaygain
642
643 By default ReplayGain analysis is enabled. This switch disables it.
644
645 See also: --replaygain-accurate, --replaygain-fast
646
647
648 =======================================================================
649 Non-original
650 =======================================================================
651 -o
652
653 mark the encoded file as a copy
654
655
656 =======================================================================
657 CRC error protection
658 =======================================================================
659 -p
660
661 Turn on CRC error protection.
662 It will add a cyclic redundancy check (CRC) code in each frame, allowing
663 to detect transmission errors that could occur on the MP3 stream. However,
664 it takes 16 bits per frame that would otherwise be used for encoding, and
665 therefore will slightly reduce the sound quality.
666
667
668 =======================================================================
669 ID3 V2 padding
670 =======================================================================
671 --pad-id3v2 Pad ID3v2 tag.
672
673 Pads the ID3v2 tag with extra 128bytes to allow it to expand.
674
675
676 =======================================================================
677 Preset system.
678 =======================================================================
679 --preset x Enable one of the presets
680
681 Setting Meaning
682 --preset medium -V 5
683 --preset standard -V 2
684 --preset extreme -V 0
685 --preset insane -b 320
686 --preset fast xxx In versions older than LAME 3.98, "fast" was needed to
687 enable the vbr-new routine. It is no longer needed.
688 --preset number --abr number
689 --preset cbr number -b number
690
691 Old compatibility settings. Meaningless
692 --preset phone -b 16 -m m
693 --preset phon+ /
694 lw / mw-eu -b 24 -m m
695 --preset mw-us -b 40 -m m
696 --preset voice -b 56 -m m
697 --preset fm / radio -b 112
698 --preset hifi -b 160
699 --preset cd -b 192
700 --preset studio -b 256
701
702
703 =======================================================================
704 Windows and OS/2 process priority control
705 =======================================================================
706 --priority <type>
707
708 (Windows and OS/2 only)
709
710 Sets the process priority for LAME while running under Windows or IBM OS/2.
711 This can be very useful to avoid the system becoming slow and/or unresponsive.
712 By setting LAME to run in a lower priority, you leave more time for the system
713 to update basic processing (drawing windows, polling keyboard/mouse, etc). The
714 impact in LAME's performance is minimal if you use priority 0 to 2.
715
716 The valid parameters are:
717
718 0 = Low priority (IDLE, delta = 0)
719 1 = Medium priority (IDLE, delta = +31)
720 2 = Regular priority (REGULAR, delta = -31)
721 3 = High priority (REGULAR, delta = 0)
722 4 = Maximum priority (REGULAR, delta = +31)
723
724 Note that if you call '--priority' without a parameter, priority 0 will be
725 assumed.
726
727
728 =======================================================================
729 Algorithm quality selection
730 =======================================================================
731 -q n
732
733 Bitrate is of course the main influence on quality. The higher the bitrate,
734 the higher the quality. But for a given bitrate, we have a choice of algorithms
735 to determine the best scalefactors and Huffman coding (noise shaping).
736
737 For CBR, ABR and --vbr-old modes, the following table applies
738
739 -q 0 Use the best algorithms (Best Huffman coding search, full outer
740 loop, and the highest precision of several parameters).
741 -q 1 to -q 4 Similar to -q 0 without the full outer loop and decreasing
742 precision of parameters the further from q0. -q 3 is the default
743 -q 5 and -q 6 Same as -q 7, but enables noise shaping and increases subblock
744 gain
745 -q 7 to -q 9 Same as -f. Very fast, OK quality. Psychoacoustics are used for
746 pre-echo and mid/side stereo, but no noise-shaping is done.
747
748 For the default VBR mode since LAME 3.98, the following table applies
749
750 -q 0 to -q 4 include all features of the other modes and additionally use
751 the best search when applying Huffman coding.
752 -q 5 and -q 6 include all features of -q7, calculate and consider actual
753 quantisation noise, and additionally enable subblock gain.
754 -q 7 to -q 9 This level uses a psymodel but does not calculate quantisation
755 noise when encoding: it takes a quick guess.
756
757
758 =======================================================================
759 Input file is raw pcm
760 =======================================================================
761 -r
762
763 Assume the input file is raw pcm. Sampling rate and mono/stereo/jstereo
764 must be specified on the command line. Without -r, LAME will perform
765 several fseek()'s on the input file looking for WAV and AIFF headers.
766
767 Not supported if LAME is compiled to use LIBSNDFILE.
768
769
770 =======================================================================
771 Slightly more accurate ReplayGain analysis and finding the peak sample
772 =======================================================================
773 --replaygain-accurate
774
775 Compute "Radio" ReplayGain on the decoded data stream. Find the peak sample
776 by decoding on the fly the encoded data stream and store it in the file.
777
778
779 ReplayGain analysis does _not_ affect the content of a compressed data
780 stream itself, it is a value stored in the header of a sound file.
781 Information on the purpose of ReplayGain and the algorithms used is
782 available from http://www.replaygain.org/
783
784 By default, LAME performs ReplayGain analysis on the input data (after
785 the user-specified volume scaling). This behaviour might give slightly
786 inaccurate results because the data on the output of a lossy
787 compression/decompression sequence differs from the initial input data.
788 When --replaygain-accurate is specified the mp3 stream gets decoded on
789 the fly and the analysis is performed on the decoded data stream.
790 Although theoretically this method gives more accurate results, it has
791 several disadvantages:
792 * tests have shown that the difference between the ReplayGain values
793 computed on the input data and decoded data is usually no greater
794 than 0.5dB, although the minimum volume difference the human ear
795 can perceive is about 1.0dB
796 * decoding on the fly significantly slows down the encoding process
797 The apparent advantage is that:
798 * with --replaygain-accurate the peak sample is determined and
799 stored in the file. The knowledge of the peak sample can be useful
800 to decoders (players) to prevent a negative effect called 'clipping'
801 that introduces distortion into sound.
802
803
804 Only the "Radio" ReplayGain value is computed. It is stored in the LAME tag.
805 The analysis is performed with the reference volume equal to 89dB.
806 Note: the reference volume has been changed from 83dB on transition from
807 version 3.95 to 3.95.1.
808
809 This option is not usable if the MP3 decoder was _explicitly_ disabled
810 in the build of LAME. (Note: if LAME is compiled without the MP3 decoder,
811 ReplayGain analysis is performed on the input data after user-specified
812 volume scaling).
813
814 See also: --replaygain-fast, --noreplaygain, --clipdetect
815
816
817 =======================================================================
818 Fast ReplayGain analysis
819 =======================================================================
820 --replaygain-fast
821
822 Compute "Radio" ReplayGain of the input data stream after user-specified
823 volume scaling and/or resampling.
824
825 ReplayGain analysis does _not_ affect the content of a compressed data
826 stream itself, it is a value stored in the header of a sound file.
827 Information on the purpose of ReplayGain and the algorithms used is
828 available from http://www.replaygain.org/
829
830 Only the "Radio" ReplayGain value is computed. It is stored in the LAME tag.
831 The analysis is performed with the reference volume equal to 89dB.
832 Note: the reference volume has been changed from 83dB on transition
833 from version 3.95 to 3.95.1.
834
835 This switch is enabled by default.
836
837 See also: --replaygain-accurate, --noreplaygain
838
839
840 =======================================================================
841 Output sampling frequency in kHz
842 =======================================================================
843 --resample n
844
845 where n = 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48. The values as Hz
846 instead of Khz are also supported. Else, the value will be ignored.
847
848 Output sampling frequency. Resample the input if necessary.
849
850 If not specified, LAME may sometimes resample automatically
851 when faced with extreme compression conditions (like encoding
852 a 44.1 kHz input file at 32 kbps). To disable this automatic
853 resampling, you have to use --resamle to set the output samplerate
854 equal to the input samplerate. In that case, LAME will not
855 perform any extra computations.
856
857
858 =======================================================================
859 Sampling frequency in kHz (for input RAW PCM)
860 =======================================================================
861 -s n
862
863 where n = sampling rate in kHz.
864
865 Required for raw PCM input files. Otherwise it will be determined
866 from the header information in the input file.
867
868 LAME will automatically resample the input file to one of the
869 supported MP3 samplerates if necessary.
870
871
872 =======================================================================
873 Silent operation
874 =======================================================================
875 -S
876
877 don't print progress report
878
879
880 =======================================================================
881 Scale
882 =======================================================================
883 --scale <arg>
884
885 Scales input by <arg>. This just multiplies the PCM data
886 (after it has been converted to floating point) by <arg>.
887
888 <arg> > 1: increase volume
889 <arg> = 1: no effect
890 <arg> < 1: reduce volume
891
892 Use with care, since most MP3 decoders will truncate data
893 which decodes to values greater than 32768.
894
895
896 =======================================================================
897 Strict ISO complience
898 =======================================================================
899 --strictly-enforce-ISO
900
901 With this option, LAME will enforce the 7680 bit limitation on
902 total frame size. This results in many wasted bits for
903 high bitrate encodings.
904
905
906 =======================================================================
907 Disable VBR tag/WAV header
908 =======================================================================
909 -t
910 This setting has two different uses:
911
912 When encoding to VBR, this setting disables writing the VBR Tag (also
913 known as XING tag). This tag is embedded by default in the frame 0 of
914 MP3 file. It allows VBR aware players to accurately seek and compute playing
915 times in such files.
916
917 When decoding MP3 to WAV using --decode, this flag will disable writing the
918 WAV header. The output will be raw pcm, native endian format. Use -x to swap
919 bytes.
920
921
922 =======================================================================
923 VBR quality setting
924 =======================================================================
925 -V n Enable VBR encoding
926
927 Encodes using the VBR algorithm, at the indicated quality.
928 0=highest quality, bigger files. 9.999=lowest quality, smaller files.
929 Decimal values can be specified, like: 4.51
930
931 On average, the resulting bitrates are as follows:
932 Setting Average bitrate (kbps)
933 0 245
934 2 190
935 3 175
936 4 165
937 5 130
938
939 Using -V 7 or higher (lower quality) is not recommended.
940 ABR usually produces better results.
941
942
943 =======================================================================
944 Swap bytes
945 =======================================================================
946 -x
947
948 swap bytes in the input file (and output file when using --decode).
949 For sorting out little endian/big endian type problems. If your encodings
950 sound like static, try this first.
951
952
953 =======================================================================
954 Ignore scalefactor band 21
955 =======================================================================
956 -Y Ignore noise in sbf21, like CBR mode does
957
958 Allows -V2, -V1 and -V0 to not encode the highest frequencies accurately,
959 if doing so causes disproportional increases in bitrate.
960 This is the same that CBR and ABR modes do.
961
962 Due to the design of the MP3 format, to keep precision in the last scalefactor
963 band, an encoder needs to increase the precision in all the bands (not only in
964 this one).
965 The consequence is an increase of bitrate (+60kbps in some cases) compared to
966 not keeping that precision. Generally, this band should allow for distortions,
967 so using this switch shouldn't cause harm.
968