Read the tag information of MP3 ID3 V1 (C #/. Net)

Source: Internet
Author: User
Tags id3

The MPEG audio file uses the tag area to describe the relevant information of the audio file, such as the singer, album, release year, music name, genre, audio track, and additional information.

The tag mentioned here is for ID3 V1, including V1.0 and V1.1. In the version definition of ID3 V1, the tag information is defined as follows:

It is stored at the end of the MP3 file and occupies 128 bytes. When the content is insufficient, null (ASCII = 0) or space (ASCII = 32) is used for filling.

The allocation of these 128 bytes is as follows:

  1. First 3 bytes (0-2): storedTagIf these three characters are not tags, the mpeg file does not contain the correct tag information and will not be processed.
  2. (3-32) 30 bytes for storing the title of the music)
  3. 30 bytes (33-62), which are used for singing/playing, artist
  4. (63-92) 30 bytes for storing the album name
  5. (93-96), which stores four bytes of the release year.
  6. (97-126) 30 bytes, which should be divided into situations: V1.0: storing comments/Additional/remarks; V1.1: the first 29 bytes are used to store comments/Additional/remarks, and the last byte is used to store audio track information.
  7. The last byte (127) stores the genre. Currently, there are 80 basic genre information and 68 extended genre information.

Basic genre Sequence:

0 'Blues' 20 & Apos; Alternative & apos' 40 'Alternrock' 60 'Top 40'
1 'Classic rock' 21 'Sks' 41 'Bass' 61 'Christian reac'
2 'Country' 22 'Destath metal' 42 'Soul' 62 'Pop/funk'
3 'Dance' 23 'Prank' 43 'Punk' 63 'Jungl'
4 'Disco' 24 'Soundtrack' 44 'Space' 64 'Native American'
5 'Funk' 25 'Euro-techno' 45 'Meditmode' 65 'Cabaret'
6 'Grunge' 26 'Ambient' 46 'Instrumental pop' 66 'New wave'
7 'Hip-hop' 27 'Trip-hop' 47 'Instrumental Rock' 67 'Psychadelic'
8 'Jazz' 28 'Vocal' 48 'Ethenice' 68 'Rdav'
9 'Metal' 29 'Jazz + funk' 49 'Gothic' 69 'Showinstances'
10 'New age' 30 'Fusion' 50 'Dark' 70 'Trailer'
11 'Oldies' 31 'Trance' 51 'Techno-industrial' 71 'Lo-fi'
12 'Other' 32 'Classical' 52 'Electroenice' 72 'Trigger'
13 'Pop' 33 'Instrumental' 53 'Pop-folk' 73 'Acid punk'
14 'R & B' 34 'Acid' 54 'Eurodance' 74 'Acid jazz'
15 'Rap' 35 'House' 55 'Dream' 75 'Polka'
16 'Reggae' 36 'Game' 56 'Southern Rock' 76 'Retro'
17 'Rock' 37 'Sound clip' 57 'Comedy' 77 'Musical'
18 'Techno' 38 'Gospel' 58 'Cresult' 78 'Rock & roll'
19 'Industrial' 39 'Noise' 59 'Giangst' 79 'Hard rock'

I will omit the extension...

With the preparation of the above materials, we will start the work:

The code will not be pasted. It is relatively simple. It is a byte read and, if you are interested, download the source code directly.

Download complete source code

Original article: http://www.zu14.cn/2009/01/11/csharp-mp3-tag-id3v1/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.