Reading ID3 tags of a remote mp3 file?

Read MP3 tags with Silverlight , started me by reading id3 tags, but I understand that taglib # on the Internet deals with local file paths?

Is there any way to read this information from a remote file?

+3
source share
2 answers

I recently answered the same question for Ruby (see below). I am sure you can do something like this.

The idea is this:

  • Use HTTP 1.1 or higher and HTTP range request.

  • load the initial section (100 bytes) of the ID3v2 tag

  • from the first bytes loaded, you can determine the correct length of the full ID3v2 tag, for example. N

  • upload the first N bytes of the file (e.g. full ID3v2 tag)

  • analyze the ID3v2 tag for your goals

Cm:

Read ID3 tags of remote MP3 file in Ruby / Rails?

+1
source

Tim Heyer has a good blog post about this. http://timheuer.com/blog/archive/2010/01/30/reading-mp3-id3-tags-with-silverlight-taglib.aspx

Like you, it also ran into TabLib # only using local paths.

One thing the TagLib # tag did not possess was the implementation of the stream. Most libraries, in fact, assumed a local file path. Fortunately, the library was written using the common File interface, so I just had to create my own StreamFileAbstraction. I decided to do this in my project, and not in the base library. This was easy, as LocalFileAbstraction actually migrated Open to a file as a first task and set some public variables. My abstraction basically just passes the stream already and is ready to go.

There is an example on the short story site that uses file abstraction. http://developer.novell.com/wiki/index.php/TagLib_Sharp:_Examples

0
source

All Articles