Why are MP3 bitrates often multiples of 32? (power of 2) part 2
MP3 Bitrate
Depending on the resource, VBR can be encoded by changing the bitrate between a fixed rate above each frame, or by sharing the available bits in adjacent frames (effectively producing a non-standard bitrate for the two frames combined).
MP3 Bitrate
the fixed frame depends on the sampling rate, 1152 samples per frame. There is no limit to the size of the frame itself, nor to the base 2 size of the frame (ie 417 bytes for a 128 kbit/s MP3 sampled at 44.1 kHz).
In the end, a file encoded at 126kbps will sound worse than a file encoded at 128kbps, and similarly a file encoded at 131kbps will sound better. However, MP3s are encoded according to the compression psychoacoustic model of a specific encoder. The amount by which a file sounds “better” or “worse” at a given bitrate largely depends on the algorithm used to implement the model, but in general higher bitrates allow for more data, presumably for rebuild a more accurate original transmission. audio signal
Why are MP3 bitrates often multiples of 32? (power of 2)
MP3 Bitrate
Some people say:
MP3 Bitrate
I understand why multiples of 2 often show up on computers since they are binary, but I can’t figure out how the most common mp3 bitrates (64kbps, 128kbps, 160kbps, 192kbps, 256kbps, 320kbps, etc.) also tend to follow this rule.
Since MP3 is just a sequential encoding of sound waves, why is it important to represent each second in kilobits divisible by 2?
Does a music player like iTunes continue to read the file and play the encoded sound regardless of the second limit, or does it read the file every second?
In the latter case, reading a 256kbps file requires reading slightly fewer memory pages than a 257kbps file, but the player can always read 256KB chunks, regardless of their bitrate, and just process them automatically. incremental, right, Bar?
Are 128kbps MP3 songs popular simply because it’s a generally accepted bitrate, or do they really have any advantages over 126kbps and 131kbps files, apart from a very slight difference in quality/file size?
For constant bit rate (CBR) encoding, the MPEG-1 Audio Layer III standard specifies standard bit rates of 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256 and 320 kbit/second. There are a few others defined in the MPEG-2 standard, but they are also multiples of 2 (actually all multiples of 8 in the range 8 to 160 – see the table called “Bitrate Index” in the link above) .
Technically, there is nothing that limits the MP3 bitrate to a multiple of 2, since variable bitrate encoding can be used, or a custom bitrate can be achieved using some flags not used in the MPEG specification ( although this must be implemented manually). . In order for MP3 to be MPEG-compliant, and therefore compatible with most MP3 decoders, it must have a bitrate defined by the specification, so all CBR-encoded MP3 files have a bitrate of two.
Bit rate refers to the number of bits (bits) transmitted per second. The unit is bps (Bit per second) The higher the bit rate, the faster the data transmission speed.
Mp3 bitrate
Bitrate in sound refers to the amount of binary data per unit of time after converting an analog sound signal to a digital sound signal, which is an indirect measure of audio quality.
Bitrate refers to the sampling rate at which digital sound is converted from analog to digital format. The higher the sampling rate, the better the quality of the restored sound. As a benchmark for the efficiency of digital music compression, bit rate indicates the rate of the number of bits bps (bit per second, bits per second) transmitted per unit of time (1 second). Kbps (in layman’s terms is 1000 bits per second) is usually used as the unit. The bit rate of digital music on CD is 1411.2 kbps (that is, to burn 1 second of CD music, 1411.2 × 1024 data bits are required), the high BIT RATE of the digital music file music means that it should be processed in a unit of time (1 second) The amount of data (BIT) is large, which means that the sound quality of the music file is good. However, when the BITRATE is high, the file size increases, which will take up a lot of memory capacity. The most commonly used bitrate for music files is 128 kbps, and MP3 files can generally use 8 to 320 kbps. In the same way, most of them are 32-256 Kbps. Of course, the wider the rate, the better, but 320 Kbps is the highest level at the moment.
Bitrate calculation formula
The basic algorithm is: [Bit rate] (kbps)=[file size] (bytes) X8/[time] (seconds)/1000
Special algorithm for audio files: [bit rate] (kbps) = [quantization sample point] (kHz) × [bit depth] (bit/sampling point) × [number of channels] (typically 2)
For example, the D5 drive has a capacity of 4.3G, which takes into account different audio formats, so it is calculated as 600M (so the remaining capacity is 4.3*1000-600=3700M), so the video file should not be larger than 3.7G, in this example, take The capacity of the video file is 3.446G, and the length of the video is 100 minutes (6000 seconds). The calculation result: the bit rate is approximately equal to 4933kbps.
What is a good bitrate guide for mp3 files? Part 2
Mp3 Bitrate
To produce high-quality MP3 files of classical and jazz music, the optimal bitrate depends on the characteristics of the song.
Mp3 Bitrate
Smooth jazz can usually be copied at 192kbps to create a good balance between file size and diminishing returns, although 256kbps may sound better in a home entertainment center. A classical orchestra should be 256kbps for a portable player, but if you want to burn a CD at home or in your car, a 320kbps file might be a better option.
For saturated music such as hard rock, metal, arena, pop, electronic and house music, 320 kbps will provide the best results. The higher the number of bits per second, the more complex acoustic envelope will be preserved.
If possible, it’s best to create MP3 files with variable bit rates. This allows the encoding program to determine if a particular frame of music requires the full bit rate. Otherwise, the program will reduce data retention for that frame, resulting in a smaller file without sacrificing quality. Forcing the program to “oversample” frames can produce artifacts.
While this article is intended as a general guide, he or she may be equally satisfied with a lower bitrate for a particular song or songs in general. Many factors affect our ability to judge the quality of music, not only the devices we use but also our activities while listening to it. For example, for those who listen to MP3 files while exercising or taking a walk, external noise can make it more difficult to tell the difference in quality. Conversely, audiophiles may prefer to sample at 320kbps, regardless of their equipment, type of music, or listening habits.
If you create your own MP3 files, there are other settings that affect quality. LAME is an excellent MP3 encoder that is free and has many graphical interfaces as the interface for this popular command line program. LAME allows users to adjust many settings to generate high-quality MP3 files in seconds. You can also experiment with various bitrates in your source file to find the best subjective balance between quality and file size.
MP3 files are compressed audio files created from audio formats such as wave (.wav). Wave files replicate analog recordings and digital sound files at the expense of large file size, while MP3 files sacrifice some quality for a smaller footprint. There are several factors that mitigate the quality sacrifice during the conversion process. With the correct bitrate and settings, MP3 files can provide very high quality results, making them very close to the original wave files when played on portable audio players.
An mp3 player.
The balance between file size and quality is somewhat subjective. For audiophiles, any difference is noticeable. Others may simply not be able to tell the difference between a high quality MP3 file and a raw wave source. In many cases, the nuances of the sound environment will only become clearer when played through a high-quality stereo system.
MP3s are compressed digital music files that sacrifice quality for file size.
MP3 files are primarily targeted at portable audio players. In this field, high-quality MP3 files are played with incredible sound due to their small file size. With the limited memory of portable players, it makes sense that one would want MP3 files to be as small as possible while maintaining the highest possible quality.
For this, one of the most important factors when creating MP3 files is the bit rate. In general, the more bits per second that are preserved from the original file, the higher the quality of the MP3 and the larger the file size. Lower bit rates reduce size and quality. The idea is to use the bitrate for maximum realism without saving unnecessary data, which just creates larger files with no noticeable difference to the ear.
For voice recordings such as lectures or language lessons saved to waveforms, a bit rate of 32 kilobits per second (kbps) is acceptable, although 64 kbps may offer better quality, depending on the source. At 32 kbps, the sound may sound “flat”, but that’s understandable. A 64 kbps MP3 file created from a voice recording should sound nearly identical to the original.
Desaturated acoustic music with simple arrangements should work fine at 192kbps bitrate. You can choose 256 kbps if the music will be played on a high quality device. Music that falls into this category includes folk, boy band songs, easy listening, and folk music. There are also works by many classic artists such as James Taylor, Linda Longstadt, Jonny Mitchell, and Simon Garfunkel.
structure
file header
The WAV format follows the RIFF Resource Interchange File Format, so the WAV format is actually a three-layer relationship, which is simplified here. Its file header format is as follows:
Address Carving type content
00H-03H 4 character * 4 RIFF resource file exchange flag
04H-07H 4 unsigned int The number of bytes from the next address to the end of the file.
08H-0BH 4 character * 4 WAV file WAVE logo
0CH-0FH 4 character * 4 fmt wave file flag, the last digit is 0x20 space
10H-13H 4 unsigned int The size of the subchunk file header. For the WAV subfragment, the value is 0x10.
14H-15H 2 short unsigned Format type, when the value is 1, it means the data is linear PCM encoding
16H-17H 2 short unsigned number of channels
18H-1BH 4 int unsigned Sampling rate
1CH-1FH 4 int unsigned Wave file bytes per second = sample rate Bit depth PCM / 8 channels
20H-21H 2 short unsigned DATA data block unit length = number of channels * PCM bit depth / 8
22H-23H 2 short unsigned Bit depth PCM
24H-27H 4 character * 4 data stamp data
28H-2BH 4 unsigned int Total length of data part (bytes)
struct WAVHeader
{ char RIFF[ 4 ]; ///Resource file exchange flag RIFF unsigned LEN; ///Number of bytes from the next address to the end of the file char WAV[ 4 ]; ///WAV file flag WAVE char FMT [ 4 ]; ///Wave fmt file pointer, last digit is 0x20 space unsigned SubchunkSize; ///The size of the sub-chunk file header, for WAV this sub-chunk, the value is 0x10 DATATYPE short unsigned; / //Format type, when the value is 1, it means the data is unsigned linear PCM encoding short CH ; ///Number of unsigned channels F; ///Unsigned sample rate BYTERATE; ///Number of bytes per second of wave file = sample rate*PCM bit depth/8*Number of unsigned channels
short DATAUNITLEN; ///DATA block unit length=channel number*Bit depth PCM/8 unsigned short BITDEPTH; ///Bit depth character PCM DATA[ 4 ]; ///Data flag data unsigned DATALEN ; ///Data partial total length (bytes) };
data organization
After the file header is the data part of the WAV file. Its data organization is: the left channel value of the first sample point, the right channel value of the first sample point, …, the left channel value of the last sample point, the right channel value of the last sample point value. Each value has a bit depth of bits.
Generate a simple wav
First complete the Wav header.
A wav is 44100 Hz 16-bit stereo or 22050 Hz 8-bit mono, what does that mean? stereo/mono refers to dual/mono.
Audio Intro
For monophonic sound files, the sample data is an eight-bit short integer (short int 00H-FFH); for two-channel stereo sound files, each sample data is a 16-bit integer (int) and the upper eight bits (left channel) and lower eight bits (right channel) represent the two channels, respectively.
Sound is a mechanical wave, produced by the vibration of an object, and requires a medium to propagate. So, in essence, a sound is a waveform on an axis over time.
Sound has three elements: pitch, volume, and timbre:
Pitch is determined by the frequency of the sound wave, the higher the frequency, the higher the pitch.
The volume is determined by the amplitude of the sound wave, the larger the amplitude, the louder the sound.
The timbre is determined by the “shape” of the waveform (sounds like square, triangle, and sawtooth are called impulse waves and sound individual).
An audio file is a file obtained by converting an analog signal to a digital signal. In general, there are five important parameters: encoding method, number of channels, sampling rate, bit depth, and bit rate.
Encoding: how this format organizes binary data and how it is compressed.
Number of channels: mono, dual or 5.1 channels, etc.
Sampling rate: The number of samples per second.
Bit Depth: The number of binary bits used to store the y value of the sample point.
Bitrate – The desired number of bits per second for the file.
We know that there is no compression in the WAV format, so its encoding method is to directly write all the sampled points to the file in order.
WAV file size (B) = number of channels * sample rate (Hz) * bit depth (bit) / 8 + file header size (B, it’s 44B)
Implementation
When you open an mp3 or wav file with a text editor, you see numbers like this:
44100Hz represents the sample rate of the signal. The so-called sampling consists of obtaining the value y of the sound wave at the current moment every unit of time. Sampling is the process of discretizing continuous data (converting an analog signal to a digital signal).
image source
The sampling method mentioned above is called PCM (Pulse Code Modulation). According to the Nyquist-Shannon sampling law, the sampling rate must be at least twice the highest target frequency. The hearing range of the human ear is about 20Hz-20,000Hz (if you’re curious how loud you can hear, you can click here to test your ears), although recording software often has a 48,000 option Hz, but we can safely conclude: 44100Hz can meet almost all our needs, higher is just a waste of your memory and CPU. More than 48,000 samples are meaningless to the human ear, which is similar to 24 frames per second on a movie. 44100Hz happens to be the standard sample rate for almost all music released. In fact, for vocals and many instruments, high-frequency sounds are noise, so high sample rates can sometimes worsen sound quality (which is why we need to adjust the equalizer).
320 kbps represents your bitrate/bitrate, which is shorthand for kilobits per second, which represents the size of the data used to describe sound. In CD (uncompressed audio file), the bit rate is 1411.2kbps, and the mp3 sound quality to achieve CD quality should be higher than 128kbps/44100Hz (128kbps can be said to be the most common bit rate). Generally, a higher number means better quality. The quality depends on many factors (such as the encoding algorithm). Many times we don’t need too high bitrate: our device can play mp3 and CD without difference (sound/sound card is normal).
What is bit rate? Knowledge of the MP3 audio format. Part 2
bit rate
Bitrate is a benchmark indicator of the efficiency of digital music compression.
bit rate
The bit rate represents the number of bits bps (bit per second, bits per second) transmitted per unit of time (1 second). We usually use kbps (in simple terms, it is per second) clock 1000 bits) as the unit. The bit rate of digital music on CD is 1411.2 kbps (ie recording 1 second of CD music requires 1411.2 × 1024 bits of data). The higher the bit rate of the music file, the more data (Bit) must be processed in a unit of time (1 second), and the better the sound quality of the music file. However, when the bit rate is high, the file size increases, which will occupy a large amount of storage capacity. 8 to 320 kbps.
1. WMA (Windows Media Audio, Windows Media Audio)
As a Microsoft media compression method, it is a part of the technology that only compresses audio data in Windows Media Technologies. The sound quality is similar to MP3 and can be compressed with half the technology of MP3. It has the copyrighted Windows Media Rights Manager and can be played by installing it in WMP (Windows Media Player, Windows Media Player). Due to the strong influence of Microsoft and Windows, as well as major copyright reasons, the major American record companies, EMI and BMG, officially confirmed that they use the WMA method developed and produced by Microsoft. It is believed that this advanced method will become even more popular in the future.
2. MP3 (CBR, VBR, ABR)
MP3 is currently the most widely used and widely used lossy compressed digital audio format. It has been explained above and will not be repeated here.
CBR (constant bit rate)
CBR is the oldest and simplest MP3 encoding (compression) method. When this method is used for encoding, the bit rate of the entire file is the same, in other words, the bit rate used by the MP3 file per second is the same. Although the music file has sections of varying complexity, the encoder always keeps the bitrate constant, unless you use the highest sound quality; otherwise the sound quality of the different sections of the MP3 file will vary. The more complex the passage, the worse the sound quality. Its biggest advantage is that the file size is fixed, which is convenient for calculating storage space.
VBR (Variable Bit Rate, Variable Bit Rate)
VBR is a variable encoding rate MP3 compression method. Its principle is to encode the complex part of a song with a high bit rate and the simple part with a low bit rate. Through this dynamic adjustment of the encoding rate, the sound quality can be improved. additionally obtained and the size of the file. Its main advantage is that the entire song can approximately meet our sound quality requirements, but the disadvantage is that the size of the compressed file cannot be estimated during encoding.
Most MP3 players released now support VBR, but although some machines can play songs in VBR format, they can’t display the playing time correctly. Nowadays, a lot of high-quality MP3 music is encoded in VBR.
What is bit rate? Knowledge of the MP3 audio format.
bit rate
Digital audio formats are audio signals that are recorded, processed, and reproduced in digital form.
bit rate
The emergence of digital audio formats is to meet the needs of high-fidelity playback, storage and transmission. Simply put, early analog audio formats had issues with playback distortion and glitches due to media wear. Since the advent of the CD, digital format audio files have become popular, but another problem has arisen: the limitation of the storage volume, and the CD still has the phenomenon of wear. Saving to hard drive (relatively longer storage time) is not a good solution when storage media (mainly hard drives) are still expensive at the time. The rise of the Internet has created a requirement for long-distance file transmission. Under the restriction of bandwidth, the demand to reduce file size has become more intense. All this has led to the generation of lossy compressed digital audio formats from external factors!
In terms of internal factors, with the improvement of computing and coding capabilities, the progress of various acoustic psychological models has promoted the emergence of various lossy compressed digital audio formats. Some of the most commonly used audio formats in MP3 players are briefly introduced below: MP3 (CBR, VBR, ABR), WMA, WAV, ADPCM, and the emerging audio formats AAC, ASF, and OGG.
Before introducing various digital audio formats, let’s clarify one concept: bitrate.
In the field of computing, all information is digitized. Bit is the smallest unit of data in a computer, it refers to a number of 0 or 1, which is a mathematical binary number, a “0” or “1” , is a bit. For example, when we say a 2-digit number, it means that it is a two-digit binary number, and there are 4 combinations of “00”, “01”, “10” and “11”, which represent 0, 1, 2 and 3 is four numbers.