Lame "command line"

Source: Internet
Author: User

VBR Encoding(Strongly recommended)
Alt preset extreme (average 256 kbps) we sometimes see online ". LAME-APX." In this form, we can also include this tag in the file name. This is a parameter recommended by lame developers. The optimal balance between sound quality and file size is recommended.
Input value:
-- Alt-preset extreme % S % d

Alt preset standard (average 192 Kbps) we sometimes see online ". LAME-APS." In this form, we can also include this tag in the file name.
Input value:
-- Alt-preset standard % S % d

CBR Encoding(Obsolete)
Alt preset insane (320 Kbps) We can include the ". LAME-320kbps." tag in the file name. Not recommended. This is the worst choice between sound quality and file size.
Input value:
-- Alt-preset insane % S % d Or -- alt-preset CBR 320% S % d

256 kbps we can include the ". LAME-256kbps." tag in the file name.
Input value:
-- Alt-preset CBR 256% S % d

192 kbps we can include the ". LAME-192kbps." tag in the file name.
Input value:
-- Alt-preset CBR 192% S % d

Required VBR Parameter:-B 32-m s-H-C-V 0-B 320-Q 0 -- noath

We can see the "high quality" and "Low Quality" options in the configuration interface. This is actually a switch. We can add the following command line options: "to specify the method for each of the two quality pairs.
The specific format is as follows:
% L low quality parameter % L % H high quality parameter % H % S % d

For example, we want low quality to correspond to CBR 192 kbps, and high quality to VBR retrial, the input value is % L -- alt-preset CBR 192% l % H -- alt-preset extreme % H % S % d.
You can configure it as needed.

Bit Rate: You can select the bit compression rate of the encoded file. We recommend that you use at least 128 kbits. In the case of user-defined encoder, the bit rate option value is invalid, so if you want to feel better, you can choose 320 KB,

VBR (variable bitrate) dynamic bit rate. That is, there is no fixed bit rate. during compression, the compression software determines the bit rate based on the audio data in real time. This is based on the quality of both the file size and the recommended encoding mode;
The average bit rate of ABR (average bitrate) is an interpolation parameter of VBR. Lame creates this encoding mode based on the poor file volume ratio of CBR and the variable file size generated by VBR. In the specified file size, the ABR takes every 50 frames (30 frames about 1 second) as a segment, and uses relatively low traffic at low frequency and insensitive frequencies, high traffic is used for high-frequency and high-dynamic performance, which can be used as a compromise between VBR and CBR.
CBR (constant bitrate), a constant bit rate, indicates that a file is a bit rate from start to end. Compared with VBR and ABR, the compressed file size is large, and the sound quality is not significantly improved compared with VBR and ABR.

 

 

Lame-the best tool for compressing MP3 files
Today's audio lossy compression technology is booming, and MP3's aura is no longer as bright as it used to be. Microsoft's Windows Media Audio 8 (WMA) is widely used by operating systems. thomsom's MP3 pro format is also popular with its low-bit rate and high-quality technology, there are also various other encoding schemes, such as MPC, Ogg, and aac, which are under increasing pressure-does all this mean that MP3 will gradually die out? The answer is no.
It is true that when the bit rate is less than 128 Kbps, MP3 is indeed inferior to WMA or mp3 pro, but this cannot be the reason we give up MP3. First, whether it is 128 Kbps MP3, WMA or 64 Kbps MP3 Pro (or even 2.0 kbps MP3 pro supported by Cool Edit Pro 144), its sound quality is 44.1 kHz, there is still a small gap between 16-bit CD audio standards and it cannot meet the requirements of fans. In order to achieve higher sound quality, we must increase the bit rate. However, when WMA is higher than 128 Kbps, the sound quality is not significantly improved, and the maximum encoding can only be 192 Kpbs. MP3 pro is well known to be unable to break away from 96 kbps; for MP3, higher than (equal) the encoding of 192 kbps is really the only thing in the world. We can make up to 320 kbps of MP3 (this is the maximum bitrate of MP3). At this time, the sound quality is different from that of CD. Secondly, because MP3 itself is a public encoding scheme, there are many encoders corresponding to it. Many rough Encoding algorithms of MP3 encoder cause the loss of many details, at the same time, it also ruined the reputation of MP3. This is why I am going to introduce lame here.
What is lame? Lame is short for lame ain't an MP3 encoder (lame is not an MP3 encoder) and one of the world's best MP3 encoder. The reason for this name is that the lame was originally a patch for an ISO encoder, which was developed to avoid legal issues with Fraunhofer. Later, lame began to develop independently. Since December 1998, lame has been recognized by more and more people as the best tool for mp3 compression. Lame is a completely free software, and lame is constantly evolving and improved.
Why is lame the best MP3 encoder? This is a difficult question to answer in a few words, which involves the MP3 encoding principle. Let's talk about CBR, VBR, and ABR first?
Bitrate (bit rate) is the most important factor for MP3. It indicates the bit per second (BPS) occupied by audio data ). The higher the value, the better the sound quality. For uncompressed wav files, the bitrate is 1400 kbps, and one byte is 8 bits. To convert 1400/8 to 175 Kbyte/s. Therefore, for a 4-minute music, the space occupied by files in WAV format is 4 minutes * 60 seconds * 175 = 42000 Kbyte, that is, 42000/1024 = 41 MB; 192 kbps (24 Kbyte per second) MP3 occupies 4*60*24/1024 = 5.625 MB. This fixed bit rate algorithm was developed by Xing, known as constant bitrate (CBR). Later, Xing developed a new algorithm, they use high bitrate encoding for the complex part of a song, while low bitrate for the simple part. This is called variable bitrate (VBR for short ). Although the idea is good, it is a pity that the VBR algorithm of the Xing encoder is very poor. The sound quality is far from that of CBR, and not all players support VBR-encoded MP3, including Microsoft's media player, this is why the VBR-encoded MP3 in WMP cannot display the time correctly. Fortunately, the lame implements the VBR algorithm perfectly (based on the Xing algorithm, lame introduces a new algorithm: ABR (average bitrate, average rate ). API is also called "Safe VBR", which can control the generated MP3 file on the specified bitrate. For example, when 192 kbps and ABR are specified to encode a WAV file, Lame will encode 90% of the file with 192 kbps, and then optimize the remaining 10%: the complex part is encoded at higher than 192 kbps, and the simple part is encoded at lower than 192 kbps. Compared with 192 kbps and CBR, the file size of 192 kbps and ABR is similar, but the sound quality is improved a lot. According to statistics, the speed of ABR encoding is two to three times that of VBR encoding, And the quality in the range of 128-256kbps is better than that in CBR.

 

Lame usage and common parameters:
Usage: the target file of the original file with the lame Parameter
Example: Lame -- alt-preset standard 1.wav 1.mp3
Lame parameter settings table (audio quality arranged from high to low ):
CBR 320 (constant bitrate fixed rate, maximum sound quality): -- alt-preset insane (bitrate: 320 Kbps)
VBR (variable bitrate Variable Rate): high quality (slow): -- alt-preset extreme (bitrates 220-270 kbit/s-usually around 256 kbps ); fast (slightly inferior to above): -- alt-preset fast extreme (bitrates is the same as above); high quality (slow): -- alt-preset standard (note: the current lame standard setting) (bitrates 180-220 kbit/s-usually around 192 Kbps); fast (slightly less quality than above ): -- alt-preset fast standard (bitrates is slightly inferior to above)

 

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: info-contact@alibabacloud.com 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.