支持自定义字段C#ID3库

支持自定义字段C#ID3库

本文介绍了支持自定义字段C#ID3库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

目前我使用的标签库夏普作为岗位@stackoverflow阅读ID3标签出MP3,FLAC,OGG和类似的多媒体文件的一个建议..现在我才意识到,那ID3V2(甚至V1)支持定制标签,但我无法找到实现读/在标签库夏普写自定义标签。
有谁知道,支持自定义字段的库?

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?

基督教

---更新20100422 ---

--- Update 20100422 ---

仍在寻找..找到了这个网页:

Still searching.. found this page:

推荐答案

您可以尝试添加一个新的帧(而不是整个新的自定义标签)。作为例子,如果你想要一个新的Acoustid持续时间TXXX帧添加到现有* .MP3文件,可以使用的以及类似

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()

当然,这适用于所有其他已定义的ID3V2类型,如CommentsFrame,PrivateFrame,TextInformationFrame,甚至UnsynchronisedLyricsFrame。

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

如果你不不想,该id3v2tag将UTF-16编码,请选择其他TagLib.StringType

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

这篇关于支持自定义字段C#ID3库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 00:46