How to get the ID3 tag of an MP3 
Author Message
 How to get the ID3 tag of an MP3

(oops my previous message wasn't posted, oh well ....)

Hello, how can I get the ID3-TAg of an mp3
I prefer code instead of an activeX,
but any help is welcome :-)

thnx
Boomer



Sat, 14 Sep 2002 03:00:00 GMT  
 How to get the ID3 tag of an MP3
You can get my VB ID3 library.  There's a new version coming up in the next
month or two that is somewhat cleaner and has support for ID3 version 2, as
well as some source to read frame info (like copyright, sampling rate, song
length, etc.).  However, the version posted now is quite workable.

http://www.fullspectrum.com/deeth/programming/mp3dev.html#VBID3

MM

...

Quote:
>Hello, how can I get the ID3-TAg of an mp3
>I prefer code instead of an activeX,
>but any help is welcome :-)

...


Sat, 14 Sep 2002 03:00:00 GMT  
 How to get the ID3 tag of an MP3
Since you didn't specify which version of ID3 you want to read, I'm going to
tell you about ID3v1 which is the most commonly used (and the only one
supported by Winamp, AFAIK).

Open the MP3 file for Binary, then read the last 128 bytes of the file into
a byte array.  Use the StrConv() function to convert the Title, Artist,
Album, Year, and Comment fields into VB strings.  Goto
http://www.id3.org/id3v1.html for an exact explanation of how ID3-Tags are
stored.  You code would look something like:

Private Sub Command1_Click()
Dim Tag(127) As Byte, TagAsString As String
  Open "C:\MP3s\Super-Song.mp3" For Binary As #1
    Get #1, LOF(1) - 127, Tag
  Close #1
  If Tag(0) = Asc("T") And Tag(1) = Asc("A") And Tag(2) = Asc("G") Then
    TagAsString = StrConv(Tag, vbUnicode)
    Debug.Print "Title: " & Mid$(TagAsString, 4, 30)
    Debug.Print "Artist: " & Mid$(TagAsString, 34, 30)
    Debug.Print "Album: " & Mid$(TagAsString, 64, 30)
    Debug.Print "Year: " & Mid$(TagAsString, 94, 4)
    Debug.Print "Comment: " & Mid$(TagAsString, 98, 30)
    Debug.Print "Genre: " & CStr(Tag(127))
  Else
    Debug.Print "No ID3v1 tag associated with this file."
  End If
End Sub

Howard Henry Schlunder


Quote:
> (oops my previous message wasn't posted, oh well ....)

> Hello, how can I get the ID3-TAg of an mp3
> I prefer code instead of an activeX,
> but any help is welcome :-)

> thnx
> Boomer



Sun, 15 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need an Easy MP3 ID3-tag editor ??

2. Mp3 id3 tags

3. ID3 MP3 tag writer

4. MP3 'ID3 Tag' Issue

5. Help on a c++ to VB conversion of MP3 id3 tag

6. Reading MP3 ID3 Tag

7. Help Reading ID3 Tag Information from MP3 file

8. Retrieving MP3 ID3 tag

9. ID3 tag viewing ??? Can you view the ID3 Tag information from an MP3 ?

10. MP3 ID3's

11. Looking for easy to use MP3 ID3 Com Library

12. MP3 ID3 info

 

 
Powered by phpBB® Forum Software