1 Attachment(s)
ID3v1 tag reader for MP3 files
Adapted from Steve Mac's VB6 code here.
Supports versions 1.0-1.1 of the tag spec. ID3v2 to follow.
To use, just declare a new instance and pass the mp3 filename in the constructor.
Code:
ID3v1tag tag = new ID3v1tag(@"D:\Music\Some track with an ID3v1 tag.mp3");
Comments welcome (especially suggestions of replacements for the huge switch() block :))
Re: ID3v1 tag reader for MP3 files
Does it read id tag for remote mp3?
Re: ID3v1 tag reader for MP3 files
Not without downloading it first as it uses a Streamreader.
Re: ID3v1 tag reader for MP3 files
dam i am looking for one to read remote id3 tags. There is a site that has that option but they do not provide the source code which is php!!
Re: ID3v1 tag reader for MP3 files
What you could download is download the mp3 file in bits, looking for an ID3 header section in those bits, and if you get a complete ID3 header, stop the download and feed what you have into the tag reader class. Shouldn't be too hard to adapt it to use a buffer (stream object perhaps?) rather than a local file. There are a lot of classes you can use to achieve the downloading, look in the System.Web and System.Net namespaces.
Re: ID3v1 tag reader for MP3 files
Re: ID3v1 tag reader for MP3 files
Quote:
Originally Posted by penagate
What you could download is download the mp3 file in bits, looking for an ID3 header section in those bits, and if you get a complete ID3 header, stop the download and feed what you have into the tag reader class. Shouldn't be too hard to adapt it to use a buffer (stream object perhaps?) rather than a local file. There are a lot of classes you can use to achieve the downloading, look in the System.Web and System.Net namespaces.
Thank u for u reply. Could u show me how i can download mp3 by bits and look for its id3 header? I never dealt with bits:-(