Back to: MP3 files
MPEG 1 Layer 3 File Structure
Table of Contents
1 - General information
2 - Bit layout
3 - Bitrate index
4 - Sampling frequency index
5 - Mode and Mode Extension
6 - Disclaimer
Back to: MP3 files
Please note: Some of the following informations have been derived from
a sample c file available from
the Fraunhofer Gesellschaft. But most informations have been assembled with
the "try & error-method", which means that they seem to be correct, but I cannot
guarantee for it.
There are three types of MPEG 1 Layer 3 files: MPEG 1.0
which is used for high sampling frequencies and bit rates, MPEG 2.0 which is
for lower ones and MPEG 2.5.
This is a propriatory standard of Fraunhofer Gesellschaft and is used only for
very low frequencies and bit rates, so you will rarely encounter a file of this
type.
Back to the top
All available information on an mp3 file is stored in its first 4 bytes. The rest
of the file contains the actual sound information and is of no interest unless
you are planning to write a decoder (then you should know the file format much
better than I do).
| Bits |
Meaning |
| 1-11 |
always 1 |
| 12-13 |
mp3 version: 00 = MPEG 2.5 (proprietary to Fraunhofer Gesellschaft), 10 =
MPEG 2, 11 = MPEG 1 (important for the next infos) |
| 14-15 |
Mpeg layer (the actual layer is calculated by substracting the number from 4,
e.g. 01 means layer 3) |
| 16 |
CRC: 0 = CRC checksum, 1 = no CRC checksum |
| 17-20 |
Bitrate index (see below) |
| 21-22 |
sampling frequency index (see below) |
| 23 |
Padding (???) |
| 24 |
Extension (reserved but unused) |
| 25-28 |
Mode + mode extension (see below) |
| 29 |
Copyright |
| 30 |
Original |
Back to the top
Bitrate index
MPEG 1
| Index |
Bitrate |
| 1 |
? |
| 2 |
? |
| 3 |
? |
| 4 |
56 kbit/s |
| 5 |
64 kbit/s |
| 6 |
? |
| 7 |
96 kbit/s |
| 8 |
112 kbit/s |
| 9 |
128 kbit/s |
| 10 |
? |
| 11 |
192 kbit/s |
| 12 |
? |
| 13 |
256 kbit/s |
|
MPEG 2
| Index |
Bitrate |
| 1 |
? |
| 2 |
16 kbit/s |
| 3 |
24 kbit/s |
| 4 |
32 kbit/s |
| 5 |
? |
| 6 |
? |
| 7 |
56 kbit/s |
| 8 |
64 kbit/s |
|
MPEG 2.5
| Index |
Bitrate |
| 1 |
8 kbit/s |
| 2 |
16 kbit/s |
|
Back to the top
Sampling frequency index
MPEG 1.0
| Index |
Sampling frequency |
| 0 |
44.1 kHz |
| 1 |
48 kHz |
| 2 |
32 kHz |
|
MPEG 2.0
| Index |
Sampling frequency |
| 0 |
22.05 kHz |
| 1 |
24 kHz |
| 2 |
16 kHz |
|
MPEG 2.5
| Index |
Sampling frequency |
| 0 |
11.025 kHz |
| 1 |
? |
| 2 |
8 kHz |
|
Back to the top
Mode and Mode Extension
| Bits |
Meaning |
| 00 00 |
Unknown |
| 11 00 |
Single channel (i.e. mono) |
| 01 01 |
Joint stereo |
| 01 00 |
Joint stereo MS only (stereo used for high sampling rates) |
Back to the top
Disclaimer
All informations in this text are presented for educational and informational
purposes only.
If you find any errors or if you can fill any gaps, please tell
me.
Back to the top
Back to: MP3 files
Last change: 98/02/01