all groups > dotnet windows forms designtime > january 2005 >
You're in the

dotnet windows forms designtime

group:

Looking for proper MP3 syntax accessing


Looking for proper MP3 syntax accessing MikeY
1/17/2005 7:38:48 PM
dotnet windows forms designtime:
I am having trouble with and looking for the proper syntax for accessing and
renaming MP3 files properties.

Example I can access the "Name" property of the file and I can rename the
file name to a new name (and do this in mass quantity at once). What I want
to accomplish is to gain access and rename the extended properties such as
"Artist", "Title", "Album Title", "Comments", etc. A sample of my code is as
follows.

if(txtBoxNameConversion.Text != "")
{
foreach(string myItem in CLBoxGroupFileConversion.CheckedItems)
{
string myItems2 = txtBoxNameConversion.Text + "-" + myItem;

//Over-write old file with new file name
File.Move(Path.Combine(currentFolderPath, myItem),
Path.Combine(currentFolderPath, myItem2));
}
}

Any and all suggestions are appreciated. Thank you all in advance.


MikeY

Re: Looking for proper MP3 syntax accessing Brian Patterson
1/18/2005 4:51:14 PM
I'm guessing you are talking about reading and writing the MP3v1 tag of the
file. This information is stored at the end of the file. You can get to
the info by reading the last 128 bytes of the file and reading the first 3
bytes of this 128 byte stream. If there is valid information stored there
the first 3 bytes should say "TAG". The format of the information is as
follows:

Sign Length
(bytes) Position
(bytes) Description
A 3 (0-2) Tag identification. Must contain 'TAG' if tag exists and is
correct.
B 30 (3-32) Title
C 30 (33-62) Artist
D 30 (63-92) Album
E 4 (93-96) Year
F 30 (97-126) Comment
G 1 (127) Genre


Also keep in mind there are different versions for this information which
you will have to account for.

Brian Patterson
http://dotnet.redeyepos.com

[quoted text, click to view]

Re: Looking for proper MP3 syntax accessing MikeY
1/18/2005 7:29:11 PM
Thank you Brian,

I'll give it a go now.


[quoted text, click to view]

AddThis Social Bookmark Button