Up ] Docs Home ]

(mp3) Audio MPEG File Format Layer-3

Back ] Next ]

Заголовок фрейма

+0 FFh
+1 Bit:
0 Protection Bit (CRC):
0 CRC on
1 CRC off
1, 2 Layer:
1 Layer III
2 Layer II
3 Layer I
3, 4 MPEG version:
0 MPEG 2.5 (44100 KHz)
2 MPEG 2.0 (22050 KHz)
3 MPEG 1.0 (11025 KHz)
5 - 7 установлены (1)
+2 Bit:
0 Private
1 Padding Bit
2, 3 Sample Frequency:
0 0 - 44100 KHz
1 48000 KHz
2 32000 KHz
4 - 7 Bitrate Index (в таблице значения Bitrate в kbps)
Bitrate Index Layer
I II III
1 32 32 32
2 64 48 40
3 96 56 48
4 128 64 56
5 160 80 64
6 192 96 80
7 224 112 96
8 256 128 112
9 288 160 128
10 320 192 160
11 352 224 192
12 384 256 224
13 416 320 256
14 448 384 320
+3 Bit:
0, 1 Emphasis:
0 None
1 50/15 microsec
2 Dunno
3 CITT j.17
2 Original
3 Copyright
4, 5 Mode Extension
6, 7 Mode:
0 Stereo
1 Joint Stereo
2 Dual Channel
3 Single Channel

Длина фрейма (Layer 2,3)

FrameSize = 144 * bps / Sample_Frequency + Padding_Bit

Extended Header (Layer 3)

MPEG version Stereo Mono
1.0 32 17
2.x 17 09

ID3TAG

-128 Title[30]
Artist[30]
Album[30]
Year[4]
Comment[30]
Genre[1]

DIDTAG

Variable ID Tag for MPEG3 Files (DIDTAG) Ver 1.00 Dez. 1997
Field Length Comment
1. 6 Bytes "DIDTAG"
2. 1 Byte Length of title string
3. x Byte Title (Length: 2. Field)
4. 1 Byte Length of artist string
5. x Byte Artist (Length: 4. Field)
6. 1 Byte Length of album string
7. x Byte Album (Length: 6. Field)
8. 4 Bytes Year
9. 1 Byte Length of software string
10. x Byte Software used for sampling (Length: 9. Field)
11. 1 Byte Length of sampled-by string
12. x Byte Track sampled by... (Length: 11. Field)
13. 1 Byte Length of comment field
14. x Byte Comments (Length: 13. Field)
15. 1 Byte Length of Genre field
16. x Byte Genre - use as you like, but don't make up too much new. (Length: 15. Field)
17. Word (2 Bytes) Length of whole tag
18. 6 Bytes "ENDTAG"

MP3 Data
DIDTAG
ID3TAG

If you read a file, first seek end-128 and look if the file has got an ID3 Tag. (As your Software probably already does.) If, seek back 6 Bytes and look for "ENDTAG", you then can process my new tag. If there is no "ENDTAG", just process the ID3 Tag. If there is no ID3 Tag, there is the chance there is a DIDTAG, so seek end-6 and check for "ENDTAG"....