The MP3 lossy compression works by reducing (or approximating) the accuracy of certain parts of a continuous sound that are considered to be beyond the auditory resolution ability of most people. This method is commonly referred to as perceptual coding or "psychoacoustics" . It uses psychoacoustic models to discard or reduce the precision of components less audible to human hearing, and then records the remaining information in an efficient manner.
MP3 was designed by the
Moving Picture Experts Group
* 1 History
* 1.1 Development * 1.2 Standardization * 1.3 Going public * 1.4 Internet distribution
* 2 Design
* 3 Licensing, ownership and legislation * 4 Alternative technologies * 5 See also * 6 References * 7 Further reading * 8 External links
The MP3 lossy audio data compression algorithm takes advantage of a perceptual limitation of human hearing called auditory masking . In 1894, the American physicist Alfred M. Mayer reported that a tone could be rendered inaudible by another tone of lower frequency. In 1959, Richard Ehmer described a complete set of auditory curves regarding this phenomenon. Ernst Terhardt _et al._ created an algorithm describing auditory masking with high accuracy. This work added to a variety of reports from authors dating back to Fletcher, and to the work that initially determined critical ratios and critical bandwidths.
The psychoacoustic masking codec was first proposed in 1979,
apparently independently, by
Manfred R. Schroeder
Both Krasner and Schroeder built upon the work performed by Eberhard
F. Zwicker in the areas of tuning and masking of critical frequency
bands, that in turn built on the fundamental research in the area
Moving Picture Experts Group
The genesis of the
MP3 technology is fully described in a paper from
Professor Hans Musmann, who chaired the ISO
MPEG Audio group for
several years. In December 1988,
MPEG called for an audio coding
standard. In June 1989, 14 audio coding algorithms were submitted.
Because of certain similarities between these coding proposals, they
were clustered into four development groups. The first group was
MUSICAM , by Matsushita , CCETT , ITT and
The immediate predecessors of MP3 were "Optimum Coding in the Frequency Domain" (OCF), and Perceptual Transform Coding (PXFM). These two codecs, along with block-switching contributions from Thomson-Brandt, were merged into a codec called ASPEC, which was submitted to MPEG, and which won the quality competition, but that was mistakenly rejected as too complex to implement. The first practical implementation of an audio perceptual coder (OCF) in hardware (Krasner's hardware was too cumbersome and slow for practical use), was an implementation of a psychoacoustic transform coder based on Motorola 56000 DSP chips.
Another predecessor of the
MP3 format and technology is to be found
in the perceptual codec
MUSICAM based on an integer arithmetics 32
sub-bands filterbank, driven by a psychoacoustic model. It was
primarily designed for Digital Audio Broadcasting (digital radio) and
digital TV, and its basic principles disclosed to the scientific
community by CCETT (France) and IRT (Germany) in Atlanta during an
IEEE-ICASSP conference in 1991, after having worked on
This codec incorporated into a broadcasting system using COFDM modulation was demonstrated on air and on the field together with Radio Canada and CRC Canada during the NAB show (Las Vegas) in 1991. The implementation of the audio part of this broadcasting system was based on a two chips encoder (one for the subband transform, one for the psychoacoustic model designed by the team of G. Stoll (IRT Germany), later known as psychoacoustic model I) and a real time decoder using one Motorola 56001 DSP chip running an integer arithmetics software designed by Y.F. Dehery's team (CCETT , France). The simplicity of the corresponding decoder together with the high audio quality of this codec using for the first time a 48 kHz sampling frequency, a 20 bits/sample input format (the highest available sampling standard in 1991, compatible with the AES/EBU professional digital input studio standard) were the main reasons to later adopt the characteristics of MUSICAM as the basic features for an advanced digital music compression codec.
During the development of the MUSICAM encoding software, Stoll and Dehery's team made a thorough use of a set of high quality audio assessment material selected by a group of audio professionals from the European Broadcasting Union and later used as a reference for the assessment of music compression codecs . The subband coding technique was found to be efficient, not only for the perceptual coding of the high quality sound materials but especially for the encoding of critical percussive sound materials (drums, triangle, ..) due to the specific temporal masking effect of the MUSICAM sub-band filterbank (this advantage being a specific feature of short transform coding techniques).
As a doctoral student at Germany's
University of Erlangen-Nuremberg ,
Karlheinz Brandenburg began working on digital music compression in
the early 1980s, focusing on how people perceive music. He completed
his doctoral work in 1989.
MP3 is directly descended from OCF and
PXFM, representing the outcome of the collaboration of
Brandenburg—working as a postdoc at AT&T-
In 1991, there were two available proposals that were assessed for an
MPEG audio standard:
MUSICAM (Masking pattern adapted Universal
Subband Integrated Coding And Multiplexing) and ASPEC (Adaptive
Spectral Perceptual Entropy Coding). As proposed by the Dutch
While much of MUSICAM technology and ideas were incorporated into the definition of MPEG Audio Layer I and Layer II, the filter bank alone and the data structure based on 1152 samples framing (file format and byte oriented stream) of MUSICAM remained in the Layer III (MP3) format, as part of the computationally inefficient hybrid filter bank. Under the chairmanship of Professor Musmann of the University of Hanover , the editing of the standard was delegated to Dutchman Leon van de Kerkhof , to German Gerhard Stoll , to Frenchman Yves-François Dehery , who worked on Layer I and Layer II. ASPEC was the joint proposal of AT"> Diagram of the structure of an MP3 file (MPEG version 2.5 not supported, hence 12 instead of 11 bits for MP3 Sync Word).
MP3 file is made up of
MP3 frames, which consist of a header and a
data block. This sequence of frames is called an elementary stream .
Due to the "byte reservoir", frames are not independent items and
cannot usually be extracted on arbitrary frame boundaries. The MP3
Data blocks contain the (compressed) audio information in terms of
frequencies and amplitudes. The diagram shows that the
consists of a sync word , which is used to identify the beginning of a
valid frame. This is followed by a bit indicating that this is the
MPEG standard and two bits that indicate that layer 3 is used; hence
Joint stereo is done only on a frame-to-frame basis.
ENCODING AND DECODING
During encoding, 576 time-domain samples are taken and are transformed to 576 frequency-domain samples . If there is a transient , 192 samples are taken instead of 576. This is done to limit the temporal spread of quantization noise accompanying the transient. (See psychoacoustics .) Frequency resolution is limited by the small long block window size, which decreases coding efficiency. Time resolution can be too low for highly transient signals and may cause smearing of percussive sounds.
Due to the tree structure of the filter bank, pre-echo problems are made worse, as the combined impulse response of the two filter banks does not, and cannot, provide an optimum solution in time/frequency resolution. Additionally, the combining of the two filter banks' outputs creates aliasing problems that must be handled partially by the "aliasing compensation" stage; however, that creates excess energy to be coded in the frequency domain, thereby decreasing coding efficiency.
Decoding, on the other hand, is carefully defined in the standard. Most decoders are "bitstream compliant", which means that the decompressed output that they produce from a given MP3 file will be the same, within a specified degree of rounding tolerance, as the output specified mathematically in the ISO/IEC high standard document (ISO/IEC 11172-3). Therefore, comparison of decoders is usually based on how computationally efficient they are (i.e., how much memory or CPU time they use in the decoding process). Over time this concern has become less of an issue as CPU speeds transitioned from MHz to GHz. Encoder/decoder overall delay is not defined, which means there is no official provision for gapless playback . However, some encoders such as LAME can attach additional metadata that will allow players that can handle it to deliver seamless playback.
When performing lossy audio encoding, such as creating an MP3 data stream, there is a trade-off between the amount of data generated and the sound quality of the results. The person generating an MP3 selects a bit rate , which specifies how many kilobits per second of audio are desired. The higher the bit rate, the larger the MP3 data stream will be, and, generally, the closer it will sound to the original recording. With too low a bit rate, compression artifacts (i.e., sounds that were not present in the original recording) may be audible in the reproduction. Some audio is hard to compress because of its randomness and sharp attacks. When this type of audio is compressed, artifacts such as ringing or pre-echo are usually heard. A sample of applause compressed or an excerpt of triangle instrument with a relatively low bit rate provides a good example of compression artifacts. Most subjective testings on perceptual codecs tend to avoid using this type of extremely critical sound materials however this type of artifacts generated by percussive sounds is barely perceptible on the MP3 format due to the specific temporal masking feature of the 32 sub-band filterbank of Layer II on which the MP3 format is based.
Besides the bit rate of an encoded piece of audio, the quality of MP3 encoded sound also depends on the quality of the encoder algorithm as well as the complexity of the signal being encoded. As the MP3 standard allows quite a bit of freedom with encoding algorithms, different encoders do feature quite different quality, even with identical bit rates. As an example, in a public listening test featuring two early MP3 encoders set at about 128 kbit/s, one scored 3.66 on a 1–5 scale, while the other scored only 2.22. Quality is dependent on the choice of encoder and encoding parameters.
This observation caused a revolution in audio encoding. Early on
bitrate was the prime and only consideration. At the time
were of the very simplest type: they used the same bit rate for the
entire file: this process is known as
Constant Bit Rate (CBR)
encoding. Using a constant bit rate makes encoding simpler and less
CPU intensive. However, it is also possible to create files where the
bit rate changes throughout the file. These are known as Variable Bit
Rate The bit reservoir and VBR encoding were actually part of the
Perceived quality can be influenced by listening environment (ambient noise), listener attention, and listener training and in most cases by listener audio equipment (such as sound cards, speakers and headphones). Furthermore, sufficient quality may be achieved by a lesser quality setting for lectures and human speech applications and reduces encoding time and complexity. A test given to new students by Stanford University Music Professor Jonathan Berger showed that student preference for MP3-quality music has risen each year. Berger said the students seem to prefer the 'sizzle' sounds that MP3s bring to music.
An in-depth study of MP3 audio quality, sound artist and composer Ryan Maguire 's project "The Ghost in the MP3" isolates the sounds lost during MP3 compression. In 2015, he released the track "moDernisT" (an anagram of "Tom's Diner"), composed exclusively from the sounds deleted during MP3 compression of the song "Tom's Diner", the track originally used in the formulation of the MP3 standard. A detailed account of the techniques used to isolate the sounds deleted during MP3 compression, along with the conceptual motivation for the project, was published in the 2014 Proceedings of the International Computer Music Conference.
MPEG Audio Layer III available bit rates (kbit/s) MPEG-1 Audio Layer III MPEG-2 Audio Layer III MPEG-2.5 Audio Layer III
– 8 8
– 16 16
– 24 24
32 32 32
40 40 40
48 48 48
56 56 56
64 64 64
192 – –
224 – –
256 – –
320 – –
Supported sampling rates by MPEG Audio Format MPEG-1 Audio Layer III MPEG-2 Audio Layer III MPEG-2.5 Audio Layer III
– – 8000 Hz
– – 11025 Hz
– – 12000 Hz
– 16000 Hz –
– 22050 Hz –
– 24000 Hz –
32000 Hz – –
44100 Hz – –
48000 Hz – –
Bitrate is the product of the sample rate and number of bits per
sample used to encode the music. CD audio is 44100 samples per second.
The number of bits per sample also depends on the number of audio
channels. CD is stereo and 16 bits per channel. So, multiplying 44100
by 32 gives 1411200—the bitrate of uncompressed CD digital audio.
MP3 was designed to encode this 1411 kbit/s data at 320 kbit/s or
less. As less complex passages are detected by
MP3 algorithms then
lower bitrates may be employed. When using
As shown in these two tables, 14 selected bit rates are allowed in
For the general field of human speech reproduction, a bandwidth of 5512 Hz is sufficient to produce excellent results (for voice) using the sampling rate of 11025 and VBR encoding from 44100 (standard) wave files.. This is easily accomplished using LAME version 3.99.5 and the command line "lame -V 9.6 lecture.WAV" English speakers average 41-42kbit/s with -V 9.6 setting but this may vary with amount of silence recorded or the rate of delivery (wpm). Resampling to 12000 (6K bandwidth) is selected by the LAME parameter -V 9.4 Likewise -V 9.2 selects 16000 sample rate and a resultant 8K lowpass filtering. For more info see Nyquist – Shannon. Older versions of LAME and FFmpeg only support integer arguments for variable bit rate quality selection parameter. The n.nnn quality parameter (-V) is documented at lame.sourceforge.net but is only supported in LAME with the new style VBR variable bit rate quality selector—not average bit rate (ABR).
A sample rate of 44.1 kHz is commonly used for music reproduction, because this is also used for CD audio , the main source used for creating MP3 files. A great variety of bit rates are used on the Internet. A bit rate of 128 kbit/s is commonly used, at a compression ratio of 11:1, offering adequate audio quality in a relatively small space. As Internet bandwidth availability and hard drive sizes have increased, higher bit rates up to 320 kbit/s are widespread. Uncompressed audio as stored on an audio-CD has a bit rate of 1,411.2 kbit/s, (16 bit/sample × 44100 samples/second × 2 channels / 1000 bits/kilobit), so the bitrates 128, 160 and 192 kbit/s represent compression ratios of approximately 11:1, 9:1 and 7:1 respectively.
Non-standard bit rates up to 640 kbit/s can be achieved with the LAME encoder and the freeformat option, although few MP3 players can play those files. According to the ISO standard, decoders are only required to be able to decode streams up to 320 kbit/s. Early MPEG Layer III encoders used what is now called Constant Bit Rate (CBR). The software was only able to use a uniform bitrate on all frames in an MP3 file. Later more sophisticated MP3 encoders were able to use the bit reservoir to target an average bit rate selecting the encoding rate for each frame based on the complexity of the sound in that portion of the recording.
A more sophisticated MP3 encoder can produce variable bitrate audio. MPEG audio may use bitrate switching on a per-frame basis, but only layer III decoders must support it. VBR is used when the goal is to achieve a fixed level of quality. The final file size of a VBR encoding is less predictable than with constant bitrate . Average bitrate is a type of VBR implemented as a compromise between the two: the bitrate is allowed to vary for more consistent quality, but is controlled to remain near an average value chosen by the user, for predictable file sizes. Although an MP3 decoder must support VBR to be standards compliant, historically some decoders have bugs with VBR decoding, particularly before VBR encoders became widespread. The most evolved LAME MP3 encoder supports the generation of VBR, ABR, and even the ancient CBR MP3 formats.
Layer III audio can also use a "bit reservoir", a partially full frame's ability to hold part of the next frame's audio data, allowing temporary changes in effective bitrate, even in a constant bitrate stream. Internal handling of the bit reservoir increases encoding delay. There is no scale factor band 21 (sfb21) for frequencies above approx 16 kHz , forcing the encoder to choose between less accurate representation in band 21 or less efficient storage in all bands below band 21, the latter resulting in wasted bitrate in VBR encoding.
The ancillary data field can be used to store user defined data. The ancillary data is optional and the number of bits available is not explicitly given. The ancillary data is located after the Huffman code bits and ranges to where the next frame's main_data_begin points to. mp3PRO uses ancillary data to encode their bits to improve audio quality.
A "tag" in an audio file is a section of the file that contains metadata such as the title, artist, album, track number or other information about the file's contents. The MP3 standards do not define tag formats for MP3 files, nor is there a standard container format that would support metadata and obviate the need for tags. However, several _de facto_ standards for tag formats exist. As of 2010, the most widespread are ID3v1 and ID3v2 , and the more recently introduced APEv2 . These tags are normally embedded at the beginning or end of MP3 files, separate from the actual MP3 frame data. MP3 decoders either extract information from the tags, or just treat them as ignorable, non- MP3 junk data.
In September 2006, German officials seized MP3 players from SanDisk 's booth at the IFA show in Berlin after an Italian patents firm won an injunction on behalf of Sisvel against SanDisk in a dispute over licensing rights. The injunction was later reversed by a Berlin judge, but that reversal was in turn blocked the same day by another judge from the same court, "bringing the Patent Wild West to Germany" in the words of one commentator. In February 2007, Texas MP3 Technologies sued Apple, Samsung Electronics and Sandisk in eastern Texas federal court , claiming infringement of a portable MP3 player patent that Texas MP3 said it had been assigned. Apple, Samsung, and Sandisk all settled the claims against them in January 2009.
Alcatel-Lucent has asserted several MP3 coding and compression patents, allegedly inherited from AT it was co-owned by AT codecs="vorbis"" data-title=" Ogg Vorbis" data-shorttitle=" Ogg Vorbis" data-transcodekey="ogg" data-width="0" data-height="0" data-bandwidth="109744" /> The first is uncompressed WAV file. The second is a Vorbis file encoded at 48kbit/s, and third is an MP3 encoded at 48kbit/s using LAME . -------------------------
Problems playing this file? See media help ._
Main article: List of codecs
Other lossy formats exist. Among these, mp3PRO , AAC , and MP2 are all members of the same technological family as MP3 and depend on roughly similar psychoacoustic models . The Fraunhofer Society owns many of the basic patents underlying these formats as well, with others held by Alcatel-Lucent, and Thomson Consumer Electronics . There are also open compression formats like Opus and Vorbis that are available free of charge and without any known patent restrictions. Some of the newer audio compression formats, such as AAC, WMA Pro and Vorbis, are free of some limitations inherent to the MP3 format that cannot be overcome by any MP3 encoder.
Besides lossy compression methods, lossless formats are a significant alternative to MP3 because they provide unaltered audio content, though with an increased file size compared to lossy compression. Lossless formats include FLAC (Free Lossless Audio Codec), Apple Lossless and many others.
* Information technology portal
* ^ _A_ _B_ "Happy Birthday MP3!". Fraunhofer IIS. 12 July 2005.
Retrieved 18 July 2010.
* ^ "The audio/mpeg Media Type — RFC 3003". IETF. November 2000.
Retrieved 7 December 2009.
* ^ "MIME Type Registration of RTP Payload Formats — RFC 3555".
IETF. July 2003. Retrieved 7 December 2009.
* ^ _A_ _B_ "A More Loss-Tolerant RTP Payload Format for
— RFC 5219". IETF. February 2008. Retrieved 4 December 2014.
* ^ _A_ _B_ _C_ _D_ _E_ "ISO/IEC 11172-3:1993 – Information
technology — Coding of moving pictures and associated audio for
digital storage media at up to about 1,5 Mbit/s — Part 3: Audio".
ISO. 1993. Retrieved 14 July 2010.
* ^ _A_ _B_ _C_ _D_ "ISO/IEC 13818-3:1995 – Information
technology — Generic coding of moving pictures and associated audio
information — Part 3: Audio". ISO. 1995. Retrieved 14 July 2010.
* ^ "
MP3 technology at Fraunhofer IIS".
* ^ "
MPEG Layer III Audio Encoding)". digitalpreservation.gov.
2012-03-02. Retrieved 2016-03-30.
* ^ Jayant, Nikil; Johnston, James; Safranek, Robert (October
1993). "Signal Compression Based on Models of Human Perception".
_Proceedings of the IEEE_. 81 (10): 1385–1422. doi :10.1109/5.241504
* ^ _A_ _B_ Chiariglione, Leonardo (6 September 2009). "Riding the
Media Bits — MPEG\'s first Steps". Archived from the original on 1
November 2011. Retrieved 4 December 2014.
* ^ _A_ _B_ ISO (November 1991). "
MPEG Press Release, Kurihama,
November 1991". ISO. Retrieved 17 July 2010.
* ^ _A_ _B_ _C_ _D_ _E_ ISO (November 1991). "CD 11172-3 – CODING
OF MOVING PICTURES AND ASSOCIATED AUDIO FOR DIGITAL STORAGE MEDIA AT
UP TO ABOUT 1.5 MBIT/s Part 3 AUDIO" (PDF). Retrieved 17 July 2010.
* ^ _A_ _B_ ISO (6 November 1992). "
MPEG Press Release, London, 6
November 1992". Chiariglione. Retrieved 17 July 2010.
* ^ _A_ _B_ _C_ ISO (October 1998). "
MPEG Audio FAQ Version 9 –
_ Wikimedia Commons has media related to MP3 _.