|
-
Jun 2nd, 2006, 11:39 AM
#1
Thread Starter
Member
Change your music files' ID3 tags (extended properties)!
I had been trying to find a way to programatically change the ID3 tags ("extended properties" like Album, Title, Artist) for my mp3 collection. All I could find were a bunch of other posts asking for the same information. Microsoft doesn't seem to offer any easy way of getting to these attributes because all the SDK offered, as far as I could tell, was some C++ solution, which I have no idea how to implement.
I finally found a way to accomplish this. I found an article on Google referencing CDDBcontroll.dll which promised to be an easy ay to change ID3 tags. I downloaded on off the net, but it didn't work for me. Then I noticed I already had a newer version in C:\WINDOWS\system32\CDDBControlRoxio.dll. This worked for me. I am using v 2.0.0.20. The dll (not sure which version) can be downloaded from http://www.dynamiclink.nl/htmfiles/rframes/dll-c02.htm .
To use it, simply register the dll (if you don't already have it), reference it in your project, then
VB Code:
Dim id3 As New CDDBCONTROLLibRoxio.CddbID3Tag
id3.LoadFromFile(fil.Path, False) '*
id3.SaveToFile(fil.Path) '*
id3.LoadFromFile(fil.Path, False)
id3.Album=album name
id3.Title=track title
id3.LeadArtist=artist name
id3.SaveToFile(fil.Path)
*When I tried to run the update on my system I found that I had to open and save the id3 object once, then do the open, fill and save to get the save to atually work.
Anyway, if you use a file scripting object you can easliy traverse your whole system and add the data to all your files in one fell swopp (by piecing out the file path, for example, if you store your music in artist\album\file.mp3 format)
NOTE: This only works with MP3s, as far as I know. WMAs will get corrupted.
NOTE: I found that I need to run the update twice if the ID3 tag is really long. If the tag is really long, only part of the tag is updated. First I do put the song into iTunes. Then I convert the ID3 tags to v2.4 (or whichever is the latest) via iTunes. Then I run my ID3 tag updater twice.
Last edited by mndepaul; Nov 27th, 2006 at 08:11 AM.
Reason: update
-
Jun 2nd, 2006, 11:44 AM
#2
Re: Change your music files' ID3 tags (extended properties)!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|