tcannon91
tcannon91

Reputation: 217

How to read metadata from mp3?

I am trying to read the tags from mp3 files. I was wondering if anyone had any suggestions as to how to do this? I don't want to use a 3rd party library to handle the reading/organizing for me. The purpose of this is just for me to figure out how to read the encoded data? I know that there are primarily 2 different formats, ID3v1 and ID3v2. Really, my issue is just being able to obtain the information in a format that I can handle it. I have a couple ideas for actually storing the data I need and parsing the information once I get it. I mainly just need some guidance for how to collect the metadata in plain text.

Upvotes: 6

Views: 12126

Answers (3)

Avada Kedavra
Avada Kedavra

Reputation: 8691

Ok, I am not discouraging writing your own code (as my comment to the question may suggest). Actually the opposite, Kudos to you for wanting to develop your own library.

That said, Taglib sharp is open source and deals with both Id3v1 and id3v2 (and lots more), it should be a good place to start. I ported some parts of it to silverlight a while back, if I remember correctly it was not an overwhelming amount of code.

Upvotes: 4

DaveCS
DaveCS

Reputation: 950

I would recommend browsing the SVN from C# ID3 Library to get the code you need. http://sourceforge.net/projects/csid3lib/

I've got a few WPF apps on the market that edit mp3 files and the others recommending taglib sharp are correct, you should avoid the hassle and use it.

Upvotes: 1

raymarch
raymarch

Reputation: 158

Use binary reader object. http://msdn.microsoft.com/en-us/library/system.io.binaryreader.aspx

example of common lisp (id3 parser): http://www.gigamonkeys.com/book/practical-an-id3-parser.html

Upvotes: 2

Related Questions