How to read and write ID3 tags to an MP3 in C#? [closed]

落爺英雄遲暮 提交于 2019-12-17 06:31:10

问题


Is there a library for reading and writing ID3 tags to an MP3 in C#?

I've actually seen a couple when searching, anybody using any that can be recommended?


回答1:


Taglib# is the best. It's direct port of the TagLib C library to C#.

To install TagLib#, run the following command in the Package Manager Console in Visual Studio.

PM> Install-Package taglib

The NuGet distribution of taglib-sharp can be found at http://nuget.org/packages/taglib.
The official source code repository is at https://github.com/mono/taglib-sharp.

Here's an example using the library:

TagLib.File file = TagLib.File.Create("mysong.mp3");
String title = file.Tag.Title;
String album = file.Tag.Album;
String length = file.Properties.Duration.ToString();



回答2:


I've personally used ID3.Net from here:

http://id3dotnet.sourceforge.net/

As well as UltraID3Lib from here:

http://home.fuse.net/honnert/hundred/

Both did the job well and were easy to use from an API standpoint.




回答3:


Here's a sourceforge project that's been written to do this and seems to have some good reviews:

http://csid3lib.sourceforge.net/

I've only ever read ID3 tags, never written them, so I can't comment specifically on that. However, I believe this project (in a much earlier stage) was what I used to do it.




回答4:


Also: http://id3tag.codeplex.com/



来源:https://stackoverflow.com/questions/1750464/how-to-read-and-write-id3-tags-to-an-mp3-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!