All Topics  
MPEG-1

 

   Email Print
   Bookmark   Link






 

MPEG-1



 
 
MPEG-1 is a standard
Standard

A technical standard is an established norm or requirement. It is usually a formal document that establishes uniform engineering or technical criteria, methods, processes and practices....
 for lossy compression of video
Video

Video is the technology of electronics Videography, recording, processing, storing, transmitting, and reconstructing a sequence of still images representing Scene in motion....
 and audio
Audio frequency

An audio frequency , or audible frequency is characterized as a periodic vibration whose frequency is audible to the average human. While the range of frequencies that any individual can hear is largely related to environmental factors, the generally accepted standard range of audible frequencies is 20 to 20,000 hertz....
. It is designed to compress VHS
VHS

The Video Home System, better known by its abbreviation VHS, is a recording and playing standard developed by JVC and launched in Europe and Asia in September 1976, and the United States in June 1977....
-quality raw digital video and CD audio down to 1.5 Mbit/s (26:1 and 6:1 compression ratios respectively) without excessive quality loss, making Video CD
Video CD

Video CD is a standard digital format for storing video on a Compact Disc. VCDs are playable in dedicated VCD players, most modern DVD-Video players, personal computers, and some video game consoles....
s, digital cable
Cable television

Cable television is a system of providing television to consumers via radio frequency signals transmitted to televisions through fixed optical fibers or coaxial cables as opposed to the over-the-air method used in traditional television broadcasting in which a television antenna is required....
/satellite
Satellite television

Satellite television is television delivered by the means of communications satellite and received by a satellite dish and set-top box. In many areas of the world it provides a wide range of channels and services, often to areas that are not serviced by terrestrial television or cable television providers....
 TV and digital audio broadcasting
Digital audio broadcasting

Digital Audio Broadcasting , also known as EUREKA, is a digital radio technology for broadcasting radio stations, used in several countries, particularly in the UK and Europe....
 (DAB) possible.

Today, MPEG-1 has become the most widely compatible lossy audio/video format in the world, and is used in a large number of products and technologies.






Discussion
Ask a question about 'MPEG-1'
Start a new discussion about 'MPEG-1'
Answer questions from other users
Full Discussion Forum



Encyclopedia


MPEG-1 is a standard
Standard

A technical standard is an established norm or requirement. It is usually a formal document that establishes uniform engineering or technical criteria, methods, processes and practices....
 for lossy compression of video
Video

Video is the technology of electronics Videography, recording, processing, storing, transmitting, and reconstructing a sequence of still images representing Scene in motion....
 and audio
Audio frequency

An audio frequency , or audible frequency is characterized as a periodic vibration whose frequency is audible to the average human. While the range of frequencies that any individual can hear is largely related to environmental factors, the generally accepted standard range of audible frequencies is 20 to 20,000 hertz....
. It is designed to compress VHS
VHS

The Video Home System, better known by its abbreviation VHS, is a recording and playing standard developed by JVC and launched in Europe and Asia in September 1976, and the United States in June 1977....
-quality raw digital video and CD audio down to 1.5 Mbit/s (26:1 and 6:1 compression ratios respectively) without excessive quality loss, making Video CD
Video CD

Video CD is a standard digital format for storing video on a Compact Disc. VCDs are playable in dedicated VCD players, most modern DVD-Video players, personal computers, and some video game consoles....
s, digital cable
Cable television

Cable television is a system of providing television to consumers via radio frequency signals transmitted to televisions through fixed optical fibers or coaxial cables as opposed to the over-the-air method used in traditional television broadcasting in which a television antenna is required....
/satellite
Satellite television

Satellite television is television delivered by the means of communications satellite and received by a satellite dish and set-top box. In many areas of the world it provides a wide range of channels and services, often to areas that are not serviced by terrestrial television or cable television providers....
 TV and digital audio broadcasting
Digital audio broadcasting

Digital Audio Broadcasting , also known as EUREKA, is a digital radio technology for broadcasting radio stations, used in several countries, particularly in the UK and Europe....
 (DAB) possible.

Today, MPEG-1 has become the most widely compatible lossy audio/video format in the world, and is used in a large number of products and technologies. Perhaps the best-known part of the MPEG-1 standard is the MP3
MP3

MPEG-1 Audio Layer 3, more commonly referred to as MP3, is a digital audio Encoder format using a form of lossy data compression. It is a common audio format for consumer audio storage, as well as a de facto standard encoding for the transfer and playback of music on digital audio players....
 audio format it introduced.

The MPEG-1 standard is published as ISO/IEC
IEC

IEC may refer to:In education:* International Education Centre* Information, Education, and Communication* International Electrotechnical Commission - An international standards organization dealing with electrical, electronic and related technologies....
-11172
. The standard consists of the following five Parts:
  1. Systems (storage and synchronization of video, audio, and other data together)
  2. Video (compressed video content)
  3. Audio (compressed audio content)
  4. Conformance testing (testing the correctness of implementations of the standard)
  5. Reference software (example software showing how to encode and decode according to the standard)

History

Modeled on the successful collaborative approach and the compression technologies developed by the Joint Photographic Experts Group
Joint Photographic Experts Group

The Joint Photographic Experts Group is a joint committee between ISO/IEC JTC1 and ITU-T that created the JPEG and JPEG 2000 standards. Its formal name is International Organization for Standardization/International Electrotechnical Commission Joint Technical Committee 1, Subcommittee 29, Working Group 1....
 and CCITT's Experts Group on Telephony (creators of the JPEG
JPEG

In computing, JPEG is a commonly used method of for photographic images. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality....
 image compression standard and the H.261
H.261

H.261 is a 1990 ITU-T video coding standard originally designed for transmission over Integrated Services Digital Network lines on which data rates are multiples of 64 kbit/s....
 standard for video conferencing respectively) the Moving Picture Experts Group
Moving Picture Experts Group

Moving Picture Experts Group was formed by the International Organization for Standardization to set standards for audio compression and video compression and transmission....
 (MPEG) working group was established in January 1988. MPEG was formed to address the need for standard
Standard

A technical standard is an established norm or requirement. It is usually a formal document that establishes uniform engineering or technical criteria, methods, processes and practices....
 video and audio formats, and build on H.261 to get better quality through the use of more complex encoding methods.

Development of the MPEG-1 standard began in May 1988. 14 video and 14 audio codec proposals were submitted by individual companies and institutions for evaluation. The codecs were extensively tested for computational complexity
Computational Complexity

Computational Complexity may refer to:*Computational complexity theory*Computational Complexity ...
 and subjective
Subjectivity

Subjectivity refers to a subject's perspective or opinion, particularly feelings, beliefs, and desires. It is often used casually to refer to unjustified personal opinions, in contrast to knowledge and justified belief....
 (human perceived) quality, at data rates of 1.5 Mbit/s. This specific bitrate was chosen for transmission over T-1
Digital Signal 1

Digital signal 1 is a T-carrier signaling scheme devised by Bell Labs. DS1 is a widely used standard in telecommunications in North America and Japan to transmit voice and data between devices....
/E-1
E-carrier

In digital telecommunications, where a single physical wire pair can be used to carry many simultaneous voice conversations, worldwide standards have been created and deployed....
 lines and as the approximate data rate of audio CDs
Red Book (audio CD standard)

Red Book is the standardization for audio Compact Disc . It is named after one of a set of Rainbow Books that contain the Specification for all CD and CD-ROM formats....
. The codecs that excelled in this testing were utilized as the basis for the standard and refined further, with additional features and other improvements being incorporated in the process.

After 20 meetings of the full group in various cities around the world, and 4˝ years of development and testing, the final standard (for parts 1-3) was approved in early November 1992 and published a few months later. The reported completion date of the MPEG-1 standard, varies greatly: a largely complete draft standard was produced in September 1990, and from that point on, only minor changes were introduced. The draft standard was publicly available for purchase. The standard was finished with the 6 November 1992 meeting. The Berkeley Plateau Multimedia Research Group developed a MPEG-1 decoder in November 1992. In July 1990, before the first draft of the MPEG-1 standard had even been written, work began on a second standard, MPEG-2
MPEG-2

MPEG-2 is a standard for "the generic coding of moving pictures and associated audio information". It describes a combination of Lossy compression video compression and lossy audio data compression methods which permit storage and transmission of movies using currently available storage media and transmission bandwidth....
, intended to extend MPEG-1 technology to provide full broadcast-quality video (as per CCIR 601
CCIR 601

ITU-R Recommendation BT.601, more commonly known by the abbreviations Rec. 601 or BT.601 is a standard published by ITU-R for encoding interlaced analogue video signals in digital form....
) at high bitrates (3 - 15 Mbit/s), and support for interlaced video. Due in part to the similarity between the two codecs, the MPEG-2 standard includes full backwards compatibility with MPEG-1 video, so any MPEG-2 decoder can play MPEG-1 videos.

Notably, the MPEG-1 standard very strictly defines the bitstream
Bitstream

A bitstream or bit stream is a time series of bits.A bytestream is a series of bytes, typically of 8 bits each, and can be regarded as a special case of a bitstream....
, and decoder function, but does not define how MPEG-1 encoding is to be performed (although a reference implementation is provided in ISO/IEC-11172-5). This means that MPEG-1 coding efficiency can drastically vary depending on the encoder used, and generally means that newer encoders perform significantly better than their predecessors. The first three parts (Systems, Video and Audio) of ISO/IEC 11172 were published in August 1993.

Patents


MPEG-1 video and Layer I/II audio may be able to be implemented without payment of license fees. The ISO patent database lists one patent for ISO 11172, US 4,472,747, which expired in 2003. The near-complete draft of the MPEG-1 standard was publicly available as ISO CD 11172 by December 6, 1991. Due to its age, many of the patents on the technology have expired. Neither the Kuro5hin article "Patent Status of MPEG-1,H.261 and MPEG-2" nor a thread on the gstreamer-devel mailing list were able to list a single unexpired MPEG-1 video and Layer I/II audio patent. There are companies that require patent fees for implementations of MPEG-1 Layer 3 Audio
MP3

MPEG-1 Audio Layer 3, more commonly referred to as MP3, is a digital audio Encoder format using a form of lossy data compression. It is a common audio format for consumer audio storage, as well as a de facto standard encoding for the transfer and playback of music on digital audio players....
 however.

Applications

  • Most popular computer software
    Computer software

    Computer software, or just software is a general term used to describe a collection of computer programs, Algorithm and Software documentation that perform some tasks on a computer system....
     for video playback includes MPEG-1 decoding, in addition to any other supported formats.
  • The popularity of MP3
    MP3

    MPEG-1 Audio Layer 3, more commonly referred to as MP3, is a digital audio Encoder format using a form of lossy data compression. It is a common audio format for consumer audio storage, as well as a de facto standard encoding for the transfer and playback of music on digital audio players....
     audio has established a massive installed base
    Installed base

    Installed base is a measure of the number of units of a particular type of system actually in use, as opposed to market share, which only reflects sales over a particular period....
     of hardware that can playback MPEG-1 Audio (all 3 layers).
  • "Virtually all digital audio devices" can playback MPEG-1 Audio. Many millions have been sold to-date.
  • Before MPEG-2 became widespread, many digital satellite/cable TV services used MPEG-1 exclusively.
  • The widespread popularity of MPEG-2 with broadcasters means MPEG-1 is playable by most digital cable and satellite set-top box
    Set-top box

    A set-top box or set-top unit is a information appliance that connects to a television and an external source of signal , turning the signal into content which is then displayed on the television screen....
    es, and digital disc and tape players, due to backwards compatibility.
  • MPEG-1 is the exclusive video and audio format used on Video CD
    Video CD

    Video CD is a standard digital format for storing video on a Compact Disc. VCDs are playable in dedicated VCD players, most modern DVD-Video players, personal computers, and some video game consoles....
     (VCD), the first consumer
    Consumer

    Consumer is a broad label that refers to any individuals or household that use Good generated within the economic system. The concept of a consumer is used in different contexts, so that the usage and significance of the term may vary....
     digital video format, and still a very popular format around the world.
  • The Super Video CD
    Super Video CD

    Super Video CD is a digital format for storing video on standard compact discs. SVCD was intended as a successor to Video CD and an alternative to DVD-Video, and falls somewhere between both in terms of technical capability and picture quality....
     standard, based on VCD, uses MPEG-1 Audio exclusively, as well as MPEG-2 video.
  • The DVD-Video
    DVD-Video

    DVD-Video is a consumer video format used to store digital video on DVD discs, and is currently the dominant consumer video format in Canada, Europe and Australia....
     format uses MPEG-2 video primarily, but MPEG-1 support is explicitly defined in the standard.
  • The DVD Video standard originally required MPEG-1 Layer II audio for PAL countries, but was changed to allow AC-3/Dolby Digital
    Dolby Digital

    File:Dolby-Digital.svgDolby Digital is the marketing name for a series of lossy data compression technologies developed by Dolby Laboratories....
    -only discs. MPEG-1 Layer II audio is still allowed on DVDs, although newer extensions to the format, like MPEG Multichannel
    MPEG Multichannel

    MPEG Multichannel is an extension to the MPEG-1 Layer II sound compression specification, as defined in the MPEG-2 standard ISO/MPEG IS-11172, which allows it provide up to 5.1-channels of audio....
    , are rarely supported.
  • Most DVD players also support Video CD
    Video CD

    Video CD is a standard digital format for storing video on a Compact Disc. VCDs are playable in dedicated VCD players, most modern DVD-Video players, personal computers, and some video game consoles....
     and MP3 CD
    MP3 CD

    An MP3 CD is a compact disc that contains digital audio in the MP3 file format. Discs are CD burninged in the Yellow Book standard data format , as opposed to the Red Book standard audio format ....
     playback, which use MPEG-1.
  • The international Digital Video Broadcasting (DVB) standard primarily uses MPEG-1 Layer II audio, and MPEG-2 video.
  • The international Digital Audio Broadcasting
    Digital audio broadcasting

    Digital Audio Broadcasting , also known as EUREKA, is a digital radio technology for broadcasting radio stations, used in several countries, particularly in the UK and Europe....
     (DAB) standard uses MPEG-1 Layer II audio exclusively, due to MP2's especially high quality, modest decoder performance requirements, and tolerance of errors.


Part 1: Systems

Part 1 of the MPEG-1 standard covers systems, and is defined in ISO/IEC-11172-1.

MPEG-1 Systems specifies the logical layout and methods used to store the encoded audio, video, and other data into a standard bitstream, and to maintain synchronization between the different contents. This file format
File format

A file format is a particular way to encode information for storage in a computer file.Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa....
 is specifically designed for storage on media, and transmission over data channels
Channel (communications)

Channel, in communications , refers to the :wikt:medium used to information transfer information from a sender to a receiver ....
, that are considered relatively reliable. Only limited error protection is defined by the standard, and small errors in the bitstream may cause noticeable defects.

This structure was later named a program stream
Program stream

Program stream is a container format for multiplexing digital audio, video and more. The PS format is specified in MPEG-1 Systems and MPEG-2 Part 1, Systems ....
: "The MPEG-1 Systems design is essentially identical to the MPEG-2 Program Stream structure." This terminology is more popular, precise (differentiates it from a transport stream
Transport stream

Transport stream is a communications protocol for Digital audio, Digital video, and Program and System Information Protocol which is specified in MPEG-2 Part 1, Systems ....
) and will be used here.

Elementary Streams

Elementary streams (ES) are the raw bitstreams of MPEG-1 audio and video, output by an encoder. These files can be distributed on their own, such as is the case with MP3 files.

Additionally, elementary streams can be made more robust by packet
Packet

In information technology, a packet is a formatted unit of data carried by a packet mode computer network. Computer communications links that do not support packets, such as traditional Link #Point-to-point, simply transmit data as a series of bytes, Character , or bits alone....
izing them, i.e. dividing them into independent chunks, and adding a cyclic redundancy check
Cyclic redundancy check

A cyclic redundancy check is a type of function that takes as input a data stream of any length, and produces as output a value of a certain space, commonly a 32-bit integer....
 (CRC) checksum
Checksum

A checksum or hash sum is a fixed-size data computed from an arbitrary block of digital data for the purpose of error detection that may have been introduced during its telecommunications or computer storage....
 to each segment for error detection. This is the Packetized Elementary Stream (PES) structure.

System Clock Reference (SCR) is a timing value stored in a 33-bit header of each ES, at a frequency/precision of 90 kHz, with an extra 9-bit extension that stores additional timing data with a precision of 27 MHz. These are inserted by the encoder, derived from the system time clock (STC). Simultaneously encoded audio and video streams will not have identical SCR values, however, due to buffering, encoding, jitter, and other delay.

Program Streams

Program Streams (PS) are concerned with combining multiple packetized elementary streams (usually just one audio and video PES) into a single stream, ensuring simultaneous delivery, and maintaining synchronization. The PS structure is known as a multiplex
Multiplex

Multiplex may refer to:...
, or a container format
Container format

A container or wrapper format is a file format whose specifications regard only the way data are stored within the file, and how many metadata could or are effectively stored, whereas no specific codification of the data themselves is implied or specified....
.

Program time stamps (PTS) exist in PS to correct the inevitable disparity between audio and video SCR values (time-base correction). 90 kHz PTS values in the PS header tell the decoder which video SCR values match which audio SCR values. PTS determines when to display a portion of an MPEG program, and is also used by the decoder to determine when data can be discarded from the buffer. Either video or audio will be delayed by the decoder until the corresponding segment of the other arrives and can be decoded.

PTS handling can be problematic. Decoders must accept multiple program streams that have been concatenated (joined sequentially). This causes PTS values in the middle of the video to reset to zero, which then begin incrementing again. Such PTS wraparound disparities can cause timing issues that must be specially handled by the decoder.

Display Time Stamps (DTS), additionally, are required because of B-frames. With B-frames in the video stream, adjacent frames have to be encoded and decoded out-of-order (re-ordered frames). DTS is quite similar to PTS, but instead of just handling sequential frames, it contains the proper time-stamps to tell the decoder when to decode and display the next B-frame (types of frames explained below), ahead of its anchor (P- or I-) frame. Without B-frames in the video, PTS and DTS values are identical.

Multiplexing

To generate the PS, the multiplexer will interleave the (two or more) packetized elementary streams. This is done so the packets of the simultaneous streams can be transferred over the same channel
Channel (communications)

Channel, in communications , refers to the :wikt:medium used to information transfer information from a sender to a receiver ....
 and are guaranteed to both arrive at the decoder at precisely the same time. This is a case of time-division multiplexing
Time-division multiplexing

Time-Division Multiplexing is a type of digital or Pulse-amplitude modulation multiplexing in which two or more signals or bit streams are transferred apparently simultaneously as sub-channels in one communication channel, but are physically taking turns on the channel....
.

Determining how much data from each stream should be in each interleaved segment (the size of the interleave) is complicated, yet an important requirement. Improper interleaving will result in buffer underflows or overflows, as the receiver gets more of one stream than it can store (eg. audio), before it gets enough data to decode the other simultaneous stream (eg. video). The MPEG Video Buffer Verifier (VBV) assists in determining if a multiplexed PS can be decoded by a device with a specified data throughput rate and buffer size. This offers feedback to the muxer and the encoder, so that they can change the mux size or adjust bitrates as needed for compliance.

The PS, additionally, stores aspect ratio
Aspect ratio

The aspect ratio of a shape is the ratio of its longer dimension to its shorter dimension. It may be applied to two characteristic dimensions of a three-dimensional shape, such as the ratio of the longest and shortest axis, or for symmetrical objects that are described by just two measurements, such as the length and diameter of a rod....
 information which tells the decoder how much to stretch the height or width of a video when displaying it. Different display devices (such as computer monitors and television
Television

Television is a widely used telecommunication mass-media for transmitting and receiving moving , either monochrome or color, usually accompanied by sound....
s) have different pixel heights/widths, which will result in video encoded for one appearing "squished" when played on the other, unless the aspect ratio information in the PS is used to compensate.

Part 2: Video

Part 2 of the MPEG-1 standard covers video and is defined in ISO/IEC-11172-2. It is heavily based on H.261
H.261

H.261 is a 1990 ITU-T video coding standard originally designed for transmission over Integrated Services Digital Network lines on which data rates are multiples of 64 kbit/s....
.

MPEG-1 Video exploits perceptual compression methods to significantly reduce the data rate required by a video stream. It reduces or completely discards information in certain frequencies and areas of the picture that the human eye has limited ability to fully perceive. It also utilizes effective methods to exploit temporal (over time) and spatial (across a picture) redundancy common in video, to achieve better data compression than would be possible otherwise. (See: Video compression
Video compression

Video compression refers to reducing the quantity of data used to represent digital video images, and is a straightforward combination of and motion compensation....
)

Color Space


Before encoding video to MPEG-1, the color-space is transformed to Y'CbCr (Y'=Luma, Cb=Chroma Blue, Cr=Chroma Red). Luma
Luma (video)

As applied to video signals, luma represents the brightness in an image . Luma is typically paired with Chrominance. Luma represents the achromatic image without any color, while the chroma components represent the color information....
 (brightness, resolution) is stored separately from chroma
Chrominance

Chrominance , is the signal used in video systems to convey the color information of the picture, separately from the accompanying luma signal....
 (color, hue, phase) and even further separated into red and blue components. The chroma is also subsampled to 4:2:0, meaning it is decimated
Decimation (signal processing)

In digital signal processing, decimation is a technique for reducing the number of Sample in a Discrete signal.Decimation is a two-step process:...
 by one half vertically and one half horizontally, to just one quarter the resolution of the video.

Because the human eye is much less sensitive to small changes in color than in brightness, chroma subsampling
Chroma subsampling

Chroma subsampling is the practice of encoding images by implementing less resolution for Chrominance information than for luma information. It is used in many video encoding schemes?both analog and digital?and also in JPEG encoding....
 is a very effective way to reduce the amount of video data that needs to be compressed. On videos with fine detail (high spatial complexity
Spatial frequency

In mathematics, physics, and engineering, spatial frequency is a characteristic of any structure that is periodic across position in space. The spatial frequency is a measure of how often the structure repeats per unit of distance....
) this can manifest as chroma aliasing
Aliasing

In statistics, signal processing, computer graphics and related disciplines, aliasing refers to an effect that causes different continuous signals to become indistinguishable when sampling ....
 artifacts. Compared to other digital compression artifact
Compression artifact

A compression artifact is the result of an aggressive data compression scheme applied to an , Sound recording, or video that discards some data that may be too complex to store in the available data-rate, or may have been incorrectly determined by an algorithm to be of little subjective importance, but is in fact objectionable to the view...
s, this issue seems to be very rarely a source of annoyance.

Because of subsampling, Y'CbCr video must always be stored using even dimensions (divisible by 2), otherwise chroma mismatch ("ghosts") will occur, and it will appear as if the color is ahead of, or behind the rest of the video, much like a shadow.

Y'CbCr is often inaccurately called YUV
YUV

Y'UV is a color space typically used as part of a color image pipeline. It encodes a color image or video taking human perception into account, allowing reduced bandwidth for chrominance components, thereby typically enabling transmission errors or compression artifacts to be more efficiently masked by the human perception than using a "d...
 which is only used in the domain of analog
Analog transmission

Analog transmission is a Transmission method of conveying voice, data, image, signal or video information using a continuous signal which varies in amplitude, phase, or some other property in proportion to that of a variable....
 video signals. Similarly, the terms luminance
Luminance

Luminance is a Photometry measure of the luminous intensity per unit area of light travelling in a given direction. It describes the amount of light that passes through or is emitted from a particular area, and falls within a given solid angle....
 and chrominance
Chrominance

Chrominance , is the signal used in video systems to convey the color information of the picture, separately from the accompanying luma signal....
 are often used instead of the (more accurate) terms luma and chroma.

Resolution/Bitrate

MPEG-1 supports resolutions up to 4095×4095 (12-bits), and bitrates up to 100 Mbit/s.

MPEG-1 videos are most commonly seen using Source Input Format
Source Input Format

Source Input Format defined in MPEG-1, is a video format that was developed to allow the storage and transmission of digital video.* 625/50 SIF format has a resolution of 352 x 288 active pixels and a refresh rate of 25 frames per second....
 (SIF) resolution: 352x240, 352x288, or 320x240. These low resolutions, combined with a bitrate less than 1.5 Mbit/s, make up what is known as a constrained parameters bitstream (CPB), later renamed the "Low Level" (LL) profile in MPEG-2. This is the minimum video specifications any decoder
Decoder

A decoder is a device which does the reverse of an encoder, undoing the encoding so that the original information can be retrieved. The same method used to encode is usually just reversed in order to decode....
 should be able to handle, to be considered MPEG-1 compliant. This was selected to provide a good balance between quality and performance, allowing the use of reasonably inexpensive hardware of the time.

Frame/Picture/Block Types

MPEG-1 has several frame/picture types that serve different purposes. The most important, yet simplest are I-frames.

I-Frames
I-frame is an abbreviation for Intra-frame, so-called because they can be decoded independently of any other frames. They may also be known as I-pictures, or keyframes due to their somewhat similar function to the key frame
Key frame

A key frame in animation and filmmaking is a drawing which defines the starting and ending points of any Dissolve . They are called "frames" because their position in time is measured in film frames on a strip of film....
s used in animation. I-frames can be considered effectively identical to baseline JPEG
JPEG

In computing, JPEG is a commonly used method of for photographic images. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality....
 images.

High-speed seeking through an MPEG-1 video is only possible to the nearest I-frame. When cutting a video it is not possible to start playback of a segment of video before the first I-frame in the segment (at least not without computationally-intensive re-encoding). For this reason, I-frame-only MPEG videos are used in editing applications.

I-frame only compression is very fast, but produces very large file sizes: a factor of 3× (or more) larger than normally encoded MPEG-1 video, depending on how temporally complex a specific video is. I-frame only MPEG-1 video is very similar to MJPEG
MJPEG

In multimedia, Motion JPEG is an informal name for multimedia formats where each video frame or interlaced field of a digital video sequence is separately as a JPEG ....
 video. So much so that very high-speed and theoretically lossless (in reality, there are rounding errors) conversion can be made from one format to the other, provided a couple of restrictions (color space and quantization matrix) are followed in the creation of the bitstream.

The length between I-frames is known as the group of pictures
Group of pictures

In MPEG encoding, a group of pictures, or GOP, specifies the order in which intra-frames and inter frames are arranged.The GOP is a group of successive pictures within an MPEG-coded video stream....
 (GOP) size. MPEG-1 most commonly uses a GOP size of 15-18. i.e. 1 I-frame for every 14-17 non-I-frames (some combination of P- and B- frames). With more intelligent encoders, GOP size is dynamically chosen, up to some pre-selected maximum limit.

Limits are placed on the maximum number of frames between I-frames due to decoding complexing, decoder buffer size, recovery time after data errors, seeking ability, and accumulation of IDCT errors in low-precision implementations most common in hardware decoders (See: IEEE-1180).

P-frames
P-frame is an abbreviation for Predicted-frame. They may also be called forward-predicted frames, or inter-frames (B-frames are also inter-frames).

P-frames exist to improve compression by exploiting the temporal (over time) redundancy in a video. P-frames store only the difference in image from the frame (either an I-frame or P-frame) immediately preceding it (this reference frame is also called the anchor frame).

The difference between a P-frame and its anchor frame is calculated using motion vectors on each macroblock of the frame (see below). Such motion vector data will be embedded in the P-frame for use by the decoder.

A P-frame can contain any number of intra-coded blocks, in addition to any forward-predicted blocks.

If a video drastically changes from one frame to the next (such as a cut
Cut (filmmaking)

In film editing and video editing, a cut is an abrupt, but usually trivial film transition from one sequence to another. It is synonymous with the term edit, though "edit" can imply any number of transitions or effects....
), it is more efficient to encode it as an I-frame.

B-frames
B-frame stands for bidirectional-frame. They may also be known as backwards-predicted frames or B-pictures. B-frames are quite similar to P-frames, except they can make predictions using both the previous and future frames (i.e. two anchor frames).

It is therefore necessary for the player to first decode the next I- or P- anchor frame sequentially after the B-frame, before the B-frame can be decoded and displayed. This makes B-frames very computationally complex, requires larger data buffers, and causes an increased delay on both decoding and during encoding. This also necessitates the display time stamps (DTS) feature in the container/system stream (see above). As such, B-frames have long been subject of much controversy, they are often avoided in videos, and are sometimes not fully supported by hardware decoders.

No other frames are predicted from a B-frame. Because of this, a very low bitrate B-frame can be inserted, where needed, to help control the bitrate. If this was done with a P-frame, future P-frames would be predicted from it and would lower the quality of the entire sequence. However, similarly, the future P-frame must still encode all the changes between it and the previous I- or P- anchor frame (a second time) in addition to much of the changes being coded in the B-frame. B-frames can also be beneficial in videos where the background behind an object is being revealed over several frames, or in fading transitions, such as scene changes.

A B-frame can contain any number of intra-coded blocks and forward-predicted blocks, in addition to backwards-predicted, or bidirectionally predicted blocks.

D-frames
MPEG-1 has a unique frame type not found in later video standards. D-frames or DC-pictures are independent images (intra-frames) that have been encoded DC-only (AC coefficients are removed—see DCT below) and hence are very low quality. D-frames are never referenced by I-, P- or B- frames. D-frames are only used for fast previews of video, for instance when seeking through a video at high speed.

Given moderately higher-performance decoding equipment, this feature can be approximated by decoding I-frames instead. This provides higher quality previews, and without the need for D-frames taking up space in the stream, yet not improving video quality.

Macroblocks


MPEG-1 operates on video in a series of 8x8 blocks for quantization. However, because chroma (color) is subsampled by a factor of 4, each pair of (red and blue) chroma blocks corresponds to 4 different luma blocks. This set of 6 blocks, with a resolution of 16x16, is called a macroblock.

A macroblock is the smallest independent unit of (color) video. Motion vectors (see below) operate solely at the macroblock level.

If the height and/or width of the video is not exact multiples of 16, a full row of macroblocks must still be encoded (though not displayed) to store the remainder of the picture (macroblock padding). This wastes a significant amount of data in the bitstream, and is to be strictly avoided.

Some decoders will also improperly handle videos with partial macroblocks, resulting in visible artifacts.

Motion Vectors

To decrease the amount of spatial redundancy in a video, only blocks that change are updated, (up to the maximum GOP size). This is known as conditional replenishment. However, this is not very effective by itself. Movement of the objects, and/or the camera may result in large portions of the frame needing to be updated, even though only the position of the previously encoded objects has changed. Through motion estimation the encoder can compensate for this movement and remove a large amount of redundant information.

The encoder compares the current frame with adjacent parts of the video from the anchor frame (previous I- or P- frame) in a diamond pattern, up to a (encoder-specific) predefined radius
RADIUS

Remote Authentication Dial In User Service is a networking protocol that provides centralized access, authorization and accounting management for people or computers to connect and use a network service....
 limit from the area of the current macroblock. If a match is found, only the direction and distance (i.e. the vector of the motion) from the previous video area to the current macroblock need to be encoded into the inter-frame (P- or B- frame). The reverse of this process, performed by the decoder to reconstruct the picture, is called motion compensation.

A predicted macroblock rarely matches the current picture perfectly, however. The differences between the estimated matching area, and the real frame/macroblock is called the prediction error. The larger the error, the more data must be additionally encoded in the frame. For efficient video compression, it is very important that the encoder is capable of effectively and precisely performing motion estimation.

Motion vectors record the distance between two areas on screen based on the number of pixels (called pels). MPEG-1 video uses a motion vector (MV) precision of one half of one pixel, or half-pel. The finer the precision of the MVs, the more accurate the match is likely to be, and the more efficient the compression. There are trade-offs to higher precision, however. Finer MVs result in larger data size, as larger numbers must be stored in the frame for every single MV, increased coding complexity as increasing levels of interpolation on the macroblock are required for both the encoder and decoder, and diminishing returns (minimal gains) with higher precision MVs. Half-pel was chosen as the ideal trade-off. (See: qpel
Qpel

Quarter pixel refers to a quarter of a standard pixel. It is used in many modern video encoding standards such as MPEG-4 ASP and H.264/AVC to refer to quarter pixel precision in motion estimation and motion compensation....
)

Because neighboring macroblocks are likely to have very similar motion vectors, this redundant information can be compressed quite effectively by being stored DPCM-encoded. Only the (smaller) amount of difference between the MVs for each macroblock needs to be stored in the final bitstream.

P-frames have 1 motion vector per macroblock, relative to the previous anchor frame. B-frames, however, can use 2 motion vectors; one from the previous anchor frame, and one from the future anchor frame.

Partial macroblocks, and black borders/bars encoded into the video that do not fall exactly on a macroblock boundary, cause havoc with motion prediction. The block padding/border information prevents the macroblock from closely matching with any other area of the video, and so, significantly larger prediction error information must be encoded for every one of the several dozen partial macroblocks along the screen border. DCT encoding and quantization (see below) also isn't nearly as effective when there is large/sharp picture contrast in a block.

An even more serious problem exists with macroblocks that contain significant, random, edge noise, where the picture transitions to (typically) black. All the above problems also apply to edge noise. In addition, the added randomness is simply impossible to compress significantly. All of these effects will lower the quality (or increase the bitrate) of the video substantially.

DCT

Each 8x8 block is encoded by first applying a Forward Discrete Cosine Transform
Discrete cosine transform

A discrete cosine transform expresses a sequence of finitely many data points in terms of a sum of cosine functions oscillating at different frequency....
 (FDCT) and then a quantization process. The FDCT process (by itself) is theoretically lossless, and can be reversed by applying an Inverse DCT (IDCT) to reproduce the original values (in the absence of any quantization and rounding errors). In reality, there are some (sometimes large) rounding errors introduced both by quantization in the encoder (as described in the next section) and by IDCT approximation error in the decoder. The minimum allowed accuracy of a decoder IDCT approximation is defined by ISO/IEC 23002-1. (Prior to 2006, it was specified by IEEE 1180-1990.)

The FDCT process converts the 8x8 block of uncompressed pixel values (brightness or color difference values) into an 8x8 indexed array of frequency coefficient values. One of these is the (statistically high in variance) DC coefficient, which represents the average value of the entire 8x8 block. The other 63 coefficients are the statistically smaller AC coefficients, which are positive or negative values each representing sinusoidal deviations from the flat block value represented by the DC coefficient.

An example of an encoded 8x8 FDCT block:

Since the DC coefficient value is statistically correlated from one block to the next, it is compressed using DPCM encoding. Only the (smaller) amount of difference between each DC value and the value of the DC coefficient in the block to its left needs to be represented in the final bitstream.

Additionally, the frequency conversion performed by applying the DCT provides a statistical decorrelation function to efficiently concentrate the signal into fewer high-amplitude values prior to applying quantization (see below).

Quantization

Quantization
Quantization (image processing)

Quantization, involved in , is a lossy compression technique achieved by compressing a range of values to a single quantum value. When the number of discrete symbols in a given stream is reduced, the stream becomes more compressible....
 (of digital data) is, essentially, the process of reducing the accuracy of a signal, by dividing it into some larger step size (i.e. finding the nearest multiple, and discarding the remainder/modulus).

The frame-level quantizer is a number from 0 to 31 (although encoders will usually omit/disable some of the extreme values) which determines how much information will be removed from a given frame. The frame-level quantizer is either dynamically selected by the encoder to maintain a certain user-specified bitrate, or (much less commonly) directly specified by the user.

Contrary to popular belief, a fixed frame-level quantizer (set by the user) does not deliver a constant level of quality. Instead, it is an arbitrary metric that will provide a somewhat varying level of quality, depending on the contents of each frame. Given two files of identical sizes, the one encoded at an average bitrate should look better than the one encoded with a fixed quantizer (variable bitrate). Constant quantizer encoding can be used, however, to accurately determine the minimum and maximum bitrates possible for encoding a given video.

A quantization matrix is a string of 64-numbers (0-255) which tells the encoder how relatively important or unimportant each piece of visual information is. Each number in the matrix corresponds to a certain frequency component of the video image.

An example quantization matrix:

Quantization is performed by taking each of the 64 frequency values of the DCT block, dividing them by the frame-level quantizer, then dividing them by their corresponding values in the quantization matrix. Finally, the result is rounded down. This significantly reduces, or completely eliminates, the information in some frequency components of the picture. Typically, high frequency information is less visually important, and so high frequencies are much more strongly quantized (drastically reduced). MPEG-1 actually uses two separate quantization matrices, one for intra-blocks (I-blocks) and one for inter-block (P- and B- blocks) so quantization of different block types can be done independently, and so, more effectively.

This quantization process usually reduces a significant number of the AC coefficients to zero, (known as sparse data) which can then be more efficiently compressed by entropy coding (lossless compression) in the next step.

An example quantized DCT block:

Quantization eliminates a large amount of data, and is the main lossy processing step in MPEG-1 video encoding. This is also the primary source of most MPEG-1 video compression artifacts, like blockiness, color banding, noise
Noise

In common use, the word noise means unwanted sound or noise pollution. In electronics noise can refer to the electronic signal corresponding to acoustic noise or the electronic signal corresponding to the noise commonly seen as 'Noise ' on a degraded television or video image....
, ringing
Ringing

ElectricityIn electricity circuits, ringing is an unwanted oscillation of a voltage or Current . It happens when an electrical pulse causes the parasitic capacitor and inductor in the circuit to resonance at their characteristic frequency....
, discoloration, et al. This happens when video is encoded with an insufficient bitrate, and the encoder is therefore forced to use high frame-level quantizers (strong quantization) through much of the video.

Entropy Coding

Several steps in the encoding of MPEG-1 video are lossless, meaning they will be reversed upon decoding, to produce exactly the same (original) values. Since these lossless data compression steps don't add noise into, or otherwise change the contents (unlike quantization), it is sometimes referred to as noiseless coding. Since lossless compression aims to remove as much redundancy as possible, it is known as entropy coding in the field of information theory
Information theory

Information theory is a branch of applied mathematics and electrical engineering involving the quantification of information. Historically, information theory was developed by Claude E....
.

The DCT block tend to have the most important frequencies towards the top left corner. The coefficients tend to zero towards the bottom-right. Maximum compression can be achieved by a zig-zag scanning of the DCT block starting from the top left and using Run-length encoding techniques.

The DC coefficients and motion vectors are DPCM-encoded.

Run-length encoding
Run-length encoding

Run-length encoding is a very simple form of data compression in which runs of data are stored as a single data value and count, rather than as the original run....
 (RLE) is a very simple method of compressing repetition. A sequential string of characters, no matter how long, can be replaced with a few bytes, noting the value that repeats, and how many times. For example, if someone were to say "five nines", you would know they mean the number: 99999.

RLE is particularly effective after quantization, as a significant number of the AC coefficients are now zero (called sparse data), and can be represented with just a couple bytes. This is stored in a special 2-dimensional Huffman table that codes the run-length and the run-ending character.

Huffman Coding
Huffman coding

In computer science and information theory, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for...
 is a very popular method of entropy coding, and used in MPEG-1 video to reduce the data size. The data is analyzed to find strings that repeat often. Those strings are then put into a special table, with the most frequently repeating data assigned the shortest code. This keeps the data as small as possible with this form of compression. Once the table is constructed, those strings in the data are replaced with their (much smaller) codes, which reference the appropriate entry in the table. The decoder simply reverses this process to produce the original data.

This is the final step in the video encoding process, so the result of Huffman coding
Huffman coding

In computer science and information theory, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for...
 is known as the MPEG-1 video "bitstream."

GOP configurations for specific applications


I-frames store complete frame info within the frame and is therefore suited for random access. P-frames provide compression using motion vectors relative to the previous frame ( I or P ). B-frames provide maximum compression but requires the previous as well as next frame for computation. Therefore, processing of B-frames require more buffer on the decoded side. A configuration of the Group of Pictures(GOP) should be selected based on these factors. I-frame only sequences gives least compression, but is useful for random access, FF/FR and editability. I and P frame sequences give moderate compression but and a certain degree of random access, FF/FR functionality. I,P & B frame sequences give very high compression but also increases the coding/decoding delay significantly. Such configurations are therefore not suited for video-telephony or video-conferencing applications.

The typical data rate of an I-frame is 1 bit per pixel while that of a P-frame is 0.1 bit per pixel and for a B-frame, 0.015 bit per pixel.

Part 3: Audio

Part 3 of the MPEG-1 standard covers audio and is defined in ISO/IEC-11172-3.

MPEG-1 Audio utilizes psychoacoustics to significantly reduce the data rate required by an audio stream. It reduces or completely discards certain parts of the audio that the human ear can't hear, either because they are in frequencies where the ear has limited sensitivity
Sensitivity

Sensitivity may refer to:* Allergy* Sensitivity * Sensitivity * Sensitivity * Sensitivity and specificity are related concepts in statistics...
, or are masked
Auditory masking

Auditory masking occurs when the perception of one sound is affected by the presence of another sound . The term masking is not confined to hearing as it can also be used in visual perception tasks....
 by other (typically louder) sounds.

Channel Encoding:
  • Mono
  • Joint Stereo (intensity encoded)
  • Stereo
  • Dual (two uncorrelated mono channels)


  • Sampling rate
    Sampling rate

    The sampling rate, sample rate, or sampling frequency defines the number of sample per second taken from a continuous signal to make a discrete signal....
    s: 32000, 44100, and 48000 Hz
  • Bitrate
    Bitrate

    In telecommunications and computing, bitrate is the number of bits that are conveyed or processed per unit of time.The bit rate is quantified using the Data rate units unit, often in conjunction with an SI prefix such as kilo- , mega- , giga- or tera- ....
    s: 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 and 384 kbit/s


MPEG-1 Audio is divide into 3 layers. Each higher layer is more computationally complex, and generally more efficient at lower bitrates than the previous. The layers are also backwards compatible, so a Layer II decoder can also play Layer I audio, but NOT Layer III audio.

Layer I

MPEG-1 Layer I is nothing more than a simplified version of Layer II. Layer I uses a smaller 384-sample frame size for very low-delay, and finer resolution. This is advantageous for applications like teleconferencing, studio editing, etc. It has lower complexity than Layer II to facilitate real-time encoding on the hardware available circa
Circa

Circa means "in approximately", generally referring to a year. It is widely used in genealogy and historical writing, when the dates of events are approximately known....
 1990.

Layer I saw limited adoption in its time, and most notably was used on Philips
Philips

Koninklijke Philips Electronics N.V. , usually known as Philips, is a Netherlands electronics company. It is one of the largest electronics companies in the world, founded and headquartered in the Netherlands....
' defunct Digital Compact Cassette
Digital Compact Cassette

Digital Compact Cassette is an obsolete magnetic tape sound recording format introduced by Philips and Matsushita in late 1992. Pitched as a successor to the standard analog signal compact cassette, and competitor to MiniDisc and Digital Audio Tape , it never became popular with the general public....
 at a bitrate of 384 kbit/s. With the substantial performance improvements in digital processing since its introduction, Layer I quickly became unnecessary and obsolete.

Layer I audio files typically use the extension .mp1 or sometimes .m1a

Layer II

MPEG-1 Layer II (MP2—often incorrectly called MUSICAM) is a lossy audio format designed to provide high quality at about 192 kbit/s for stereo sound. Decoding MP2 audio is computationally simple
Computational complexity theory

Computational complexity theory, as a branch of the theory of computation in computer science, investigates the problems related to the Computational resource required for the execution of algorithms , and the inherent difficulty in providing efficient algorithms for specific computational problems....
, relative to MP3, AAC
Advanced Audio Coding

Advanced Audio Coding is a standardized, lossy data compression Audio data compression and encoder scheme for digital audio. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at many bit rates....
, etc.

History/MUSICAM
MPEG-1 Layer II was derived from the MUSICAM (Masking pattern adapted Universal Subband Integrated Coding And Multiplexing) audio codec, developed by Centre commun d'études de télévision et télécommunications (CCETT), Philips
Philips

Koninklijke Philips Electronics N.V. , usually known as Philips, is a Netherlands electronics company. It is one of the largest electronics companies in the world, founded and headquartered in the Netherlands....
, and Institut für Rundfunktechnik
Institut für Rundfunktechnik

The Institut f?r Rundfunktechnik GmbH is the research centre of the German broadcasters , Austria's broadcaster and the Swiss public broadcaster ....
 (IRT/CNET) as part of the EUREKA 147 pan-European inter-governmental research and development initiative for the development of digital audio broadcasting.

Most key features of MPEG-1 Audio were directly inherited from MUSICAM, including the filter bank, time-domain processing, audio frame sizes, etc. However, improvements were made, and the actual MUSICAM algorithm was not used in the final MPEG-1 Layer II audio standard. The widespread usage of the term MUSICAM to refer to Layer II is entirely incorrect and discouraged for both technical and legal reasons.

Technical Details
Layer II/MP2 is a time-domain encoder. It uses a low-delay 32 sub-band polyphased
Polyphase quadrature filter

A polyphase quadrature filter, or PQF, is a filter bank which splits an input signal into a given number N of equidistant sub-bands. These sub-bands are subsampled by a factor of N, so they are critically sample d....
 filter bank
Filter bank

A filter bank is an array of bandpass_filter electronic filter that separates the input signal into several components, each one carrying a single frequency subband of the original signal....
 for time-frequency mapping; having overlapping ranges (i.e. polyphased) to prevent aliasing. The psychoacoustic model is based on the principles of auditory masking
Auditory masking

Auditory masking occurs when the perception of one sound is affected by the presence of another sound . The term masking is not confined to hearing as it can also be used in visual perception tasks....
, simultaneous masking
Simultaneous masking

In acoustics, simultaneous masking is masking between two concurrent sounds. Sometimes called frequency masking since it is often observed when the sounds share a frequency band e.g....
 effects, and the absolute threshold of hearing
Absolute threshold of hearing

The absolute threshold of hearing is the minimum sound level of a pure tone that an average ear with normal Hearing can hear in a noiseless environment....
 (ATH). The size of a Layer II frame is fixed at 1152-samples (coefficients).

Time domain
Time domain

Time domain is a term used to describe the analysis of mathematical function s, or physical signal s, with respect to time. In the time domain, the signal or function's value is known for all real numbers, for the case of continuous time, or at various separate instants in the case of discrete time....
 refers to how analysis and quantization is performed: on short, discrete samples/chunks of the audio waveform. This offers low-delay as only a small number of samples are analyzed before encoding, as opposed to frequency domain
Frequency domain

In electronics and control systems engineering, frequency domain is a term used to describe the analysis of mathematical functions or Signal with respect to frequency, rather than time....
 encoding (like MP3) which must analyze many times more samples before it can decide how to transform and output encoded audio. This also offers higher performance on complex, random and transient
Transient (acoustics)

In acoustics and sound, a transient is a short-duration signal that represents a non-harmonic attack phase of a musical sound or spoken word. It contains a high degree of non-periodic components and a higher magnitude of high frequencies than the harmonic content of that sound....
 impulses (such as percussive instruments, and applause), offering avoidance of artifacts like pre-echo.

The 32 sub-band filter bank returns 32 amplitude
Amplitude

Amplitude is the magnitude of change in the oscillating variable, with each oscillation, within an oscillating system. For instance, sound waves are oscillations in atmospheric pressure and their amplitudes are proportional to the change in pressure during one oscillation....
 coefficients, one for each equal-sized frequency band/segment of the audio, which is about 700 Hz wide (depending on the audio's sampling frequency). The encoder then utilizes the psychoacoustic model to determine which sub-bands contain audio information that is less important, and so, where quantization will be in-audible, or at least much less noticeable.

The psychoacoustic model is applied using a 1024-point Fast Fourier Transform
Fast Fourier transform

A fast Fourier transform is an efficient algorithm to compute the discrete Fourier transform and its inverse. There are many distinct FFT algorithms involving a wide range of mathematics, from simple complex number to group theory and number theory; this article gives an overview of the available techniques and some of their general propert...
 (FFT). Of the 1152 samples per frame, 64 samples at the top and bottom of the frequency range are ignored for this analysis. They are presumably not significant enough to change the result. The psychoacoustic model uses an empirically determined masking model to determine which sub-bands contribute more to the masking threshold
Masking threshold

The masking threshold is the sound pressure level of a sound you need to make hearing another in presence of a masker signal. This threshold depends on the frequency and the kind of the masker and maskee....
, and how much quantization noise each can contain without being perceived. Any sounds below the absolute threshold of hearing
Absolute threshold of hearing

The absolute threshold of hearing is the minimum sound level of a pure tone that an average ear with normal Hearing can hear in a noiseless environment....
 (ATH) are completely discarded. The available bits are then assigned to each sub-band accordingly.

Typically, sub-bands are less important if they contain quieter sounds (smaller coefficient) than a neighboring (i.e. similar frequency) sub-band with louder sounds (larger coefficient). Also, "noise" components typically have a more significant masking effect than "tonal" components.

Less significant sub-bands are reduced in accuracy by quantization. This basically involves compressing the frequency range (amplitude of the coefficient), i.e. raising the noise floor. Then computing an amplification factor, for the decoder to use to re-expand each sub-band to the proper frequency range.

Layer II can also optionally use intensity stereo coding, a form of joint stereo. This means that the frequencies above 6 kHz of both channels are combined/down-mixed into one single (mono) channel, but the "side channel" information on the relative intensity (volume, amplitude) of each channel is preserved and encoded into the bitstream separately. On playback, the single channel is played through left and right speakers, with the intensity information applied to each channel to give the illusion of stereo sound. This perceptual trick is known as stereo irrelevancy. This can allow further reduction of the audio bitrate without much perceivable loss of fidelity, but is generally not used with higher bitrates as it does not provide very high quality (transparent) audio.

Quality
Subjective audio testing by experts, in the most critical conditions ever implemented, has shown MP2 to offer transparent audio compression at 256 kbit/s for 16-bit 44.1 kHz CD audio
Red Book (audio CD standard)

Red Book is the standardization for audio Compact Disc . It is named after one of a set of Rainbow Books that contain the Specification for all CD and CD-ROM formats....
 using the earliest reference implementation (more recent encoders should presumably perform even better). That (approximately) 1:6 compression ratio for CD audio is particularly impressive because it is quite close to the estimated upper limit of perceptual entropy, at just over 1:8. Achieving much higher compression is simply not possible without discarding some perceptible information.

MP2 remains a favoured lossy audio coding standard due to its particularly high audio coding performances on important audio material such as castanet, symphonic orchestra, male and female voices and particularly complex and high energy transients (impulses) like percussive sounds: triangle, glockenspiel and audience applause. More recent testing has shown that MPEG Multichannel
MPEG Multichannel

MPEG Multichannel is an extension to the MPEG-1 Layer II sound compression specification, as defined in the MPEG-2 standard ISO/MPEG IS-11172, which allows it provide up to 5.1-channels of audio....
 (based on MP2), despite being compromised by an inferior matrixed mode (for the sake of backwards compatibility) rates just slightly lower than much more recent audio codecs, such as Dolby Digital
Dolby Digital

File:Dolby-Digital.svgDolby Digital is the marketing name for a series of lossy data compression technologies developed by Dolby Laboratories....
 (AC-3) and Advanced Audio Coding
Advanced Audio Coding

Advanced Audio Coding is a standardized, lossy data compression Audio data compression and encoder scheme for digital audio. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at many bit rates....
 (AAC) (mostly within the margin of error—and substantially superior in some cases, such as audience applause). This is one reason that MP2 audio continues to be used extensively. The MPEG-2 AAC Stereo verification tests reached a vastly different conclusion, however, showing AAC to provide superior performance to MP2 at half the bitrate. The reason for this disparity with both earlier and later tests is not clear, but strangely, a sample of applause is notably absent from this test.

Layer II audio files typically use the extension .mp2 or sometimes .m2a

Layer III/MP3

MPEG-1 Layer III (MP3) is a lossy audio format designed to provide acceptable quality at about 64 kbit/s for monaural audio over single-channel (BRI
Basic rate interface

Basic rate interface is an Integrated Services Digital Network configuration defined in the physical layer standard I.430 produced by the International Telecommunication Union....
) ISDN links, and 128 kbit/s for stereo sound.

History/ASPEC
Layer III/MP3 was derived from the Adaptive Spectral Perceptual Entropy Coding (ASPEC) codec developed by Fraunhofer as part of the EUREKA 147 pan-European inter-governmental research and development initiative for the development of digital audio broadcasting. ASPEC was adapted to fit in with the Layer II/MUSICAM model (frame size, filter bank, FFT, etc.), to become Layer III.

ASPEC was itself based on Multiple adaptive Spectral audio Coding (MSC) by E. F. Schroeder, Optimum Coding in the Frequency domain (OCF) the doctoral thesis by Karlheinz Brandenburg
Karlheinz Brandenburg

Karlheinz Brandenburg is an audio engineer who has contributed to the audio compression format MPEG Audio Layer 3, more commonly known as MP3....
 at the University of Erlangen-Nuremberg, Perceptual Transform Coding (PXFM) by J. D. Johnston at AT&T
AT&T

AT&T Inc. is the largest US provider of both local and long distance telephone services, and Digital subscriber line Internet access. AT&T is the second largest provider of wireless service in the United States, with over 77 million wireless customers, and more than 150 million total customers....
 Bell Labs
Bell Labs

Bell Laboratories is the research organization of Alcatel-Lucent and previously of the American Telephone & Telegraph Company .Bell Laboratories has had its headquarters at Berkeley Heights, New Jersey, and it has research and development facilities throughout the world....
, and Transform coding of audio signals by Y. Mahieux and J. Petit at Institut für Rundfunktechnik
Institut für Rundfunktechnik

The Institut f?r Rundfunktechnik GmbH is the research centre of the German broadcasters , Austria's broadcaster and the Swiss public broadcaster ....
 (IRT/CNET).

Technical Details
MP3 is a frequency-domain audio transform encoder
Transform coding

Transform coding is a type of data compression for "natural" data like Sound recording Signal or photographic s. The transformation is typically Lossy compression, resulting in a lower quality copy of the original input....
. Even though it utilizes some of the lower layer functions, MP3 is quite different from Layer II/MP2.

MP3 works on 1152 samples like Layer II, but needs to take multiple frames for analysis before frequency-domain (MDCT) processing and quantization can be effective. It outputs a variable number of samples, using a bit buffer to enable this variable bitrate (VBR) encoding while maintaining 1152 sample size output frames. This causes a significantly longer delay before output, which has caused MP3 to be considered unsuitable for studio applications where editing or other processing needs to take place.

MP3 does not benefit from the 32 sub-band polyphased filter bank, instead just using an 18-point MDCT transformation on each output to split the data into 576 frequency components, and processing it in the frequency domain. This extra granularity allows MP3 to have a much finer psychoacoustic model, and more carefully apply appropriate quantization to each band, providing much better low-bitrate performance.

Frequency-domain processing imposes some limitations as well, causing a factor of 12 or 36 × worse temporal resolution than Layer II. This causes quantization artifacts, due to transient sounds like percussive events and other high-frequency events that spread over a larger window. This results in audible smearing and pre-echo
Pre-echo

Pre-echo is an audio compression artifact where a sound is heard before it occurs . It is most noticeable in impulsive sounds from percussion instruments such as castanets or cymbals....
. MP3 uses pre-echo detection routines, and VBR encoding, which allows it to temporarily increase the bitrate during difficult passages, in an attempt to reduce this effect. It is also able to switch between the normal 36 sample quantization window, and instead using 3× short 12 sample windows instead, to reduce the temporal (time) length of quantization artifacts. And yet in choosing a fairly small window size to make MP3's temporal response adequate enough to avoid the most serious artifacts, MP3 becomes much less efficient in frequency domain compression of stationary, tonal components.

Being forced to use a hybrid time domain (filter bank) /frequency domain (MDCT) model to fit in with Layer II simply wastes processing time and compromises quality by introducing aliasing artifacts. MP3 has an aliasing cancellation stage specifically to mask this problem, but which instead produces frequency domain energy which must be encoded in the audio. This is pushed to the top of the frequency range, where most people have limited hearing, in hopes the distortion it causes will be less audible.

Layer II's 1024 point FFT doesn't entirely cover all samples, and would omit several entire MP3 sub-bands, where quantization factors must be determined. MP3 instead uses two passes of FFT analysis for spectral estimation, to calculate the global and individual masking thresholds. This allows it to cover all 1152 samples. Of the two, it utilizes the global masking threshold level from the more critical pass, with the most difficult audio.

In addition to Layer II's intensity encoded joint stereo, MP3 can use middle/side (mid/side, m/s, MS, matrixed) joint stereo. With mid/side stereo, certain frequency ranges of both channels are merged into a single (middle, mid, L+R) mono channel, while the sound difference between the left and right channels is stored as a separate (side, L-R) channel. Unlike intensity stereo, this process does not discard any audio information. When combined with quantization, however, it can exaggerate artifacts.

If the difference between the left and right channels is small, the side channel will be small, which will offer as much as a 50% bitrate savings, and associated quality improvement. If the difference between left and right is large, standard (discrete, left/right) stereo encoding may be preferred, as mid/side joint stereo will not provide any benefits. An MP3 encoder can switch between m/s stereo and full stereo on a frame-by-frame basis.

Unlike Layers I/II, MP3 uses variable-length Huffman coding
Huffman coding

In computer science and information theory, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for...
 (after perceptual) to further reduce the bitrate, without any further quality loss.

Quality
These technical limitations inherently prevent MP3 from providing critically transparent quality at any bitrate. This makes Layer II sound quality actually superior to MP3 audio, when it is used at a high enough bitrate to avoid noticeable artifacts. The term "transparent" often gets misused, however. The quality of MP3 (and other codecs) is sometimes called "transparent," even at impossibly low bitrates, when what is really meant is "good quality on average/non-critical material," or perhaps "exhibiting only non-annoying artifacts."

MP3's more fine-grained and selective quantization does prove notably superior to Layer II/MP2 at lower-bitrates, however. It is able to provide nearly equivalent audio quality to Layer II, at a 15% lower bitrate (approximately). 128 kbit/s is considered the "sweet spot
Sweet spot

A sweet spot is a place, often numerical as opposed to physical, where a combination of factors suggest a particularly suitable solution.In the context of a racquet, bat or similar sporting instrument, sweet spot is often believed to be the same as the center of percussion....
" for MP3; meaning it provides generally-acceptable quality stereo sound on most music, and there are diminishing
Diminishing returns

In economics, diminishing returns is also called diminishing marginal return or the law of diminishing returns. According to this relationship, in a production system with fixed and variable inputs , beyond some point, each additional unit of variable input yields less and less output....
 quality improvements from increasing the bitrate further. MP3 is also regarded as exhibiting artifacts that are less-annoying than Layer II, when both are used at bitrates that are too low to possibly provide faithful reproduction.

Layer III audio files use the extension .mp3.

MPEG-2 Audio Extensions


The MPEG-2
MPEG-2

MPEG-2 is a standard for "the generic coding of moving pictures and associated audio information". It describes a combination of Lossy compression video compression and lossy audio data compression methods which permit storage and transmission of movies using currently available storage media and transmission bandwidth....
 standard includes several extensions to MPEG-1 Audio. MPEG-2 Audio is defined in ISO/IEC-13818-3

  • MPEG Multichannel
    MPEG Multichannel

    MPEG Multichannel is an extension to the MPEG-1 Layer II sound compression specification, as defined in the MPEG-2 standard ISO/MPEG IS-11172, which allows it provide up to 5.1-channels of audio....
     ISO/IEC 14496-3. Backward compatible 5.1-channel surround sound
    Surround sound

    Surround sound, using multichannel audio, encompasses a range of techniques for enriching the Sound recording and reproduction quality, of an audio source, with additional audio channels reproduced via additional, discrete speakers....
    .


  • Sampling rate
    Sampling rate

    The sampling rate, sample rate, or sampling frequency defines the number of sample per second taken from a continuous signal to make a discrete signal....
    s: 16000, 22050, and 24000 Hz
  • Bitrate
    Bitrate

    In telecommunications and computing, bitrate is the number of bits that are conveyed or processed per unit of time.The bit rate is quantified using the Data rate units unit, often in conjunction with an SI prefix such as kilo- , mega- , giga- or tera- ....
    s: 8, 16, 24, 40, 48, and 144 kbit/s


These sampling rates are exactly half that of those originally defined for MPEG-1 Audio. They were introduced to maintain higher quality sound when encoding audio at lower-bitrates. The even-lower bitrates were introduced because tests showed that MPEG-1 Audio could provide higher quality than any existing (circa
Circa

Circa means "in approximately", generally referring to a year. It is widely used in genealogy and historical writing, when the dates of events are approximately known....
 1994) very low bitrate (i.e. speech) audio codecs.

Part 4: Conformance Testing

Part 4 of the MPEG-1 standard covers conformance testing, and is defined in ISO/IEC-11172-4.

Conformance: Procedures for testing conformance.

Provides two sets of guidelines and reference bitstreams for testing the conformance of MPEG-1 audio and video decoders, as well as the bitstreams produced by an encoder.

Part 5: Reference Software

Part 5 of the MPEG-1 standard includes reference software, and is defined in ISO/IEC-11172-5.

Simulation: Reference software.

C
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
 reference code for encoding and decoding of audio and video, as well as multiplexing and demultiplexing.

This includes the ISO Dist10 audio encoder code, which LAME
LAME

LAME is a free software software application used to encoder audio into the MP3 file format. The name LAME is a recursive acronym for LAME Ain't an MP3 Encoder, reflecting LAME's early history when it was not actually an encoder, but merely a set of patches against the freely available ISO demonstration source code....
 and TooLAME
TooLAME

TooLAME is a free software MPEG-1 Layer II audio encoder written primarily by Mike Cheng. While there are innumerable MP2 encoders, TooLAME is well-known and widely used for its particularly high audio quality....
 were based upon.

See also

  • MPEG The Moving Picture Experts Group, developers of the MPEG-1 standard
  • MP3
    MP3

    MPEG-1 Audio Layer 3, more commonly referred to as MP3, is a digital audio Encoder format using a form of lossy data compression. It is a common audio format for consumer audio storage, as well as a de facto standard encoding for the transfer and playback of music on digital audio players....
     More (less technical) detail about MPEG-1 Layer III audio
  • MPEG Multichannel
    MPEG Multichannel

    MPEG Multichannel is an extension to the MPEG-1 Layer II sound compression specification, as defined in the MPEG-2 standard ISO/MPEG IS-11172, which allows it provide up to 5.1-channels of audio....
     Backwards compatible 5.1 channel surround sound
    Surround sound

    Surround sound, using multichannel audio, encompasses a range of techniques for enriching the Sound recording and reproduction quality, of an audio source, with additional audio channels reproduced via additional, discrete speakers....
     extension to Layer II audio
  • MPEG-2
    MPEG-2

    MPEG-2 is a standard for "the generic coding of moving pictures and associated audio information". It describes a combination of Lossy compression video compression and lossy audio data compression methods which permit storage and transmission of movies using currently available storage media and transmission bandwidth....
     The direct successor to the MPEG-1 standard.


Implementations
  • Libavcodec
    Libavcodec

    libavcodec is a free software/open source GNU Lesser General Public License-licensed library of codecs for encoding and decoding video and audio data....
     includes MPEG-1/2 video/audio encoders and decoders
  • MPEG-1/2 video/audio encoders
  • TooLAME
    TooLAME

    TooLAME is a free software MPEG-1 Layer II audio encoder written primarily by Mike Cheng. While there are innumerable MP2 encoders, TooLAME is well-known and widely used for its particularly high audio quality....
     A high quality MPEG-1 Layer II audio encoder.
  • LAME
    LAME

    LAME is a free software software application used to encoder audio into the MP3 file format. The name LAME is a recursive acronym for LAME Ain't an MP3 Encoder, reflecting LAME's early history when it was not actually an encoder, but merely a set of patches against the freely available ISO demonstration source code....
     A high quality MP3 (Layer III) audio encoder.
  • Musepack
    Musepack

    Musepack or MPC is an open source audio data compression#Lossy compression, specifically optimized for transparency compression of stereo audio at bitrates of 160–180 bit rate....
     A format originally based on MPEG-1 Layer II audio, but now incompatible.


External links