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