27

I have been searching for ID3 editors for my music manager project. It seems that taglib sharp is the popular choice. I googled a lot and could not find any examples of using it.

Can some one point me to some examples showing the library usage ?

pphanireddy
  • 1,109
  • 2
  • 12
  • 17

1 Answers1

41

Well without knowing exactly what you want to do all I can offer is my code.

You create a TagLib File object from the actual mp3 file. This reads the file and extracts the tag data:

TagLib.File tagFile = TagLib.File.Create(track); // track is the name of the mp3

Then to get a tag value:

uint year = tagFile.Tag.Year;

You set the tags like this:

tagFile.Tag.Year = year;

and then save the changes:

tagFile.Save();
ChrisF
  • 134,786
  • 31
  • 255
  • 325
  • Thanks of @ChrisF if u need to knowledge for editing image cover , u can go to this topic = > http://stackoverflow.com/a/30285220/1395101 – Amin Ghaderi Dec 16 '15 at 21:16