The MP3car.com Store The MP3car.com Store    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-17-2005, 11:59 PM   #1
Constant Bitrate
 
Join Date: Sep 2004
Location: Frisco, Texas
Posts: 173
ID3v2 Tag Reading VB6 Code

The following VB6 code will get tags from tracks with ID3v1/v2, but will not get tracks with only v2. Can someone help me with the right tag location or anything other information that will help me parse out v2 tags?

Code:
Open sKey For Binary As #1 With CurrentTag Get #1, FileLen(sKey) - 127, .Tag If Not .Tag = "TAG" Then txtTitle = "no tag" txtArtist = "no tag" txtAlbum = "no tag" txtYear = "no tag" Close #1 End If Get #1, , .Songname Get #1, , .artist Get #1, , .album Get #1, , .year Close #1 txtTitle = RTrim(.Songname) txtArtist = RTrim(.artist) txtAlbum = RTrim(.album) txtYear = RTrim(.year) End With

TheJack is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 03-18-2005, 12:08 AM   #2
Constant Bitrate
 
OdysseyPC's Avatar
 
Join Date: Oct 2003
Location: ACT, Australia
Posts: 114
There is hardly enough area to answer a question of this scope. The code you have will only read ID3v1 tags. This version held information in the last 128 bytes of the mp3 file. ID3v2 introduced dynamic sized data by means of giving each portion a specific header within the file itself. The downside is that you have to parse the whole file to extract all the relevent information. Hence the large scope of the question.

Fortunately there are a ton of projects/ActiveX/modules that have ID3v2 support you're after in VB6 format, residing in a little place called Planet Source Code.

This is a haven for all beginners. I suggest you check it out, it'll answer all those pesky questions. Even Frodo gives it a thumbs up, so it's got to be good doesn't it.
__________________
Caputer Mk. II
'02 VX Holden Commodore Series II Executive
MII12000, 512MB RAM, 60GB HDD (5400rpm), 16X DVD, TS200V
Morex 60W DC-DC, Custom S/SDC
OS/Software: Developing...
OdysseyPC is offline   Reply With Quote
Old 03-18-2005, 12:16 AM   #3
Constant Bitrate
 
Join Date: Sep 2004
Location: Frisco, Texas
Posts: 173
Thanks, I'll check it out. I didn't know V2 got so complicated.... I just figured it's location was expanded to include more data.
TheJack is offline   Reply With Quote
Old 03-18-2005, 08:26 AM   #4
Registered User
 
Join Date: Jan 2002
Location: Philadelphia
Posts: 115
If you want to take the easy way out and just use an active-x OCX try Audio Genie.

I know it is skipping the fun of coding it yourself, but that is what reusable code is all about.
mhermann is offline   Reply With Quote
Old 03-18-2005, 03:03 PM   #5
I'm sorry, and you are....?
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Posts: 9,860
ID3v2 is a beast. It's also a big pile of crap.
Could have been designed much better.
__________________
FrodoPlayer.com
TeaBaggins.com
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 03-18-2005, 07:52 PM   #6
Variable Bitrate
 
AlienEclipse's Avatar
 
Join Date: Jul 2003
Location: Dunedin - New Zealand
Posts: 425
http://www.vbaccelerator.com/home/VB...gs/article.asp
__________________
We are, will have and forever will be...
But not tommorrow!
AlienEclipse is offline   Reply With Quote
Old 03-18-2005, 08:09 PM   #7
I should've eaten the blue pill.
 
Bitoholic's Avatar
 
Join Date: Apr 2004
Location: Port Saint Lucie, FL
Posts: 682
Quote: Originally Posted by frodobaggins
ID3v2 is a beast. It's also a big pile of crap.
Could have been designed much better.

Amen to that brutha
__________________
Ben S. Stahlhood II
Hybrid Mobile
MMC/Transcend Developer
--------------------------------------
http://www.hybrid-mobile.com/
http://www.cocoamachine.com/
http://weblogs.asp.net/bstahlhood/
Bitoholic is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ID3 Tag Reading serendipity Centrafuse 28 01-18-2005 12:26 AM
GPS/MapPoint VB Source Code stevieg Software & Software Development 4 06-08-2004 02:24 PM
How to remove winamp AVS border. - Sample VB6 code Fusion-One Software & Software Development 1 10-03-2003 07:55 PM


All times are GMT -5. The time now is 02:31 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics