10

Currently i'm using TagLib Sharp as suggested in one of the posts @stackoverflow for reading id3-Tag out of mp3, flac, ogg and similar multimedia files .. now i just realized, that id3v2 (maybe even v1) supports custom tags but i can't find the implementation for reading/writing custom tags in TagLib Sharp. Does anybody know of a library that supports custom fields?

Christian

--- Update 20100422 ---

Still searching.. found this page:

http://id3.org/Implementations

Christian Casutt
  • 2,334
  • 4
  • 29
  • 38

3 Answers3

3

You can try to add a new frame (instead of entire new custom tag). As example, if you want to add a new "Acoustid Duration" TXXX-Frame to an existing *.mp3 file, you can use the taglib-sharp library and something like

Dim MyTaglibMP3 As TagLib.File = TagLib.File.Create("C:\temp\I'm Alive.mp3")
Dim id3v2tag As TagLib.Id3v2.Tag = CType(MyTaglibMP3.GetTag(TagLib.TagTypes.Id3v2), TagLib.Id3v2.Tag)
Dim AcoustidDurationTXXXFrame As New TagLib.Id3v2.UserTextInformationFrame("Acoustid Duration", TagLib.StringType.UTF16)
AcoustidDurationTXXXFrame.Text = {"207"}
id3v2tag.AddFrame(AcoustidDurationTXXXFrame)
...
MyTaglibMP3.Save()
MyTaglibMP3.Dispose()

Of course, this works with every other already defined id3v2 type like "CommentsFrame", "PrivateFrame", "TextInformationFrame" and even "UnsynchronisedLyricsFrame".

If you don't want that the id3v2tag will be encoded with UTF-16, choose another TagLib.StringType

PeterCo
  • 910
  • 2
  • 20
  • 36
1

Have you tried to do it with csid3lib ?

http://sourceforge.net/projects/csid3lib/

m1k4
  • 829
  • 2
  • 12
  • 26
1

This article on codeproject has a library that supports any type of tags (including custom tags). I have used it a long time ago but I remember it supports custom tags. But I think TagLib is more robust.

http://www.codeproject.com/KB/cs/Do_Anything_With_ID3.aspx

Alireza Noori
  • 14,961
  • 30
  • 95
  • 179