English 中文(简体)
C# ID3 library that supports custom fields
原标题:

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

问题回答

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:	empI 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

Have you tried to do it with csid3lib ?

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

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





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签