Size: 2150
Comment:
|
Size: 2481
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 13: | Line 13: |
[[BR]] With this information and the information in the bitrate field we can determine the bitrate of the audio (in kbit/s) according to this table. [[BR]] | With this information and the information in the bitrate field we can determine the bitrate of the audio (in kbit/s) according to this table. |
Line 31: | Line 31: |
The sample rate is described in the frequency field. These values is dependent of which MPEG standard is used according to the following table. ||<tablewidth="255px" tableheight="255px" tablealign="">Frequency Value||MPEG-1||MPEG-2|| ||0 0||44100 Hz||22050 Hz|| ||0 1||48000 Hz||24000 Hz|| ||1 0||32000 Hz||16000 Hz|| ||1 1|||| || |
How is MP3 built?
Most people with a little knowledge in MP3 files know that the sound is divided into smaller parts and compressed with a psycoacoustic model. This smaller pieces of the audio is then put into something called 'frames', which is a little datablock with a header. I'll focus on that header in this text.
The header is 4 bytes, 32 bits, big and begins with something called sync. This sync is, at least according to the MPEG standard, 12 set bits in a row. Some add-on standards made later uses 11 set bits and one cleared bit. The sync is directly followed by a ID bit, indicating if the file is a MPEG-1 och MPEG-2 file. 0=MPEG-2 and 1=MPEG-1
The layer is defined with the two layers bits. They are oddly defined as BR
0 0 |
Not defined |
0 1 |
Layer III |
1 0 |
Layer II |
1 1 |
Layer I |
With this information and the information in the bitrate field we can determine the bitrate of the audio (in kbit/s) according to this table.
BitrateBRvalue |
MPEG-1,BRlayer I |
MPEG-1,BRlayer II |
MPEG-1,BRlayer III |
MPEG-2,BRlayer I |
MPEG-2,BRlayer II |
MPEG-2,BRlayer III |
0 0 0 0 |
|
|||||
0 0 0 1 |
32 |
32 |
32 |
32 |
32 |
8 |
0 0 1 0 |
64 |
48 |
40 |
64 |
48 |
16 |
0 0 1 1 |
96 |
56 |
48 |
96 |
56 |
24 |
0 1 0 0 |
128 |
64 |
56 |
128 |
64 |
32 |
0 1 0 1 |
160 |
80 |
64 |
160 |
80 |
64 |
0 1 1 0 |
192 |
96 |
80 |
192 |
96 |
80 |
0 1 1 1 |
224 |
112 |
96 |
224 |
112 |
56 |
1 0 0 0 |
256 |
128 |
112 |
256 |
128 |
64 |
1 0 0 1 |
288 |
160 |
128 |
288 |
160 |
128 |
1 0 1 0 |
320 |
192 |
160 |
320 |
192 |
160 |
1 0 1 1 |
352 |
224 |
192 |
352 |
224 |
112 |
1 1 0 0 |
384 |
256 |
224 |
384 |
256 |
128 |
1 1 0 1 |
416 |
320 |
256 |
416 |
320 |
256 |
1 1 1 0 |
448 |
384 |
320 |
448 |
384 |
320 |
1 1 1 1 |
|
The sample rate is described in the frequency field. These values is dependent of which MPEG standard is used according to the following table.
||<tablewidth="255px" tableheight="255px" tablealign="">Frequency Value||MPEG-1||MPEG-2||
0 0 |
44100 Hz |
22050 Hz |
0 1 |
48000 Hz |
24000 Hz |
1 0 |
32000 Hz |
16000 Hz |
1 1 |
||