An audio layer is one of 3 compression methods in MPEG-1 and MPEG-2 audio. The standards name them Layer I, Layer II, and Layer III. In an audio or video file, the audio layer value tells you which method encoded the sound.
Each layer also has a short name: MP1, MP2, and MP3. So an MP3 file holds Layer III audio.
The word "layer" has other meanings in music production. On this page, the word only means this MPEG value.
Which files carry it
The audio layer only exists in MP1, MP2, and MP3 audio. Other codecs, such as AAC and FLAC, do not use these 3 layers. You can find the value in these files:
- Audio files with the extension
.mp1,.mp2, or.mp3hold MPEG audio. - MPEG video files can hold MPEG audio, for example an MPEG-2 file with Layer II audio.
- Video CDs and HDV camcorder recordings use Layer II audio.
- MKV files can hold any of the 3 layers as an audio track.
What the values look like
Programs show the layer in different ways. "Layer 3" and "Layer III" mean the same thing, because some programs use digits instead of Roman numerals.
- ExifTool, field
AudioLayer:1,2, or3 - ffprobe, field
codec_name:mp1,mp2, ormp3 - ffprobe, codec long name:
MP3 (MPEG audio layer 3) - Matroska codec ID in an MKV file:
A_MPEG/L1,A_MPEG/L2, orA_MPEG/L3
The layer and the MPEG version are 2 separate values. ExifTool shows the version in the field MPEGAudioVersion, with the value 1, 2, or 2.5. So an MP3 file can contain MPEG-1 Layer III audio or MPEG-2 Layer III audio.
Where the value comes from
The MPEG format has no metadata section for the whole file. The audio is a stream of frames, and each frame has its own header. That header stores the layer in 2 bits.
The stored number runs in reverse order. A stored 1 means Layer III, 2 means Layer II, and 3 means Layer I. ExifTool reads this number from the first audio frame and converts it to the layer number.
This makes the layer different from a tag such as title or album. An MP3 file keeps those tags in separate ID3 blocks.
The layer is part of the audio stream. ExifTool can read the audio layer, but it cannot write it.
How the 3 layers differ
A higher layer is more complex, but it compresses sound more efficiently at lower bit rates. All 3 layers are lossy, which means they remove sound details that people hear less easily.
- Layer I (MP1) was designed for low complexity. A typical rate for CD-quality audio is 384 kbit/s. The highest MPEG-1 rate is 448 kbit/s.
- Layer II (MP2) needs 192 to 256 kbit/s for near CD quality. The highest MPEG-1 rate is 384 kbit/s. Digital audio broadcasting (DAB) uses Layer II.
- Layer III (MP3) can typically compress CD audio by a factor of 12. The highest MPEG-1 rate is 320 kbit/s.
Why it matters for your file
Programs need the audio layer to read other values correctly. The header stores the bit rate as a code. The same code can mean a different bit rate in each layer.
The audio layer tells you more than the media type does. The media type audio/mpeg covers all 3 layers. So it cannot show you whether a file holds MP2 or MP3 audio.
The audio layer alone does not tell you the sound quality. Sound quality also depends on the bit rate. An MP3 file can use a higher or lower bit rate, with higher or lower quality.