MP3 (formawwy MPEG-1 Audio Layer III or MPEG-2 Audio Layer III)[4] is a coding format for digitaw audio. Originawwy defined as de dird audio format of de MPEG-1 standard, it was retained and furder extended[by whom?]—defining additionaw bit-rates and support for more audio channews—as de dird audio format of de subseqwent MPEG-2 standard. A dird version, known as MPEG 2.5—extended to better support wower bit rates—is commonwy impwemented, but is not a recognized standard.

In de aspects of MP3 pertaining to audio compression—de aspect of de standard most apparent to end-users (and for which is it best known)—MP3 uses wossy data-compression to encode data using inexact approximations and de partiaw discarding of data. This awwows a warge reduction in fiwe sizes when compared to uncompressed audio. The combination of smaww size and acceptabwe fidewity wed to a boom in de distribution of music over de Internet in de mid- to wate-1990s, wif MP3 serving as an enabwing technowogy at a time when bandwidf and storage were stiww at a premium. The MP3 format soon became associated wif controversies surrounding copyright infringement, music piracy, and de fiwe ripping/ sharing services MP3.com and Napster, among oders. Wif de advent of portabwe media pwayers, a product category awso incwuding smartphones, MP3 support remains near-universaw.

MP3 compression works by reducing (or approximating) de accuracy of certain components of sound dat are considered[by whom?] to be beyond de hearing capabiwities of most humans. This medod is commonwy referred to as perceptuaw coding or as psychoacoustic modewing.[8] The remaining audio information is den recorded in a space-efficient manner. Compared to CD-qwawity digitaw audio, MP3 compression can commonwy achieve a 75 to 95% reduction in size. For exampwe, an MP3 encoded at a constant bitrate of 128 kbit/s wouwd resuwt in a fiwe approximatewy 9% of de size of de originaw CD audio.[9]

Awso designed[by whom?] as a streamabwe format, segments of a transmission can be wost widout affecting de abiwity to decode water segments.

The MP3 wossy audio data compression awgoridm takes advantage of a perceptuaw wimitation of human hearing cawwed auditory masking. In 1894, de American physicist Awfred M. Mayer reported dat a tone couwd be rendered inaudibwe by anoder tone of wower freqwency.[15] In 1959, Richard Ehmer described a compwete set of auditory curves regarding dis phenomenon, uh-hah-hah-hah.[16] Ernst Terhardt et aw. created an awgoridm describing auditory masking wif high accuracy.[17] This work added to a variety of reports from audors dating back to Fwetcher, and to de work dat initiawwy determined criticaw ratios and criticaw bandwidds.

The psychoacoustic masking codec was first proposed in 1979, apparentwy independentwy, by Manfred R. Schroeder, et aw.[18] from Beww Tewephone Laboratories, Inc. in Murray Hiww, New Jersey, and M. A. Krasner[19] bof in de United States. Krasner was de first to pubwish and to produce hardware for speech (not usabwe as music bit compression), but de pubwication[20] of his resuwts as a rewativewy obscure Lincown Laboratory Technicaw Report, did not immediatewy infwuence de mainstream of psychoacoustic codec devewopment. Manfred Schroeder was awready a weww-known and revered figure in de worwdwide community of acousticaw and ewectricaw engineers, but his paper was not much noticed, since it described negative resuwts due to de particuwar nature of speech and de winear predictive coding (LPC) gain present in speech.

Bof Krasner and Schroeder buiwt upon de work performed by Eberhard F. Zwicker in de areas of tuning and masking of criticaw freqwency bands,[21][22] dat in turn buiwt on de fundamentaw research in de area from Beww Labs of Harvey Fwetcher and his cowwaborators.[23] A wide variety of (mostwy perceptuaw) audio compression awgoridms were reported in IEEE's refereed Journaw on Sewected Areas in Communications.[24] That journaw reported in February 1988 on a wide range of estabwished, working audio bit compression technowogies, some of dem using auditory masking as part of deir fundamentaw design, and severaw showing reaw-time hardware impwementations.

The genesis of de MP3 technowogy is fuwwy described in a paper from Professor Hans Musmann,[25] who chaired de ISO MPEG Audio group for severaw years. In December 1988, MPEG cawwed for an audio coding standard. In June 1989, 14 audio coding awgoridms were submitted. Because of certain simiwarities between dese coding proposaws, dey were cwustered into four devewopment groups. The first group was MUSICAM, by Matsushita, CCETT, ITT and Phiwips. The second group was ASPEC, by AT&T, France Tewecom, Fraunhofer Gesewwschaft, Deutsche and Thomson-Brandt. The dird group was ATAC, by Fujitsu, JVC, NEC and Sony. And de fourf group was SB-ADPCM, by NTT and BTRL.[25]

The immediate predecessors of MP3 were "Optimum Coding in de Freqwency Domain" (OCF),[26] and Perceptuaw Transform Coding (PXFM).[27] These two codecs, awong wif bwock-switching contributions from Thomson-Brandt, were merged into a codec cawwed ASPEC, which was submitted to MPEG, and which won de qwawity competition, but dat was mistakenwy rejected as too compwex to impwement. The first practicaw impwementation of an audio perceptuaw coder (OCF) in hardware (Krasner's hardware was too cumbersome and swow for practicaw use), was an impwementation of a psychoacoustic transform coder based on Motorowa 56000DSP chips.

Anoder predecessor of de MP3 format and technowogy is to be found in de perceptuaw codec MUSICAM based on an integer aridmetics 32 sub-bands fiwterbank, driven by a psychoacoustic modew. It was primariwy designed for Digitaw Audio Broadcasting (digitaw radio) and digitaw TV, and its basic principwes discwosed to de scientific community by CCETT (France) and IRT (Germany) in Atwanta during an IEEE-ICASSP conference in 1991,[28] after having worked on MUSICAM wif Matsushita and Phiwips since 1989.[25]

This codec incorporated into a broadcasting system using COFDM moduwation was demonstrated on air and on de fiewd[29] togeder wif Radio Canada and CRC Canada during de NAB show (Las Vegas) in 1991. The impwementation of de audio part of dis broadcasting system was based on a two chips encoder (one for de subband transform, one for de psychoacoustic modew designed by de team of G. Stoww (IRT Germany), water known as psychoacoustic modew I) and a reaw time decoder using one Motorowa 56001DSP chip running an integer aridmetics software designed by Y.F. Dehery's team (CCETT, France). The simpwicity of de corresponding decoder togeder wif de high audio qwawity of dis codec using for de first time a 48 kHz sampwing freqwency, a 20 bits/sampwe input format (de highest avaiwabwe sampwing standard in 1991, compatibwe wif de AES/EBU professionaw digitaw input studio standard) were de main reasons to water adopt de characteristics of MUSICAM as de basic features for an advanced digitaw music compression codec.

During de devewopment of de MUSICAM encoding software, Stoww and Dehery's team made a dorough use of a set of high qwawity audio assessment materiaw[30] sewected by a group of audio professionaws from de European Broadcasting Union and water used as a reference for de assessment of music compression codecs . The subband coding techniqwe was found to be efficient, not onwy for de perceptuaw coding of de high qwawity sound materiaws but especiawwy for de encoding of criticaw percussive sound materiaws (drums, triangwe, ..) due to de specific temporaw masking effect of de MUSICAM sub-band fiwterbank (dis advantage being a specific feature of short transform coding techniqwes).

As a doctoraw student at Germany's University of Erwangen-Nuremberg, Karwheinz Brandenburg began working on digitaw music compression in de earwy 1980s, focusing on how peopwe perceive music. He compweted his doctoraw work in 1989.[31] MP3 is directwy descended from OCF and PXFM, representing de outcome of de cowwaboration of Brandenburg—working as a postdoc at AT&T-Beww Labs wif James D. Johnston ("JJ") of AT&T-Beww Labs—wif de Fraunhofer Institute for Integrated Circuits, Erwangen (where he worked wif Bernhard Griww and four oder researchers – "The Originaw Six"[32]), wif rewativewy minor contributions from de MP2 branch of psychoacoustic sub-band coders. In 1990, Brandenburg became an assistant professor at Erwangen-Nuremberg. Whiwe dere, he continued to work on music compression wif scientists at de Fraunhofer Society (in 1993 he joined de staff of de Fraunhofer Institute).[31] The song "Tom's Diner" by Suzanne Vega was de first song used by Karwheinz Brandenburg to devewop de MP3. Brandenburg adopted de song for testing purposes, wistening to it again and again each time refining de scheme, making sure it did not adversewy affect de subtwety of Vega's voice.[33]

In 1991, dere were two avaiwabwe proposaws dat were assessed for an MPEG audio standard: MUSICAM (Masking pattern adapted Universaw Subband Integrated Coding And Muwtipwexing) and ASPEC (Adaptive Spectraw Perceptuaw Entropy Coding). As proposed by de Dutch corporation Phiwips, de French research institute CCETT, and de German standards organization Institute for Broadcast Technowogy, de MUSICAM techniqwe was chosen due to its simpwicity and error robustness, as weww as for its high wevew of computationaw efficiency.[34] The MUSICAM format, based on sub-band coding, became de basis for de MPEG Audio compression format, incorporating, for exampwe, its frame structure, header format, sampwe rates, etc.

Whiwe much of MUSICAM technowogy and ideas were incorporated into de definition of MPEG Audio Layer I and Layer II, de fiwter bank awone and de data structure based on 1152 sampwes framing (fiwe format and byte oriented stream) of MUSICAM remained in de Layer III (MP3) format, as part of de computationawwy inefficient hybrid fiwter bank. Under de chairmanship of Professor Musmann of de University of Hanover, de editing of de standard was dewegated to Dutchman Leon van de Kerkhof, to German Gerhard Stoww, to Frenchman Yves-François Dehery, who worked on Layer I and Layer II. ASPEC was de joint proposaw of AT&T Beww Laboratories, Thomson Consumer Ewectronics, Fraunhofer Society and CNET.[35] It provided de highest coding efficiency.

A working group consisting of van de Kerkhof, Stoww, Itawian Leonardo Chiarigwione (CSELT VP for Media), Frenchman Yves-François Dehery, German Karwheinz Brandenburg, and American James D. Johnston (United States) took ideas from ASPEC, integrated de fiwter bank from Layer II, added some of deir own ideas such as de joint stereo coding of MUSICAM and created de MP3 format, which was designed to achieve de same qwawity at 128 kbit/s as MP2 at 192 kbit/s.

The awgoridms for MPEG-1 Audio Layer I, II and III were approved in 1991[11][12] and finawized in 1992[13] as part of MPEG-1, de first standard suite by MPEG, which resuwted in de internationaw standard ISO/IEC 11172-3 (a.k.a. MPEG-1 Audio or MPEG-1 Part 3), pubwished in 1993.[5] Fiwes or data streams conforming to dis standard must handwe sampwe rates of 48k, 44100 and 32k and continue to be supported by current MP3 pwayers and decoders. Thus de first generation of MP3 defined 14*3=42 interpretations of MP3 frame data structures and size wayouts.

Furder work on MPEG audio[36] was finawized in 1994 as part of de second suite of MPEG standards, MPEG-2, more formawwy known as internationaw standard ISO/IEC 13818-3 (a.k.a. MPEG-2 Part 3 or backwards compatibwe MPEG-2 Audio or MPEG-2 Audio BC[14]), originawwy pubwished in 1995.[6][37] MPEG-2 Part 3 (ISO/IEC 13818-3) defined 42 additionaw bit rates and sampwe rates for MPEG-1 Audio Layer I, II and III. The new sampwing rates are exactwy hawf dat of dose originawwy defined in MPEG-1 Audio. This reduction in sampwing rate serves to cut de avaiwabwe freqwency fidewity in hawf whiwe wikewise cutting de bitrate by 50%.
MPEG-2 Part 3 awso enhanced MPEG-1's audio by awwowing de coding of audio programs wif more dan two channews, up to 5.1 muwtichannew.[36] An MP3 coded wif MPEG-2 resuwts in hawf of de bandwidf reproduction of MPEG-1 appropriate for piano and singing.

A dird generation of "MP3" stywe data streams (fiwes) extended de MPEG-2 ideas and impwementation but was named MPEG-2.5 audio, since MPEG-3 awready had a different meaning. This extension was devewoped at Fraunhofer IIS, de registered patent howders of MP3 by reducing de frame sync fiewd in de MP3 header from 12 to 11 bits. As in de transition from MPEG-1 to MPEG-2, MPEG-2.5 adds additionaw sampwing rates exactwy hawf of dose avaiwabwe using MPEG-2. It dus widens de scope of MP3 to incwude human speech and oder appwications yet reqwires onwy 25% of de bandwidf (freqwency reproduction) possibwe using MPEG-1 sampwing rates. Whiwe not an ISO recognized standard, MPEG-2.5 is widewy supported by bof inexpensive Chinese and brand name digitaw audio pwayers as weww as computer software based MP3 encoders (LAME), decoders (FFmpeg) and pwayers (MPC) adding 3*8=24 additionaw MP3 frame types. Each generation of MP3 dus supports 3 sampwing rates exactwy hawf dat of de previous generation for a totaw of 9 varieties of MP3 format fiwes. The sampwe rate comparison tabwe between MPEG-1, 2 and 2.5 is given water in de articwe.[38][39] MPEG-2.5 is supported by LAME (since 2000), Media Pwayer Cwassic (MPC), iTunes, and FFmpeg.

MPEG-2.5 was not devewoped by MPEG (see above) and was never approved as an internationaw standard. MPEG-2.5 is dus an unofficiaw or proprietary extension to de MP3 format. It is nonedewess ubiqwitous and especiawwy advantageous for wow-bit rate human speech appwications.

Compression efficiency of encoders is typicawwy defined by de bit rate, because compression ratio depends on de bit depf and sampwing rate of de input signaw. Neverdewess, compression ratios are often pubwished. They may use de Compact Disc (CD) parameters as references (44.1 kHz, 2 channews at 16 bits per channew or 2×16 bit), or sometimes de Digitaw Audio Tape (DAT) SP parameters (48 kHz, 2×16 bit). Compression ratios wif dis watter reference are higher, which demonstrates de probwem wif use of de term compression ratio for wossy encoders.

Karwheinz Brandenburg used a CD recording of Suzanne Vega's song "Tom's Diner" to assess and refine de MP3 compression awgoridm. This song was chosen because of its nearwy monophonic nature and wide spectraw content, making it easier to hear imperfections in de compression format during pwaybacks. Some refer to Suzanne Vega as "The moder of MP3".[41] This particuwar track has an interesting property in dat de two channews are awmost, but not compwetewy, de same, weading to a case where Binauraw Masking Levew Depression causes spatiaw unmasking of noise artifacts unwess de encoder properwy recognizes de situation and appwies corrections simiwar to dose detaiwed in de MPEG-2 AAC psychoacoustic modew. Some more criticaw audio excerpts (gwockenspiew, triangwe, accordion, etc.) were taken from de EBU V3/SQAM reference compact disc and have been used by professionaw sound engineers to assess de subjective qwawity of de MPEG Audio formats. LAME is de most advanced MP3 encoder. LAME incwudes a VBR variabwe bit rate encoding which uses a qwawity parameter rader dan a bit rate goaw. Later versions 2008+) support an n, uh-hah-hah-hah.nnn qwawity goaw which automaticawwy sewects MPEG-2 or MPEG-2.5 sampwing rates as appropriate for human speech recordings which need onwy 5512 Hz bandwidf resowution, uh-hah-hah-hah.

A reference simuwation software impwementation, written in de C wanguage and water known as ISO 11172-5, was devewoped (in 1991–1996) by de members of de ISO MPEG Audio committee in order to produce bit compwiant MPEG Audio fiwes (Layer 1, Layer 2, Layer 3). It was approved as a committee draft of ISO/IEC technicaw report in March 1994 and printed as document CD 11172-5 in Apriw 1994.[42] It was approved as a draft technicaw report (DTR/DIS) in November 1994,[43] finawized in 1996 and pubwished as internationaw standard ISO/IEC TR 11172-5:1998 in 1998.[44] The reference software in C wanguage was water pubwished as a freewy avaiwabwe ISO standard.[45] Working in non-reaw time on a number of operating systems, it was abwe to demonstrate de first reaw time hardware decoding (DSP based) of compressed audio. Some oder reaw time impwementation of MPEG Audio encoders and decoders[46] were avaiwabwe for de purpose of digitaw broadcasting (radio DAB, tewevision DVB) towards consumer receivers and set top boxes.

On 7 Juwy 1994, de Fraunhofer Society reweased de first software MP3 encoder cawwed w3enc.[47] The fiwename extension.mp3 was chosen by de Fraunhofer team on 14 Juwy 1995 (previouswy, de fiwes had been named .bit).[1] Wif de first reaw-time software MP3 pwayer WinPway3 (reweased 9 September 1995) many peopwe were abwe to encode and pway back MP3 fiwes on deir PCs. Because of de rewativewy smaww hard drives back in dat time (~ 500–1000 MB) wossy compression was essentiaw to store non-instrument based (see tracker and MIDI) music for pwayback on computer. As sound schowar Jonadan Sterne notes, "An Austrawian hacker acqwired w3enc using a stowen credit card. The hacker den reverse-engineered de software, wrote a new user interface, and redistributed it for free, naming it "dank you Fraunhofer"".[48]

In de second hawf of de 1990s, MP3 fiwes began to spread on de Internet, often via underground pirated song networks. The first known experiment in Internet distribution was organized in de earwy 1990s by de Internet Underground Music Archive, better known by de acronym IUMA. After some experiments[49] using uncompressed audio fiwes, dis archive started to dewiver on de native worwdwide wow speed Internet some compressed MPEG Audio fiwes using de MP2 (Layer II) format and water on used MP3 fiwes when de standard was fuwwy compweted. The popuwarity of MP3s began to rise rapidwy wif de advent of Nuwwsoft's audio pwayer Winamp, reweased in 1997. In 1998, de first portabwe sowid state digitaw audio pwayer MPMan, devewoped by SaeHan Information Systems which is headqwartered in Seouw, Souf Korea, was reweased and de Rio PMP300 was sowd afterwards in 1998, despite wegaw suppression efforts by de RIAA.[50]

In November 1997, de website mp3.com was offering dousands of MP3s created by independent artists for free.[50] The smaww size of MP3 fiwes enabwed widespread peer-to-peerfiwe sharing of music ripped from CDs, which wouwd have previouswy been nearwy impossibwe. The first warge peer-to-peer fiwesharing network, Napster, was waunched in 1999. The ease of creating and sharing MP3s resuwted in widespread copyright infringement. Major record companies argued dat dis free sharing of music reduced sawes, and cawwed it "music piracy". They reacted by pursuing wawsuits against Napster (which was eventuawwy shut down and water sowd) and against individuaw users who engaged in fiwe sharing.[51]

Diagram of de structure of an MP3 fiwe (MPEG version 2.5 not supported, hence 12 instead of 11 bits for MP3 Sync Word).

An MP3 fiwe is made up of MP3 frames, which consist of a header and a data bwock. This seqwence of frames is cawwed an ewementary stream. Due to de "byte reservoir", frames are not independent items and cannot usuawwy be extracted on arbitrary frame boundaries. The MP3 Data bwocks contain de (compressed) audio information in terms of freqwencies and ampwitudes. The diagram shows dat de MP3 Header consists of a sync word, which is used to identify de beginning of a vawid frame. This is fowwowed by a bit indicating dat dis is de MPEG standard and two bits dat indicate dat wayer 3 is used; hence MPEG-1 Audio Layer 3 or MP3. After dis, de vawues wiww differ, depending on de MP3 fiwe. ISO/IEC 11172-3 defines de range of vawues for each section of de header awong wif de specification of de header. Most MP3 fiwes today contain ID3metadata, which precedes or fowwows de MP3 frames, as noted in de diagram. The data stream can contain an optionaw checksum.

The MPEG-1 standard does not incwude a precise specification for an MP3 encoder, but does provide exampwe psychoacoustic modews, rate woop, and de wike in de non-normative part of de originaw standard.[53]
MPEG-2 doubwes de number of sampwing rates which are supported and MPEG-2.5 adds 3 more. When dis was written, de suggested impwementations were qwite dated. Impwementers of de standard were supposed to devise deir own awgoridms suitabwe for removing parts of de information from de audio input. As a resuwt, many different MP3 encoders became avaiwabwe, each producing fiwes of differing qwawity. Comparisons were widewy avaiwabwe, so it was easy for a prospective user of an encoder to research de best choice. Some encoders dat were proficient at encoding at higher bit rates (such as LAME) were not necessariwy as good at wower bit rates. Over time, LAME evowved on de SourceForge website untiw it became de de facto CBR MP3 encoder. Later an ABR mode was added. Work progressed on true variabwe bit rate using a qwawity goaw between 0 and 10. Eventuawwy numbers (such as -V 9.600) couwd generate excewwent qwawity wow bit rate voice encoding at onwy 41 kbit/s using de MPEG-2.5 extensions.

During encoding, 576 time-domain sampwes are taken and are transformed to 576 freqwency-domain sampwes.[cwarification needed] If dere is a transient, 192 sampwes are taken instead of 576. This is done to wimit de temporaw spread of qwantization noise accompanying de transient. (See psychoacoustics.) Freqwency resowution is wimited by de smaww wong bwock window size, which decreases coding efficiency.[52] Time resowution can be too wow for highwy transient signaws and may cause smearing of percussive sounds.[52]

Due to de tree structure of de fiwter bank, pre-echo probwems are made worse, as de combined impuwse response of de two fiwter banks does not, and cannot, provide an optimum sowution in time/freqwency resowution, uh-hah-hah-hah.[52] Additionawwy, de combining of de two fiwter banks' outputs creates awiasing probwems dat must be handwed partiawwy by de "awiasing compensation" stage; however, dat creates excess energy to be coded in de freqwency domain, dereby decreasing coding efficiency.[citation needed]

Decoding, on de oder hand, is carefuwwy defined in de standard. Most decoders are "bitstream compwiant", which means dat de decompressed output dat dey produce from a given MP3 fiwe wiww be de same, widin a specified degree of rounding towerance, as de output specified madematicawwy in de ISO/IEC high standard document (ISO/IEC 11172-3). Therefore, comparison of decoders is usuawwy based on how computationawwy efficient dey are (i.e., how much memory or CPU time dey use in de decoding process). Over time dis concern has become wess of an issue as CPU speeds transitioned from MHz to GHz. Encoder/decoder overaww deway is not defined, which means dere is no officiaw provision for gapwess pwayback. However, some encoders such as LAME can attach additionaw metadata dat wiww awwow pwayers dat can handwe it to dewiver seamwess pwayback.

When performing wossy audio encoding, such as creating an MP3 data stream, dere is a trade-off between de amount of data generated and de sound qwawity of de resuwts. The person generating an MP3 sewects a bit rate, which specifies how many kiwobits per second of audio is desired. The higher de bit rate, de warger de MP3 data stream wiww be, and, generawwy, de cwoser it wiww sound to de originaw recording. Wif too wow a bit rate, compression artifacts (i.e., sounds dat were not present in de originaw recording) may be audibwe in de reproduction, uh-hah-hah-hah. Some audio is hard to compress because of its randomness and sharp attacks. When dis type of audio is compressed, artifacts such as ringing or pre-echo are usuawwy heard. A sampwe of appwause or a triangwe instrument wif a rewativewy wow bit rate provide good exampwes of compression artifacts. Most subjective testings of perceptuaw codecs tend to avoid using dese types of sound materiaws, however, de artifacts generated by percussive sounds are barewy perceptibwe due to de specific temporaw masking feature of de 32 sub-band fiwterbank of Layer II on which de format is based.

Besides de bit rate of an encoded piece of audio, de qwawity of MP3 encoded sound awso depends on de qwawity of de encoder awgoridm as weww as de compwexity of de signaw being encoded. As de MP3 standard awwows qwite a bit of freedom wif encoding awgoridms, different encoders do feature qwite different qwawity, even wif identicaw bit rates. As an exampwe, in a pubwic wistening test featuring two earwy MP3 encoders set at about 128 kbit/s,[54] one scored 3.66 on a 1–5 scawe, whiwe de oder scored onwy 2.22. Quawity is dependent on de choice of encoder and encoding parameters.[55]

This observation caused a revowution in audio encoding. Earwy on bitrate was de prime and onwy consideration, uh-hah-hah-hah. At de time MP3 fiwes were of de very simpwest type: dey used de same bit rate for de entire fiwe: dis process is known as Constant Bit Rate (CBR) encoding. Using a constant bit rate makes encoding simpwer and wess CPU intensive. However, it is awso possibwe to create fiwes where de bit rate changes droughout de fiwe. These are known as Variabwe Bit Rate The bit reservoir and VBR encoding were actuawwy part of de originaw MPEG-1 standard. The concept behind dem is dat, in any piece of audio, some sections are easier to compress, such as siwence or music containing onwy a few tones, whiwe oders wiww be more difficuwt to compress. So, de overaww qwawity of de fiwe may be increased by using a wower bit rate for de wess compwex passages and a higher one for de more compwex parts. Wif some advanced MP3 encoders, it is possibwe to specify a given qwawity, and de encoder wiww adjust de bit rate accordingwy. Users dat desire a particuwar "qwawity setting" dat is transparent to deir ears can use dis vawue when encoding aww of deir music, and generawwy speaking not need to worry about performing personaw wistening tests on each piece of music to determine de correct bit rate.

Perceived qwawity can be infwuenced by wistening environment (ambient noise), wistener attention, and wistener training and in most cases by wistener audio eqwipment (such as sound cards, speakers and headphones). Furdermore, sufficient qwawity may be achieved by a wesser qwawity setting for wectures and human speech appwications and reduces encoding time and compwexity. A test given to new students by Stanford University Music Professor Jonadan Berger showed dat student preference for MP3-qwawity music has risen each year. Berger said de students seem to prefer de 'sizzwe' sounds dat MP3s bring to music.[56]

An in-depf study of MP3 audio qwawity, sound artist and composer Ryan Maguire's project "The Ghost in de MP3" isowates de sounds wost during MP3 compression, uh-hah-hah-hah. In 2015, he reweased de track "moDernisT" (an anagram of "Tom's Diner"), composed excwusivewy from de sounds deweted during MP3 compression of de song "Tom's Diner",[57][58][59] de track originawwy used in de formuwation of de MP3 standard. A detaiwed account of de techniqwes used to isowate de sounds deweted during MP3 compression, awong wif de conceptuaw motivation for de project, was pubwished in de 2014 Proceedings of de Internationaw Computer Music Conference.[60]

Bitrate is de product of de sampwe rate and number of bits per sampwe used to encode de music. CD audio is 44100 sampwes per second. The number of bits per sampwe awso depends on de number of audio channews. CD is stereo and 16 bits per channew. So, muwtipwying 44100 by 32 gives 1411200—de bitrate of uncompressed CD digitaw audio. MP3 was designed to encode dis 1411 kbit/s data at 320 kbit/s or wess. As wess compwex passages are detected by MP3 awgoridms den wower bitrates may be empwoyed. When using MPEG-2 instead of MPEG-1, MP3 supports onwy wower sampwing rates (16000, 22050 or 24000 sampwes per second) and offers choices of bitrate as wow as 8 kbit/s but no higher dan 160 kbit/s. By wowering de sampwing rate, MPEG-2 wayer III removes aww freqwencies above hawf de new sampwing rate dat may have been present in de source audio.

For de generaw fiewd of human speech reproduction, a bandwidf of 5512 Hz is sufficient to produce excewwent resuwts (for voice) using de sampwing rate of 11025 and VBR encoding from 44100 (standard) wave fiwes.. This is easiwy accompwished using LAME version 3.99.5 and de command wine "wame -V 9.6 wecture.WAV" Engwish speakers average 41–42 kbit/s wif -V 9.6 setting but dis may vary wif amount of siwence recorded or de rate of dewivery (wpm). Resampwing to 12000 (6K bandwidf) is sewected by de LAME parameter -V 9.4 Likewise -V 9.2 sewects 16000 sampwe rate and a resuwtant 8K wowpass fiwtering. For more info see Nyqwist – Shannon, uh-hah-hah-hah. Owder versions of LAME and FFmpeg onwy support integer arguments for variabwe bit rate qwawity sewection parameter. The n, uh-hah-hah-hah.nnn qwawity parameter (-V) is documented at wame.sourceforge.net but is onwy supported in LAME wif de new stywe VBR variabwe bit rate qwawity sewector—not average bit rate (ABR).

A sampwe rate of 44.1 kHz is commonwy used for music reproduction, because dis is awso used for CD audio, de main source used for creating MP3 fiwes. A great variety of bit rates are used on de Internet. A bit rate of 128 kbit/s is commonwy used,[62] at a compression ratio of 11:1, offering adeqwate audio qwawity in a rewativewy smaww space. As Internet bandwidf avaiwabiwity 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/sampwe × 44100 sampwes/second × 2 channews / 1000 bits/kiwobit), so de bitrates 128, 160 and 192 kbit/s represent compression ratios of approximatewy 11:1, 9:1 and 7:1 respectivewy.

Non-standard bit rates up to 640 kbit/s can be achieved wif de LAME encoder and de freeformat option, awdough few MP3 pwayers can pway dose fiwes. According to de ISO standard, decoders are onwy reqwired to be abwe to decode streams up to 320 kbit/s.[63] Earwy MPEG Layer III encoders used what is now cawwed Constant Bit Rate (CBR). The software was onwy abwe to use a uniform bitrate on aww frames in an MP3 fiwe. Later more sophisticated MP3 encoders were abwe to use de bit reservoir to target an average bit rate sewecting de encoding rate for each frame based on de compwexity of de sound in dat portion of de recording.

A more sophisticated MP3 encoder can produce variabwe bitrate audio. MPEG audio may use bitrate switching on a per-frame basis, but onwy wayer III decoders must support it.[39][64][65][66] VBR is used when de goaw is to achieve a fixed wevew of qwawity. The finaw fiwe size of a VBR encoding is wess predictabwe dan wif constant bitrate. Average bitrate is a type of VBR impwemented as a compromise between de two: de bitrate is awwowed to vary for more consistent qwawity, but is controwwed to remain near an average vawue chosen by de user, for predictabwe fiwe sizes. Awdough an MP3 decoder must support VBR to be standards compwiant, historicawwy some decoders have bugs wif VBR decoding, particuwarwy before VBR encoders became widespread. The most evowved LAME MP3 encoder supports de generation of VBR, ABR, and even de ancient CBR MP3 formats.

Layer III audio can awso use a "bit reservoir", a partiawwy fuww frame's abiwity to howd part of de next frame's audio data, awwowing temporary changes in effective bitrate, even in a constant bitrate stream.[39][64] Internaw handwing of de bit reservoir increases encoding deway.[citation needed] There is no scawe factor band 21 (sfb21) for freqwencies above approx 16 kHz, forcing de encoder to choose between wess accurate representation in band 21 or wess efficient storage in aww bands bewow band 21, de watter resuwting in wasted bitrate in VBR encoding.[67]

The anciwwary data fiewd can be used to store user defined data. The anciwwary data is optionaw and de number of bits avaiwabwe is not expwicitwy given, uh-hah-hah-hah. The anciwwary data is wocated after de Huffman code bits and ranges to where de next frame's main_data_begin points to. mp3PRO uses anciwwary data to encode deir bits to improve audio qwawity.

A "tag" in an audio fiwe is a section of de fiwe dat contains metadata such as de titwe, artist, awbum, track number or oder information about de fiwe's contents. The MP3 standards do not define tag formats for MP3 fiwes, nor is dere a standard container format dat wouwd support metadata and obviate de need for tags. However, severaw de facto standards for tag formats exist. As of 2010, de most widespread are ID3v1 and ID3v2, and de more recentwy introduced APEv2. These tags are normawwy embedded at de beginning or end of MP3 fiwes, separate from de actuaw MP3 frame data. MP3 decoders eider extract information from de tags, or just treat dem as ignorabwe, non-MP3 junk data.

Pwaying & editing software often contains tag editing functionawity, but dere are awso tag editor appwications dedicated to de purpose. Aside from metadata pertaining to de audio content, tags may awso be used for DRM.[68]RepwayGain is a standard for measuring and storing de woudness of an MP3 fiwe (audio normawization) in its metadata tag, enabwing a RepwayGain-compwiant pwayer to automaticawwy adjust de overaww pwayback vowume for each fiwe. MP3Gain may be used to reversibwy modify fiwes based on RepwayGain measurements so dat adjusted pwayback can be achieved on pwayers widout RepwayGain capabiwity.

The basic MP3 decoding and encoding technowogy is patent-free in de European Union, aww patents having expired dere by 2012 at de watest. In de United States, de technowogy became substantiawwy patent-free on 16 Apriw 2017 (see bewow). MP3 patents expired in de US between 2007 and 2017. In de past, many organizations have cwaimed ownership of patents rewated to MP3 decoding or encoding. These cwaims wed to a number of wegaw dreats and actions from a variety of sources. As a resuwt, uncertainty about which patents must be wicensed in order to create MP3 products widout committing patent infringement in countries dat awwow software patents was a common feature of de earwy stages of adoption of de technowogy.

The initiaw near-compwete MPEG-1 standard (parts 1, 2 and 3) was pubwicwy avaiwabwe on 6 December 1991 as ISO CD 11172.[69][70] In most countries, patents cannot be fiwed after prior art has been made pubwic, and patents expire 20 years after de initiaw fiwing date, which can be up to 12 monds water for fiwings in oder countries. As a resuwt, patents reqwired to impwement MP3 expired in most countries by December 2012, 21 years after de pubwication of ISO CD 11172.

An exception is de United States, where patents in force but fiwed prior to 8 June 1995 expire after de water of 17 years from de issue date or 20 years from de priority date. A wengdy patent prosecution process may resuwt in a patent issuing much water dan normawwy expected (see submarine patents). The various MP3-rewated patents expired on dates ranging from 2007 to 2017 in de United States.[71] Patents for anyding discwosed in ISO CD 11172 fiwed a year or more after its pubwication are qwestionabwe. If onwy de known MP3 patents fiwed by December 1992 are considered, den MP3 decoding has been patent-free in de US since 22 September 2015, when U.S. Patent 5,812,672, which had a PCT fiwing in October 1992, expired.[72][73][74] If de wongest-running patent mentioned in de aforementioned references is taken as a measure, den de MP3 technowogy became patent-free in de United States on 16 Apriw 2017, when U.S. Patent 6,009,399, hewd[75] and administered by Technicowor,[76] expired. As a resuwt, many free and open-source software projects, such as de Fedora operating system, have decided to start shipping MP3 support by defauwt, and users wiww no wonger have to resort to instawwing unofficiaw packages maintained by dird party software repositories for MP3 pwayback or encoding.[77]

Technicowor (formerwy cawwed Thomson Consumer Ewectronics) cwaimed to controw MP3 wicensing of de Layer 3 patents in many countries, incwuding de United States, Japan, Canada and EU countries.[78] Technicowor had been activewy enforcing dese patents.[79] MP3 wicense revenues from Technicowor's administration generated about €100 miwwion for de Fraunhofer Society in 2005.[80] In September 1998, de Fraunhofer Institute sent a wetter to severaw devewopers of MP3 software stating dat a wicense was reqwired to "distribute and/or seww decoders and/or encoders". The wetter cwaimed dat unwicensed products "infringe de patent rights of Fraunhofer and Thomson, uh-hah-hah-hah. To make, seww or distribute products using de [MPEG Layer-3] standard and dus our patents, you need to obtain a wicense under dese patents from us."[81] This wed to de situation where de LAME MP3 encoder project couwd not offer its users officiaw binaries dat couwd run on deir computer. The project's position was dat as source code, LAME was simpwy a description of how an MP3 encoder couwd be impwemented. Unofficiawwy, compiwed binaries were avaiwabwe from oder sources.

Sisvew S.p.A.[82] and its United States subsidiary Audio MPEG, Inc. previouswy sued Thomson for patent infringement on MP3 technowogy,[83] but dose disputes were resowved in November 2005 wif Sisvew granting Thomson a wicense to deir patents. Motorowa fowwowed soon after, and signed wif Sisvew to wicense MP3-rewated patents in December 2005.[84] Except for dree patents, de US patents administered by Sisvew[85] had aww expired in 2015. The dree exceptions are: U.S. Patent 5,878,080, expired February 2017; U.S. Patent 5,850,456, expired February 2017; and U.S. Patent 5,960,037, expired 9 Apriw 2017.

In September 2006, German officiaws seized MP3 pwayers from SanDisk's boof at de IFA show in Berwin after an Itawian patents firm won an injunction on behawf of Sisvew against SanDisk in a dispute over wicensing rights. The injunction was water reversed by a Berwin judge,[86] but dat reversaw was in turn bwocked de same day by anoder judge from de same court, "bringing de Patent Wiwd West to Germany" in de words of one commentator.[87] In February 2007, Texas MP3 Technowogies sued Appwe, Samsung Ewectronics and Sandisk in eastern Texas federaw court, cwaiming infringement of a portabwe MP3 pwayer patent dat Texas MP3 said it had been assigned. Appwe, Samsung, and Sandisk aww settwed de cwaims against dem in January 2009.[88][89]

Awcatew-Lucent has asserted severaw MP3 coding and compression patents, awwegedwy inherited from AT&T-Beww Labs, in witigation of its own, uh-hah-hah-hah. In November 2006, before de companies' merger, Awcatew suedMicrosoft for awwegedwy infringing seven patents. On 23 February 2007, a San Diego jury awarded Awcatew-Lucent US $1.52 biwwion in damages for infringement of two of dem.[90] The court subseqwentwy revoked de award, however, finding dat one patent had not been infringed and dat de oder was not owned by Awcatew-Lucent; it was co-owned by AT&T and Fraunhofer, who had wicensed it to Microsoft, de judge ruwed.[91] That defense judgment was uphewd on appeaw in 2008.[92] See Awcatew-Lucent v. Microsoft for more information, uh-hah-hah-hah.

Oder wossy formats exist. Among dese, mp3PRO, AAC, and MP2 are aww members of de same technowogicaw famiwy as MP3 and depend on roughwy simiwar psychoacoustic modews. The Fraunhofer Society owns many of de basic patents underwying dese formats as weww, wif oders hewd by Awcatew-Lucent, and Thomson Consumer Ewectronics.[93] There are awso open compression formats wike Opus and Vorbis dat are avaiwabwe free of charge and widout any known patent restrictions. Some of de newer audio compression formats, such as AAC, WMA Pro and Vorbis, are free of some wimitations inherent to de MP3 format dat cannot be overcome by any MP3 encoder.[71]

^Witt, Stephen (2016). How Music Got Free: The End of an Industry, de Turn of de Century, and de Patient Zero of Piracy. United States of America: Penguin Books. p. 13. ISBN0143109340. Brandenburg and Griww were joined by four oder Fraunhofer researchers. Heinz Gerhauser oversaw de institute´s audio research group; Harawd Popp was a hardware speciawist; Ernst Eberwein was a signaw processing expert; Jurgen Herre was anoder graduate student whose madematicaw prowess rivawed Brandenburg´s own, uh-hah-hah-hah. In water years dis group wouwd refer to demsewves as "de originaw six".

^Dehery, Yves-Francois (1994). A high qwawity sound coding standard for broadcasting, tewecommunications and muwtimedia systems. The Nederwands: Ewsevier Science BV. pp. 53–64. ISBN0-444-81580-5. This articwe refers to a Musicam (MPEG Audio Layer II) compressed digitaw audio workstation impwemented on a micro computer used not onwy as a professionaw editing station but awso as a server on Edernet for a compressed digitaw audio wibrary, derefore anticipating de future MP3 on Internet