Lame Application Teaching-the path to making hifi grade MP3

Source: Internet
Author: User
HIFI grade MP3? Is it possible? LameWhat is it? I will know after reading the full text, but before that, I would like to popularize the basic knowledge of MP3, or you may not understand it.

I. MP3 family history
The full name of MP3 is MPEG audio Layer III, which was born in 1987. It was created by Fraunhofer IIS, an audio Research Institute in Erlangen, Germany. The design goal is to develop a digital compression format with high sound quality (CD sound quality) and low traffic (less than KB) by taking advantage of insufficient perception in some aspects of human hearing. About three years later, in 1990, the technology patent was applied for in Germany, and the International Standards Organization (ISO) accepted the technology three years later. MP3 became part of the MPEG standard. Since MP3 was technically superior and highly open and free at that time (recently, Fraunhofer iishas started to charge fees using its computation method software, with various formats of mp3133 software and compaction software starting from the Internet stream, and xxx.mp3 music has been overwhelming. This is the case with MP3 history.

I have tried dozens of MP3 compression software over the past few years and found that the MP3 sound quality produced by different compression software sounds quite different. I checked some MP3 technical materials with such questions to understand that MP3 is only a digital audio format specification, this specification does not impose hard rules on the psychological audio model, user-defined method, and traffic distribution used in the compression process. Standards alone cannot be used to create MP3 files. Because of its high openness, there are dozens of MP3 encoders developed under these specifications. All the files pressed are MP3 files, the same player can also be used for playback. However, because different encoders use the mask frequency, the happan algorithm, the parameters of the psychological audio model, and the absolute auditory threshold are not the same, so the final MP3 sound quality is quite different.

II,LameWhere is the beauty?

After knowingLameI have tried almost all MP3 encoders before. Among them, the sound quality should be the Fraunhofer IIS MPEG lyaer3 encoder developed by the MP3 coder Fraunhofer IIS team. This encoder is in CBR (Static Traffic encoding) especially kbps is unparalleled (comparedLameBut unfortunately it does not support VBR (Dynamic Traffic encoding), and the highest traffic can only reach 256 kbps, so it is inferior to the highest quality competition.LameAnd the latest version has started charging, so you have to stay away from it. Other encoders are not doing well, and the performance is mediocre. In particular, the performance of CD-based and MP3-based attacks is extremely poor. CD-based attacks are desperate, and no correction is made at all. The MP3 files that are pressed out are K or K, the high-frequency loss is extremely serious, and there is a roof distortion, and the low frequency also makes people feel vague. However, such software can also become the most commonly used mp3 compression software in Chinese people, and the reputation for MP3 sound quality is ruined. Until you useLameCompression engine, only to find that MP3 sound quality can also reach a very high standard.LameThe original MP3 sound is sharp, the space is narrow, the bass is blurred, and the details are not enough. Instead, the CD sound quality is extremely pure, MP3, especially encoded with high quality VBR, cannot hear the difference from the original CD. The device is good, sblive! + Extremely typical pa60 power amplifier + short-song line face-to-face speaker.

  LameThis not only gives full play to VBR encoding, but also creates an ABR encoding mode based on the disadvantages of the poor CBR encoding mode and the variable size of the file generated by VBR. An API can take 50 frames (about 30 frames per second) as a segment within the specified file size. The low-frequency and non-sensitive frequencies use relatively low traffic, high traffic is used for high-frequency and high-dynamic performance, and the sound quality is protected to the greatest extent, such as those of an API and CBR private child.LameWaveform analysis is also highly researched. These are notLameAll the advantages, after all, the VBR was first implemented on the Xing. Among the many encoders, the most important part of the VBR is its own psychological audio model. Early StageLameThe ISO encoding technology is used, but the psychological audio model (LameGpsycho) has been fully developed independently and has nothing to do with other companies' technologies. The most important thing is free software.

Iii. Essentials of rail capturing

First, we need to compress the CD to MP3 and save it as WAV. It is very complicated and troublesome to compress the CD into WAV with high quality, it is impossible to clarify the principle here, so we can only briefly talk about experience. Whether or not to capture high-quality wav files depends mainly on three factors: CD disk quality, audio capture performance of the optical drive, and audio capture software. For the disk quality, if the Z version CD is not required, of course it is good, and the D version is hard to say. The optical drive is not a big problem. Currently, the mainstream optical drive on the market is 40-50 times faster, and there is no jitter correction (the hardware correction capability of the optical drive to capture CD is basically not available in the Chinese market) capability optical drive, the faster the capture speed, the more likely it is to get incorrect information and generate a burst sound, some low-speed Nissan optical drive (original Nissan optical drive generally with jitter correction function) the capture of CD is exceptionally good.

K *{
However, you do not have to worry about the China or Taiwan optical drive, because the hardware does not provide functions that can be provided by software, software such as EAC, cdex, windac, CD-copy, and CD-extracting provide the jitter correction function. In particular, EAC is a very professional software for capturing and copying CD. It can be completely lossless (strongly recommended) when properly configured.LameUse. The latest version is 0.9probeta9. There are many EAC options. You only need to capture the CD and do not have to worry about the complicated setting options. You only need to check the Drive options-> secure modes-> drive has 'accurate stream' feature option, if you are not at ease, you can press the F6 key when deciding to capture the audio. In this way, the EAC crawls the same audio track twice and compares the data to obtain a more accurate WAV file.

Iv. compression encoding Parameters

Start to compress MP3 files with WAV Files, version 3.87LameDLL and exe versions. The dll version cannot be executed directly. It is provided to some CD software for plug-in MP3 encoding programs.LameThe compression process is much simpler (dll version is not recommended and can be provided in the same way as EXE version.Lame). The executable EXE version is the most common and the encoding quality is slightly better than the dll version.Lame. EXE is a command line program that must be run in msdos in windows. Direct execution is not convenient. The next command can only compress one MP3 file and its algorithm is very complex, make the compression speed slow. If you want to change the settings, you can only add different parameters after executing the command.LameThere are dozens of parameters. The most common parameters are described below.

  LameBasic command line format:Lame[Parameter options] <Input File Name> [<output file name>]

1. Basic parameters for CBR Encoding

CBR is the most commonly used MP3 encoding method, and its encoding traffic can be selected from 32kbps-320kbps. In general, 128 kbps is most commonly used for pressing MP3 in the past, but the traffic of MP3 encoded with KB is too small to retain high-quality sound. It may be good to play Walkman, so it is not good to listen on the computer. Therefore, we do not recommend CBR for hifi MP3 unless 320 kbps (maximum quality MP3) is used)

[-B] specifies the encoding traffic. The available traffic is as follows:
32 40 48 56 64 80 112 128 160 192 224 256,
No matter what traffic size is used, to save space,LameIf it is determined as the mute part, the minimum traffic is automatically used.

[-H] high-quality encoding mode. It can start some computation that can improve the quality, but it will reduce the speed (recommended ). This option is enabled by default in VBR compression mode.

[-F] fast encoding mode, but it will reduce the quality (preset ). With this parameter,LameThe encoding quality is similar to that of the general encoder, but the corresponding encoding speed is much faster. This parameter may be used by MP3 website friends.

[-Q] specifies the accuracy of frequency data quantification. The range is also 0-9. Like the preceding [-v] parameter, the lower the number, the better. Z
We recommend that you use the following command line for the optimal quality of CBR encoding:Lame. Exe-b320-H-q0

2. Basic parameters for VBR Encoding

VBR encoding isLameThe best part is to provide the best sound quality/Traffic ratio, which is strongly recommended! Generally, when the optimal VBR encoding is used, the average traffic is about kbps.

[-V] specifies the compression quality of the VBR. The value range is 0-9 (the smaller the number, the higher the Quality). The default value is 4.

[-B] specifies the lower limit of traffic change. The default value is 32 Kbps.

[-B] specifies the maximum traffic change limit. The default value is 320 kbps.

[-Q] For details, see CBR encoding parameter N4! XF

We recommend that you use the following command line for the optimal quality of VBR encoding:Lame. Exe-V0-q0

3. Basic parameters for ABR Encoding

As mentioned above, the ABR isLameThe unique encoding method provides the same size as CBR but better sound quality, because it uses advanced VBR encoding to compress CBR. Same as CBR, the average traffic can be specified.

[-- ABR] specify the desired average traffic instead of the quality,LameIt will automatically use different traffic sizes at different times like the encoding VBR, but it will keep the final file size to the size you specified. The traffic permitted range is 8-320, any integer in this range can be used.

[-B] For details, see VBR encoding parameters.

[-B] See VBR encoding parameters.

We do not recommend that you use this parameter because the "bit reservoir" function can be used in the same way as that of CBR. a cbr code is kbpsmp3, which can be compressed with Kbps in some time periods. VBR does not use "bit reservoir". Therefore, you must allow kbps of traffic to achieve the same elasticity as CBR. ("Bit reservoir" is a function in MP3 compression specifications and mainly plays a role in CBR and ABR encoding. Principle: for example, when a compression program compresses a certain segment of data, it deems that it is unnecessary to use the specified traffic (for example, it specifies kbps while the compression program considers that kbps is enough ), the compression program will store the extra traffic (in the previous example, 256kbps-192kbps = 64 Kbps) in "bit reservoir. If a piece of data is a large dynamic part and the specified traffic is insufficient to meet the compression needs, you can extract the storage traffic from the bit reservoir, make the traffic exceed the original size limit.

[-H] For details, see CBR encoding parameters.

[-Q] For details, see VBR encoding parameters.

We recommend that you use the following command line for the optimal quality of the ABR code:Lame. EXE -- ABR 320-H-q0

4. There are also some common parameters:

[-M] stereo compression mode, which has [-ms] stereo [-MJ] joint stereo [-MF] force ms_stereo [-mm] mono

When VBR encoding is used and the quality is set to 4-9 and CBR encoding traffic is less than 160 kbps, the default value is joint stereo. In other cases, the default value is stereo.

Stereo: Pure dual-channel stereo mode. In this compression mode,LameData correlation between two channels will not be calculated, but the data traffic of the two channels will be allocated in coordination, and a large amount of traffic will be automatically allocated to the complex channels.
Joint STEREO: When compressing a stereo file,LameThe possible redundancy between left and right channels is also used for compression. Most of the stereo recordings are very similar to the left and right audio channels. The combined stereo encoding can greatly reduce the file size. This means that the file size becomes smaller while maintaining the perfect stereo effect. (Although this is the case, it is not recommended to use this parameter. If you do not need good quality or want a smaller size, you can add this parameter)
Force: forces all frames to use m/s joint stereo encoding, which is much faster, but not recommended. QW "l'
Mono: Mono encoding mode.

[-T] SetLameThe encoded MP3 is decoded into a WAV file.

[-K] retain all frequencies.

  LameDuring encoding, in order to retain data traffic to the most important frequency band and Improve the Quality of compression,LameThe traffic is automatically set as the selected traffic.Filter. Generally, MP3 with a value less than kbps fully applies the auditory mask principle and removes some non-sensitive frequencies above Hz (do not hear any difference, because the auditory mask will play a role at this time. In short, the human ears cannot hear the weak audio signal that is the same as the strong audio signal of the same frequency. This phenomenon is usually called an auditory mask, where a strong signal is used to cover a weak signal.LameDuring compression, we analyze the spectrum of an audio file and divide it into a series of frequencies. Weak Signals in the frequency band are differentiated and quantified to reduce the data size used to replace the original audio file. The band to be quantified is located under the "shadow" of a strong signal in the same frequency range, so the noise produced during the quantification process is not noticed by human ears. It looks complicated. For example, you may be able to hear the sound of a steel needle falling onto the ground at home, but can you still hear it on a car or train? It must be said that the sound of the car has hidden the needle from the ground, which is the embodiment of the auditory mask principle ). If it is a perfectionist, You need to retain all frequencies and add this parameter to achieve this. But note! If the set traffic volume is insufficient to retain all the frequencies, unexpected sound and distortion may occur. Please use it with caution!

ImportantLameThese are the parameters above, of course.LameThere are more than these parameters in the short song line.LameUsage/parameter description table with allLameFor more information about the parameters, see.

V. Shell application

Is it complicated? It doesn't matter. If you don't want to use these inconvenient DOS commands, useLameThe shell program (third-party shell program) is good, the shell program is a plug-in software that is developed for an MP3 plug-in program that is not satisfied with the use of the dll version for CD software.LameThere are three Shell programs, namely lamer1.0, razorlame1.1, and winlamer1.1. After using the three software, winlamer and razorlame are easy to use. The following describes how to use these two Shell programs. S

The razorlame interface is simple and easy to use. There are not many settings. In options-> General, specifyLame. EXE location, and then you can adjust various Compression Parameters on other pages. If you want to try some experimental parameters (which have not yet been officially announced), or are too lazy to check the settings on each page, you can directly enter the written parameters in options-> advanced into custom options, select only use custom options. Options-> in advanced, there is a delete source file after encoding option. After selection, the encoded WAV file will be automatically deleted, which is very convenient. Note that in options-> audio processing, the output sampling frequency output frequency option must be set to 44.1 kHz. Otherwise, razorlame will be output at 32 kHz to degrade the sound quality.

As for winlamer, compared with razorlame, the operations are similar except for the interface. Open add WAV fiile in the main interface, select the wav file to be compressed, and then selectLame'!! It can be compressed. In the settings menu, various setting options are clear at a glance. Like razorlame, you must firstLameSpecified in. exeLame. EXE location. The following options are the bitrate-CBR encoding traffic options (32-320) and the output-stereo compression mode options (recommended to be set to stereo ). The secondary settings on the right is to set the specific quality. We recommend that you only select improved quality (improved compression quality) and the following psycho acoustics (LamePsychological audio model. The options for compressing VBR and ABR are in the variable bitrate settings below. The settings can be combined with the aboveLameSelect a parameter table.

6. On Demand

  LameThe specific application is almost written.LameAnd then some feelings. Digital technology has developed rapidly over a thousand miles. As MP3, which was born in the 1980s S, faced with many new digital formats such as WMA, vqf, aac (legal successor of MP3), and Ogg, still can rely on its own technology updates to widely lead in technology and the market. Nowadays, MP3 is widely used in the Internet and Walkman, so people have to be optimistic about it tomorrow. In pchome and itpower, many MD players have mentioned that MP3 is a waste sound quality, which is very one-sided. They have completely no idea about a thing before they fully understand it. In fact, if it is better than the compression format, MD uses ATRAC than MP3, MD is only because of the large disk capacity, good playback quality, to achieve the best quality and easy to lead the MP3 Walkman. If Sony and other Walkman manufacturers are on the market that can burn MP3 players with 8CM discs as the carrier, the advantage of MD will be greatly reduced. Technically speaking, it is not difficult to achieve this mp3 Walkman, it depends on whether a vendor will do that. AsLameSo far, the new version is still being revised and released (LameIt is developed by a large number of amateurs). The extent to which the program can be implemented is quite promising.

Try it nowLameThis MP3 revolution!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.