Introduction
MP2 is Layer II of the MPEG-1 audio standard (ISO/IEC 11172-3), the older and simpler sibling of MP3. It needs a higher bit rate than MP3 for the same quality, but it is robust and cheap to decode, so broadcasters adopted it: it is the audio of DAB digital radio, of DVB television and of Video CD, and is still used in broadcast studios.
Structure
An MP2 file is a run of independent frames, laid out like MP3. Each frame starts with a 4-byte header: an 11-bit sync word of ones, then the MPEG version, the layer (Layer II), a protection flag, the bit rate, the sample rate, a padding flag and the channel mode. An optional CRC follows, then the bit allocation, scale factors and quantised samples. A Layer II frame holds 1152 samples per channel. Files may also carry ID3 tags.
0Frame repeated to the end of the filevaries+0Header sync, version, layer, bit rate, sample rate, mode4 bytes+4CRC optional2 bytes…Audio data bit allocation, scale factors, samplesvaries
The same frame layout also covers MPEG-2’s lower sample rates (ISO/IEC 13818-3). The reference pages give every field and table:
- Frame header – every field and code, with the Layer II bit rates
- Audio data – bit allocation, scale factors, samples and ancillary data
- Allocation tables – which table applies and every row of each
- Multichannel extension – MPEG-2 multichannel Layer II, and what is known of it
Tags in MP2 files are the same as in MP3: see ID3v2 and ID3v1.
Not described
These pages follow the public MPEG audio descriptions. The explorer reads .mp2 files with the MP3 plugin, which shows each frame’s header, bit allocation, scale factor selection and scale factors, and where the samples end.
Known, not yet covered
- Viewer: the coded sample values themselves are not shown as fields; the viewer stops at the end of the scale factors and labels the rest as samples and ancillary data.
- Reference: the ancillary data of broadcast uses such as DAB programme-associated data, which the audio data page leaves open.
Unknown
- Reference and viewer: the MPEG-2 multichannel extension: its header and extension stream are defined only in the paid ISO/IEC 13818-3, and no public description confirms them. The viewer labels the bytes as ancillary data.
Links
Software
- VLC media player – free player for almost any audio or video file (Windows, macOS, Linux, mobile)
- foobar2000 – free music player and converter (Windows, macOS, mobile)
- Audacity – free audio editor that opens and exports MP2 (Windows, macOS, Linux)
- FFmpeg – command-line tool that encodes and decodes MP2 (Windows, macOS, Linux)
Developers
Reference
- ISO/IEC 11172-3 – MPEG-1 audio, which defines Layers I, II and III (paid)
- ISO/IEC 13818-3 – MPEG-2 audio, adding lower rates and multichannel (paid)