Corrected hostname
[kugel-rb.git] / www / docs / mpeghdr.t
blobbf3373e98c3bfe546f6b0de44257ecbe14a00252
1 #define _PAGE_ MPEG Audio Frame Header
2 #include "head.t"
4 <P>This is a brief and informal document targeted to those who want to deal
5 with the MPEG format. If you are one of them, you probably already know what
6 is MPEG audio. If not, jump to <A
7 HREF="http://www.mp3.com/">http://www.mp3.com/</A> or <A
8 HREF="http://www.layer3.org/">http://www.layer3.org/</A> where you will find
9 more details and also more links. This document does not cover compression and
10 decompression algorithm.
12 <P>NOTE: You cannot just search the Internet and find the MPEG audio specs. It 
13 is copyrighted and you will have to pay quite a bit to get the Paper. That's why 
14 I made this. Information I got is gathered from the Internet, and mostly originate 
15 from program sources I found available for free. Despite my intention to always 
16 specify the information sources, I am not able to do it this time. Sorry, I did 
17 not maintain the list. :-( 
18 <P><B>These are not a decoding specs, it just informs you how to read the </B><A
19 HREF="#MPEG HEADER"><B>MPEG headers</B></A><B> and the </B> <A HREF="#MPEGTAG" 
20 TARGET=""><B>MPEG TAG</B></A><B>. MPEG Version 1, 2 and 2.5 and Layer I, II 
21 and III are supported, the MP3 TAG (ID3v1 and ID3v1.1) also.</B>. Those of you 
22 who use Delphi may find <A 
23 HREF="http://www.dv.co.yu/mpgscript/mpgtools.htm">MPGTools Delphi unit (freeware source)</A> 
24 useful, it is where I implemented this stuff. 
26 <P>I do not claim information presented in this document is accurate. At first 
27 I just gathered it from different sources. It was not an easy task but I needed 
28 it. Later, I received lots of comments as feedback when I published this document. 
29 I think this last release is highly accurate due to comments and corrections I 
30 received. 
31 <P>This document is last updated on December 22, 1999. 
32 <P ALIGN="center"><FONT SIZE="5"><B>MPEG Audio Compression Basics</B></FONT>
34 <P>This is one of many methods to compress audio in digital form trying to consume 
35 as little space as possible but keep audio quality as good as possible. MPEG compression 
36 showed up as one of the best achievements in this area. 
37 <P>This is a lossy compression, which means, you will certainly loose some audio 
38 information when you use this compression methods. But, this lost can hardly be 
39 noticed because the compression method tries to control it. By using several quite 
40 complicate and demanding mathematical algorithms it will only loose those parts 
41 of sound that are hard to be heard even in the original form. This leaves more 
42 space for information that is important. This way you can compress audio up to 
43 12 times (you may choose compression ratio) which is really significant. Due to 
44 its quality MPEG audio became very popular. 
45 <P>MPEG standards MPEG-1, MPEG-2 and MPEG-4 are known but this document covers 
46 first two of them. There is an unofficial MPEG-2.5 which is rarely used. It is 
47 also covered. 
48 <P><B>MPEG-1 audio</B> (described in ISO/IEC 11172-3) describes three Layers of audio coding with the following properties:
49 <LI>one or two audio channels
50 <LI>sample rate 32kHz, 44.1kHz or 48kHz.
51 <LI>bit rates from 32kbps up to 448kbps<BR>
52 Each layer has its merits.
54 <P><B>MPEG-2 audio</B> (described in ISO/IEC 13818-3) has two extensions to MPEG-1, usually referred as MPEG-2/LSF and MPEG-2/Multichannel.
55 <P>MPEG-2/LSF has the following properties:
56 <LI>one or two audio channels
57 <LI>sample rates half those of MPEG-1
58 <LI>bit rates from 8 kbps up to 256kbps.
60 <P>MPEG-2/Multichannel has the following properties:
61 <LI>up to 5 full range audio channels and an LFE-channel (Low Frequency
62 Enhancement <> subwoofer!)
63 <LI>sample rates the same as those of MPEG-1
64 <LI>highest possible bitrate goes up to about 1Mbps for 5.1
67 <P ALIGN="center"><A NAME="MPEG HEADER"></A><FONT SIZE="5"><B>MPEG Audio Frame
68 Header</B></FONT>
70 <P>An MPEG audio file is built up from smaller parts called frames. Generally, 
71 frames are independent items. Each frame has its own header and audio informations. 
72 There is no file header. Therefore, you can cut any part of MPEG file and play 
73 it correctly (this should be done on frame boundaries but most applications will 
74 handle incorrect headers). For Layer III, this is not 100% correct. Due to internal 
75 data organization in MPEG version 1 Layer III files, frames are often dependent 
76 of each other and they cannot be cut off just like that. 
77 <P>When you want to read info about an MPEG file, it is usually enough to find 
78 the first frame, read its header and assume that the other frames are the same 
79 This may not be always the case. Variable bitrate MPEG files may use so called 
80 bitrate switching, which means that bitrate changes according to the content of 
81 each frame. This way lower bitrates may be used in frames where it will not reduce 
82 sound quality. This allows making better compression while keeping high quality 
83 of sound. 
84 <P>The frame header is constituted by the very first four bytes (32bits) in a 
85 frame. The first eleven bits (or first twelve bits, see below about frame sync) 
86 of a frame header are always set and they are called &quot;frame sync&quot;. Therefore, 
87 you can search through the file for the first occurence of frame sync (meaning 
88 that you have to find a byte with a value of 255, and followed by a byte with 
89 its three (or four) most significant bits set). Then you read the whole header 
90 and check if the values are correct. You will see in the following table the exact 
91 meaning of each bit in the header, and which values may be checked for validity. 
92 Each value that is specified as reserved, invalid, bad, or not allowed should 
93 indicate an invalid header. Remember, this is not enough, frame sync can be easily 
94 (and very frequently) found in any binary file. Also it is likely that MPEG file 
95 contains garbage on it's beginning which also may contain false sync. Thus, you 
96 have to check two or more frames in a row to assure you are really dealing with 
97 MPEG audio file. 
98 <P>Frames may have a CRC check. The CRC is 16 bits long
99 and, if it exists, it follows the frame header. After the CRC comes the audio
100 data. You may calculate the length of the frame and use it if you need to read
101 other headers too or just want to calculate the CRC of the frame, to compare
102 it with the one you read from the file. This is actually a very good method to
103 check the MPEG header validity.
105 <P>Here is &quot;graphical&quot; presentation of the header content. Characters 
106 from A to M are used to indicate different fields. In the table, you can see 
107 details about the content of each field. 
108 <P ALIGN="center">
109 <B><TT><FONT SIZE="5">
110 AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM
111 </FONT>
112 </TT></B>
114 <P><CENTER>
116 <TABLE BORDER="0" CELLSPACING=7>
117 <TR VALIGN=TOP BGCOLOR="#E2E2E2">
118 <TD>Sign</TD><TD>Length<BR>(bits)</TD><TD>Position<BR>(bits)</TD><TD>Description</TD>
119 </TR>
121 <TR VALIGN=TOP>
122 <TD>A</TD><TD>11</TD><TD>(31-21)</TD><TD>Frame sync (all bits set)</TD>
123 </TR>
125 <TR VALIGN=TOP>
126 <TD>B</TD><TD>2</TD><TD>(20,19)</TD><TD>MPEG Audio version ID<BR>          
127 00 - MPEG Version 2.5<BR>01 - reserved<BR>10 - MPEG Version 2 (ISO/IEC 13818-3)<BR>11 - MPEG Version 1 (ISO/IEC 11172-3)
128 <P>Note: MPEG Version 2.5 is not official standard. Bit No 20 in frame header 
129 is used to indicate version 2.5. Applications that do not support this MPEG version 
130 expect this bit always to be set, meaning that frame sync (A) is twelve bits long, 
131 not eleve as stated here. Accordingly, B is one bit long (represents only bit 
132 No 19). I recommend using methodology presented here, since this allows you to 
133 distinguish all three versions and keep full compatibility.
134 </TD>
135 </TR>
137 <TR VALIGN=TOP><TD>C</TD><TD>2</TD><TD>(18,17)</TD>
138 <TD>Layer description<BR>          
139 00 - reserved<BR>
140 01 - Layer III<BR>
141 10 - Layer II<BR>
142 11 - Layer I</TD>
143 </TR>
145 <TR VALIGN=TOP>
146 <TD>D</TD><TD>1</TD><TD>(16)</TD>
147 <TD>Protection bit<BR>          
148 0 - Protected by CRC (16bit crc follows header)<BR>
149 1 - Not protected</TD>
150 </TR>
151 <TR VALIGN=TOP><TD>E</TD><TD>4</TD><TD>(15,12)</TD><TD>Bitrate index<BR>     
152 <TABLE BORDER="1" CELLSPACING="0" CELLPADING="0">
153 <TR><TD>bits</TD><TD>V1,L1</TD><TD>V1,L2</TD><TD>V1,L3</TD><TD>V2,L1</TD><TD>V2, L2 &amp; L3</TD></TR>
154 <TR><TD>0000</TD><TD>free</TD><TD>free</TD><TD>free</TD><TD>free</TD><TD>free</TD></TR>
155 <TR><TD>0001</TD><TD>32</TD><TD>32</TD><TD>32</TD><TD>32</TD><TD>8</TD></TR>
156 <TR><TD>0010</TD><TD>64</TD><TD>48</TD><TD>40</TD><TD>48</TD><TD>16</TD></TR>
157 <TR><TD>0011</TD><TD>96</TD><TD>56</TD><TD>48</TD><TD>56</TD><TD>24</TD></TR>
158 <TR><TD>0100</TD><TD>128</TD><TD>64</TD><TD>56</TD><TD>64</TD><TD>32</TD></TR>
159 <TR><TD>0101</TD><TD>160</TD><TD>80</TD><TD>64</TD><TD>80</TD><TD>40</TD></TR>
160 <TR><TD>0110</TD><TD>192</TD><TD>96</TD><TD>80</TD><TD>96</TD><TD>48</TD></TR>
161 <TR><TD>0111</TD><TD>224</TD><TD>112</TD><TD>96</TD><TD>112</TD><TD>56</TD></TR>
162 <TR><TD>1000</TD><TD>256</TD><TD>128</TD><TD>112</TD><TD>128</TD><TD>64</TD></TR>
163 <TR><TD>1001</TD><TD>288</TD><TD>160</TD><TD>128</TD><TD>144</TD><TD>80</TD></TR>
164 <TR><TD>1010</TD><TD>320</TD><TD>192</TD><TD>160</TD><TD>160</TD><TD>96</TD></TR>
165 <TR><TD>1011</TD><TD>352</TD><TD>224</TD><TD>192</TD><TD>176</TD><TD>112</TD></TR>
166 <TR><TD>1100</TD><TD>384</TD><TD>256</TD><TD>224</TD><TD>192</TD><TD>128</TD></TR>
167 <TR><TD>1101</TD><TD>416</TD><TD>320</TD><TD>256</TD><TD>224</TD><TD>144</TD></TR>
168 <TR><TD>1110</TD><TD>448</TD><TD>384</TD><TD>320</TD><TD>256</TD><TD>160</TD></TR>
169 <TR><TD>1111</TD><TD>bad</TD><TD>bad</TD><TD>bad</TD><TD>bad</TD><TD>bad</TD></TR>
170 </TABLE>
172 NOTES: All values are in kbps<BR>
173 V1 - MPEG Version 1<BR>
174 V2 - MPEG Version 2 and Version 2.5<BR>
175 L1 - Layer I<BR>
176 L2 - Layer II<BR>
177 L3 - Layer III<BR>
178 &quot;free&quot; means free format. If the correct fixed bitrate (such files cannot 
179 use variable bitrate) is different than those presented in upper table it must 
180 be determined by the application. This may be implemented only for internal purposes 
181 since third party applications have no means to find out correct bitrate. Howewer, 
182 this is not impossible to do but demands lot's of efforts.<BR>
183 &quot;bad&quot; means that this is not an allowed value
185 <P>MPEG files may have variable bitrate (VBR). This means that bitrate in the file may change. I have learned about two used methods:
186 <LI>bitrate switching. Each frame may be created with different bitrate. It may be used in all layers. Layer III decoders must support this method. Layer I & II decoders may support it.
187 <LI>bit reservoir. Bitrate may be borrowed (within limits) from previous frames 
188 in order to provide more bits to demanding parts of the input signal. This causes, 
189 however, that the frames are no longer independent, which means you should not 
190 cut this files. This is supported only in Layer III. 
191 <P>More about VBR you may find on <A HREF="http://www.xingtech.com/">Xing Tech 
192 site</A>
193 <P>For Layer II there are some combinations of bitrate and mode which are not 
194 allowed. Here is a list of allowed combinations. 
195 <TABLE BORDER=1 CELLSPACING=0>
196 <TR> 
197 <TD>bitrate</TD>
198 <TD>allowed modes</TD>
199 </TR>
200 <TR> 
201 <TD>free</TD>
202 <TD>all</TD>
203 </TR>
204 <TR> 
205 <TD>32</TD>
206 <TD>single channel</TD>
207 </TR>
208 <TR> 
209 <TD>48</TD>
210 <TD>single channel</TD>
211 </TR>
212 <TR> 
213 <TD>56</TD>
214 <TD>single channel</TD>
215 </TR>
216 <TR> 
217 <TD>64</TD>
218 <TD>all</TD>
219 </TR>
220 <TR> 
221 <TD>80</TD>
222 <TD>single channel</TD>
223 </TR>
224 <TR> 
225 <TD>96</TD>
226 <TD>all</TD>
227 </TR>
228 <TR> 
229 <TD>112</TD>
230 <TD>all</TD>
231 </TR>
232 <TR> 
233 <TD>128</TD>
234 <TD>all</TD>
235 </TR>
236 <TR> 
237 <TD>160</TD>
238 <TD>all</TD>
239 </TR>
240 <TR> 
241 <TD>192</TD>
242 <TD>all</TD>
243 </TR>
244 <TR> 
245 <TD>224</TD>
246 <TD>stereo, intensity stereo, dual channel</TD>
247 </TR>
248 <TR> 
249 <TD>256</TD>
250 <TD>stereo, intensity stereo, dual channel</TD>
251 </TR>
252 <TR> 
253 <TD>320</TD>
254 <TD>stereo, intensity stereo, dual channel</TD>
255 </TR>
256 <TR> 
257 <TD>384</TD>
258 <TD>stereo, intensity stereo, dual channel</TD>
259 </TR>
260 </TABLE>
261 </TD></TR>
262 <TR VALIGN=TOP>
263 <TD>F</TD><TD>2</TD><TD>(11,10)</TD>
264 <TD>Sampling rate frequency index (values are in Hz) 
265 <TABLE BORDER="1" CELLSPACING="0" CELLPADING="0">
266 <TR><TD>bits</TD><TD>MPEG1</TD><TD>MPEG2</TD><TD>MPEG2.5</TD></TR>
267 <TR><TD>00</TD><TD>44100</TD><TD>22050</TD><TD>11025</TD></TR>
268 <TR><TD>01</TD><TD>48000</TD><TD>24000</TD><TD>12000</TD></TR>
269 <TR><TD>10</TD><TD>32000</TD><TD>16000</TD><TD>8000</TD></TR>
270 <TR><TD>11</TD><TD>reserv.</TD><TD>reserv.</TD><TD>reserv.</TD></TR>
271 </TABLE>
272 </TD></TR>
274 <TR VALIGN=TOP>
275 <TD>G</TD><TD>1</TD><TD>(9)</TD>
276 <TD>Padding bit<BR>          
277 0 - frame is not padded<BR>
278 1 - frame is padded with one extra slot<BR>
280 Padding is used to fit the bit rates exactly. For an example: 128k 44.1kHz layer II uses a lot of 418 bytes and some of 417 bytes long frames to get the exact 128k bitrate. For Layer I slot is 32 bits long, for Layer II and Layer III slot is 8 bits long.
284 <P><B>How to calculate frame length</B>
286 <P>First, let's distinguish two terms frame size and frame length. Frame size 
287 is the number of samples contained in a frame. It is constant and always 384 samples 
288 for Layer I and 1152 samples for Layer II and Layer III. Frame length is length 
289 of a frame when compressed. It is calculated in slots. One slot is 4 bytes long 
290 for Layer I, and one byte long for Layer II and Layer III. When you are reading 
291 MPEG file you must calculate this to be able to find each consecutive frame. Remember, 
292 frame length may change from frame to frame due to padding or bitrate switching. 
293 <P>Read the BitRate, SampleRate and Padding of the frame header. 
294 <P>For Layer I files us this formula: 
295 <P ALIGN=CENTER>FrameLengthInBytes = (12 * BitRate / SampleRate + Padding) * 4
296 <P ALIGN=LEFT>For Layer II & III files use this formula:
297 <P ALIGN=CENTER>FrameLengthInBytes = 144 * BitRate / SampleRate + Padding 
298 <P>Example:<BR>
299 Layer III, BitRate=128000, SampleRate=44100, Padding=0<BR>
300 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ==&gt;&nbsp; FrameSize=417 bytes 
301 </TD></TR>
303 <TR VALIGN=TOP><TD>H</TD><TD>1</TD><TD>(8)</TD>
304 <TD>Private bit. It may be freely used for specific needs of an application, i.e. if it has to trigger some application specific events.</TD>
305 </TR>
307 <TR VALIGN=TOP><TD>I</TD><TD>2</TD><TD>(7,6)</TD>
308 <TD>Channel Mode<BR>          
309 00 - Stereo<BR>
310 01 - Joint stereo (Stereo)<BR>
311 10 - Dual channel (Stereo)<BR>
312 11 - Single channel (Mono)</TD>
313 </TR>
315 <TR VALIGN=TOP><TD>J</TD><TD>2</TD><TD>(5,4)</TD>
316 <TD>Mode extension (Only if Joint stereo)
317 <P>Mode extension is used to join informations that are of no use for stereo effect, thus reducing needed resources. These bits are dynamically determined by an encoder in Joint stereo mode.
319 <P>Complete frequency range of MPEG file is divided in subbands There are 32 subbands. For Layer I & II these two bits determine frequency range (bands) where intensity stereo is applied. For Layer III these two bits determine which type of joint stereo 
321 is used (intensity stereo or m/s stereo). Frequency range is determined within decompression algorythm.
323 <TABLE BORDER="0" CELLSPACING="2" CELLPADDING="0">
324 <TR><TD ALIGN=CENTER>Layer I and II</TD><TD ALIGN=CENTER>Layer III</TD></TR>
325 <TR VALIGN=TOP><TD> 
326 <TABLE BORDER="1" CELLSPACING="0" CELLPADING="0">
327 <TR><TD>value</TD><TD>Layer I &amp; II</TD></TR>
328 <TR><TD>00</TD><TD>bands 4 to 31</TD></TR>
329 <TR><TD>01</TD><TD>bands 8 to 31</TD></TR>
330 <TR><TD>10</TD><TD>bands 12 to 31</TD></TR>
331 <TR><TD>11</TD><TD>bands 16 to 31</TD></TR></TABLE>
332 </TD>
334 <TD> 
335 <TABLE BORDER="1" CELLSPACING="0" CELLPADING="0" WIDTH="212">
336 <TR ALIGN=CENTER><TD>Intensity stereo</TD><TD>MS stereo</TD></TR>
337 <TR ALIGN=CENTER><TD>off</TD><TD>off</TD></TR>
338 <TR ALIGN=CENTER><TD>on</TD><TD>off</TD></TR>
339 <TR ALIGN=CENTER><TD>off</TD><TD>on</TD></TR>
340 <TR ALIGN=CENTER><TD>on</TD><TD>on</TD></TR></TABLE>
341 </TD></TR></TABLE>
342 </TD></TR>
344 <TR VALIGN=TOP><TD>K</TD><TD>1</TD><TD>(3)</TD>
345 <TD>Copyright<BR>          
346 0 - Audio is not copyrighted<BR>
347 1 - Audio is copyrighted</TD>
348 </TR>
350 <TR VALIGN=TOP><TD>L</TD><TD>1</TD><TD>(2)</TD>
351 <TD>Original<BR>          
352 0 - Copy of original media<BR>
353 1 - Original media</TD>
354 </TR>
356 <TR VALIGN=TOP>
357 <TD>M</TD><TD>2</TD><TD>(1,0)</TD>
358 <TD>Emphasis<BR>          
359 00 - none<BR>
360 01 - 50/15 ms<BR>
361 10 - reserved<BR>
362 11 - CCIT J.17</TD>
363 </TR></TABLE>
364 <P>&nbsp;</P></CENTER>
366 <P ALIGN="center"><A NAME="MPEGTAG"></A><FONT SIZE="5"><B>MPEG Audio Tag ID3v1</B></FONT> 
367 <P>The TAG is used to describe the MPEG Audio file. It contains information
368 about artist, title, album, publishing year and genre. There is some extra
369 space for comments. It is exactly 128 bytes long and is located at very end of
370 the audio data. You can get it by reading the last 128 bytes of the MPEG audio
371 file.
373 <P ALIGN="center"><FONT SIZE="5"><B><TT>
374 AAABBBBB BBBBBBBB BBBBBBBB BBBBBBBB<BR>
375 BCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCD<BR>
376 DDDDDDDD DDDDDDDD DDDDDDDD DDDDDEEE<BR>
377 EFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFG<BR>
378 </TT></B></FONT>
380 <CENTER>
382 <TABLE BORDER="0" WIDTH="500">
383 <TR VALIGN=TOP BGCOLOR=#E2E2E2>
384 <TD>Sign</TD><TD>Length<BR>(bytes)</TD><TD>Position<BR>
385 (bytes)</TD><TD>Description</TD></TR>
386 <TR VALIGN=TOP><TD>A</TD><TD>3</TD><TD>(0-2)</TD>
387 <TD>Tag identification. Must contain 'TAG' if tag exists and is 
388 correct.</TD>
389 </TR>
390 <TR><TD>B</TD><TD>30</TD><TD>(3-32)</TD><TD>Title</TD></TR>
391 <TR><TD>C</TD><TD>30</TD><TD>(33-62)</TD><TD>Artist</TD></TR>
392 <TR><TD>D</TD><TD>30</TD><TD>(63-92)</TD><TD>Album</TD></TR>
393 <TR><TD>E</TD><TD>4</TD><TD>(93-96)</TD><TD>Year</TD></TR>
394 <TR><TD>F</TD><TD>30</TD><TD>(97-126)</TD><TD>Comment</TD></TR>
395 <TR><TD>G</TD><TD>1</TD><TD>(127)</TD><TD>Genre</TD></TR></TABLE>
396 </CENTER>
398 <P>The specification asks for all fields to be padded with null character
399 (ASCII 0). However, not all applications respect this (an example is WinAmp
400 which pads fields with &lt;space&gt;, ASCII 32).
402 <P>There is a small change proposed in <B>ID3v1.1</B> structure. The last byte 
403 of the Comment field may be used to specify the track number of a song in an 
404 album. It should contain a null character (ASCII 0) if the information is 
405 unknown.
407 <P>Genre is a numeric field which may have one of the following values:
409 <CENTER>
410 <TABLE BORDER="0" WIDTH="90%">
411 <TR>
412 <TD WIDTH="1%">0</TD>
413 <TD WIDTH="20%">'Blues'</TD>
414 <TD WIDTH="1%">20</TD>
415 <TD WIDTH="20%">'Alternative'</TD>
416 <TD WIDTH="1%">40</TD>
417 <TD WIDTH="20%">'AlternRock'</TD>
418 <TD WIDTH="1%">60</TD>
419 <TD WIDTH="20%">'Top 40'</TD>
420 </TR>
421 <TR>
422 <TD>1</TD>
423 <TD>'Classic Rock'</TD>
424 <TD>21</TD>
425 <TD>'Ska'</TD>
426 <TD>41</TD>
427 <TD>'Bass'</TD>
428 <TD>61</TD>
429 <TD>'Christian Rap'</TD>
430 </TR>
431 <TR>
432 <TD>2</TD>
433 <TD>'Country'</TD>
434 <TD>22</TD>
435 <TD>'Death Metal'</TD>
436 <TD>42</TD>
437 <TD>'Soul'</TD>
438 <TD>62</TD>
439 <TD>'Pop/Funk'</TD>
440 </TR>
441 <TR>
442 <TD>3</TD>
443 <TD>'Dance'</TD>
444 <TD>23</TD>
445 <TD>'Pranks'</TD>
446 <TD>43</TD>
447 <TD>'Punk'</TD>
448 <TD>63</TD>
449 <TD>'Jungle'</TD>
450 </TR>
451 <TR>
452 <TD>4</TD>
453 <TD>'Disco'</TD>
454 <TD>24</TD>
455 <TD>'Soundtrack'</TD>
456 <TD>44</TD>
457 <TD>'Space'</TD>
458 <TD>64</TD>
459 <TD>'Native American'</TD>
460 </TR>
461 <TR>
462 <TD>5</TD>
463 <TD>'Funk'</TD>
464 <TD>25</TD>
465 <TD>'Euro-Techno'</TD>
466 <TD>45</TD>
467 <TD>'Meditative'</TD>
468 <TD>65</TD>
469 <TD>'Cabaret'</TD>
470 </TR>
471 <TR>
472 <TD>6</TD>
473 <TD>'Grunge'</TD>
474 <TD>26</TD>
475 <TD>'Ambient'</TD>
476 <TD>46</TD>
477 <TD>'Instrumental Pop'</TD>
478 <TD>66</TD>
479 <TD>'New Wave'</TD>
480 </TR>
481 <TR>
482 <TD>7</TD>
483 <TD>'Hip-Hop'</TD>
484 <TD>27</TD>
485 <TD>'Trip-Hop'</TD>
486 <TD>47</TD>
487 <TD>'Instrumental Rock'</TD>
488 <TD>67</TD>
489 <TD>'Psychadelic'</TD>
490 </TR>
491 <TR>
492 <TD>8</TD>
493 <TD>'Jazz'</TD>
494 <TD>28</TD>
495 <TD>'Vocal'</TD>
496 <TD>48</TD>
497 <TD>'Ethnic'</TD>
498 <TD>68</TD>
499 <TD>'Rave'</TD>
500 </TR>
501 <TR>
502 <TD>9</TD>
503 <TD>'Metal'</TD>
504 <TD>29</TD>
505 <TD>'Jazz+Funk'</TD>
506 <TD>49</TD>
507 <TD>'Gothic'</TD>
508 <TD>69</TD>
509 <TD>'Showtunes'</TD>
510 </TR>
511 <TR>
512 <TD>10</TD>
513 <TD>'New Age'</TD>
514 <TD>30</TD>
515 <TD>'Fusion'</TD>
516 <TD>50</TD>
517 <TD>'Darkwave'</TD>
518 <TD>70</TD>
519 <TD>'Trailer'</TD>
520 </TR>
521 <TR>
522 <TD>11</TD>
523 <TD>'Oldies'</TD>
524 <TD>31</TD>
525 <TD>'Trance'</TD>
526 <TD>51</TD>
527 <TD>'Techno-Industrial'</TD>
528 <TD>71</TD>
529 <TD>'Lo-Fi'</TD>
530 </TR>
531 <TR>
532 <TD>12</TD>
533 <TD>'Other'</TD>
534 <TD>32</TD>
535 <TD>'Classical'</TD>
536 <TD>52</TD>
537 <TD>'Electronic'</TD>
538 <TD>72</TD>
539 <TD>'Tribal'</TD>
540 </TR>
541 <TR>
542 <TD>13</TD>
543 <TD>'Pop'</TD>
544 <TD>33</TD>
545 <TD>'Instrumental'</TD>
546 <TD>53</TD>
547 <TD>'Pop-Folk'</TD>
548 <TD>73</TD>
549 <TD>'Acid Punk'</TD>
550 </TR>
551 <TR>
552 <TD>14</TD>
553 <TD>'R&amp;B'</TD>
554 <TD>34</TD>
555 <TD>'Acid'</TD>
556 <TD>54</TD>
557 <TD>'Eurodance'</TD>
558 <TD>74</TD>
559 <TD>'Acid Jazz'</TD>
560 </TR>
561 <TR>
562 <TD>15</TD>
563 <TD>'Rap'</TD>
564 <TD>35</TD>
565 <TD>'House'</TD>
566 <TD>55</TD>
567 <TD>'Dream'</TD>
568 <TD>75</TD>
569 <TD>'Polka'</TD>
570 </TR>
571 <TR>
572 <TD>16</TD>
573 <TD>'Reggae'</TD>
574 <TD>36</TD>
575 <TD>'Game'</TD>
576 <TD>56</TD>
577 <TD>'Southern Rock'</TD>
578 <TD>76</TD>
579 <TD>'Retro'</TD>
580 </TR>
581 <TR>
582 <TD>17</TD>
583 <TD>'Rock'</TD>
584 <TD>37</TD>
585 <TD>'Sound Clip'</TD>
586 <TD>57</TD>
587 <TD>'Comedy'</TD>
588 <TD>77</TD>
589 <TD>'Musical'</TD>
590 </TR>
591 <TR>
592 <TD>18</TD>
593 <TD>'Techno'</TD>
594 <TD>38</TD>
595 <TD>'Gospel'</TD>
596 <TD>58</TD>
597 <TD>'Cult'</TD>
598 <TD>78</TD>
599 <TD>'Rock &amp; Roll'</TD>
600 </TR>
601 <TR>
602 <TD>19</TD>
603 <TD>'Industrial'</TD>
604 <TD>39</TD>
605 <TD>'Noise'</TD>
606 <TD>59</TD>
607 <TD>'Gangsta'</TD>
608 <TD>79</TD>
609 <TD>'Hard Rock'</TD>
610 </TR>
611 </TABLE>
612 <DIV ALIGN="LEFT"><BR>
613 WinAmp expanded this table with next codes: </DIV>
614 <TABLE BORDER="0" WIDTH="90%">
615 <TR> 
616 <TD WIDTH="1%">80</TD>
617 <TD WIDTH="20%">'Folk'</TD>
618 <TD>92</TD>
619 <TD>'Progressive Rock'</TD>
620 <TD>104</TD>
621 <TD>'Chamber Music'</TD>
622 <TD>116</TD>
623 <TD>'Ballad'</TD>
624 </TR>
625 <TR> 
626 <TD>81</TD>
627 <TD>'Folk-Rock'</TD>
628 <TD WIDTH="1%">93</TD>
629 <TD WIDTH="20%">'Psychedelic Rock'</TD>
630 <TD>105</TD>
631 <TD>'Sonata'</TD>
632 <TD>117</TD>
633 <TD>'Poweer Ballad'</TD>
634 </TR>
635 <TR> 
636 <TD>82</TD>
637 <TD>'National Folk'</TD>
638 <TD>94</TD>
639 <TD>'Symphonic Rock'</TD>
640 <TD WIDTH="1%">106</TD>
641 <TD WIDTH="20%">'Symphony'</TD>
642 <TD>118</TD>
643 <TD>'Rhytmic Soul'</TD>
644 </TR>
645 <TR> 
646 <TD>83</TD>
647 <TD>'Swing'</TD>
648 <TD>95</TD>
649 <TD>'Slow Rock'</TD>
650 <TD>107</TD>
651 <TD>'Booty Brass'</TD>
652 <TD WIDTH="1%">119</TD>
653 <TD WIDTH="20%">'Freestyle'</TD>
654 </TR>
655 <TR> 
656 <TD>84</TD>
657 <TD>'Fast Fusion'</TD>
658 <TD>96</TD>
659 <TD>'Big Band'</TD>
660 <TD>108</TD>
661 <TD>'Primus'</TD>
662 <TD>120</TD>
663 <TD>'Duet'</TD>
664 </TR>
665 <TR> 
666 <TD>85</TD>
667 <TD>'Bebob'</TD>
668 <TD>97</TD>
669 <TD>'Chorus'</TD>
670 <TD>109</TD>
671 <TD>'Porn Groove'</TD>
672 <TD>121</TD>
673 <TD>'Punk Rock'</TD>
674 </TR>
675 <TR> 
676 <TD>86</TD>
677 <TD>'Latin'</TD>
678 <TD>98</TD>
679 <TD>'Easy Listening'</TD>
680 <TD>110</TD>
681 <TD>'Satire'</TD>
682 <TD>122</TD>
683 <TD>'Drum Solo'</TD>
684 </TR>
685 <TR> 
686 <TD>87</TD>
687 <TD>'Revival'</TD>
688 <TD>99</TD>
689 <TD>'Acoustic'</TD>
690 <TD>111</TD>
691 <TD>'Slow Jam'</TD>
692 <TD>123</TD>
693 <TD>'A Capela'</TD>
694 </TR>
695 <TR> 
696 <TD>88</TD>
697 <TD>'Celtic'</TD>
698 <TD>100</TD>
699 <TD>'Humour'</TD>
700 <TD>112</TD>
701 <TD>'Club'</TD>
702 <TD>124</TD>
703 <TD>'Euro-House'</TD>
704 </TR>
705 <TR> 
706 <TD>89</TD>
707 <TD>'Bluegrass'</TD>
708 <TD>101</TD>
709 <TD>'Speech'</TD>
710 <TD>113</TD>
711 <TD>'Tango'</TD>
712 <TD>125</TD>
713 <TD>'Dance Hall'</TD>
714 </TR>
715 <TR> 
716 <TD>90</TD>
717 <TD>'Avantgarde'</TD>
718 <TD>102</TD>
719 <TD>'Chanson'</TD>
720 <TD>114</TD>
721 <TD>'Samba'</TD>
722 <TD>&nbsp;</TD>
723 <TD>&nbsp;</TD>
724 </TR>
725 <TR> 
726 <TD>91</TD>
727 <TD>'Gothic Rock'</TD>
728 <TD>103</TD>
729 <TD>'Opera'</TD>
730 <TD>115</TD>
731 <TD>'Folklore'</TD>
732 <TD>&nbsp;</TD>
733 <TD>&nbsp;</TD>
734 </TR>
735 <TR> 
736 <TD COLSPAN=8>Any other value should be considered as 'Unknown' 
737 </TABLE>
738 <P>&nbsp;</P></CENTER>
740 <P ALIGN="center"><A NAME="MPEG TAG"></A><FONT SIZE="5"><B>MPEG Audio Tag ID3v2</B></FONT> 
741 <P>This is new proposed TAG format which is different than ID3v1 and ID3v1.1. 
742 Complete tech specs for it may be found at <A 
743 HREF="http://www.id3.org/">http://www.id3.org/</A>. 
744 <P><CENTER>
745 <HR>
746 <P><FONT SIZE="-1"> Created on September 1998. by <A HREF="http://www.dv.co.yu/broker/">Predrag 
747 Supurovic</A>.<BR>
748 Thanks to <A HREF="http://www.jps.net/kyunghi/">Jean</A> for debugging and polishing 
749 of this document, <A HREF="http://members.tripod.com/~videoripper/home.htm">Peter 
750 Luijer</A>, Guwani, Rob Leslie and Franc Zijderveld<BR>
751 for valuable comments and corrections.</FONT></P>
752 <P>&copy; 1998, 1999 Copyright by DataVoyage</P>
753 <P><FONT SIZE="-1">This document may be changed. Check <A
754 HREF="http://www.dv.co.yu/mpgscript/mpeghdr.htm">http://www.dv.co.yu/mpgscript/mpeghdr.htm</A> 
755 for updates.<BR>
756 You may use it freely. Distribution is allowed only in unaltered form. If you 
757 can help me make it more accurate, please do. </FONT></P>
758 <P>&nbsp;</P>
759 </CENTER>
761 #include "foot.t"