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

4

38

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?

Ribbentrop answered 17/11, 2009 at 17:30 Comment(1)
As to refresh the topic, you may use ID3.NET for .NET Core: github.com/jcoutch/id3-DotNetCoreInhibition
C
42

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();
Carman answered 2/12, 2009 at 2:51 Comment(5)
+1 - I use this for my music apps. I've not had any real issues with the library at all.Icecold
I've had two issues with it: bugzilla.gnome.org/show_bug.cgi?id=605765 bugzilla.gnome.org/show_bug.cgi?id=605780 but I'm happy with it anyway.Ribbentrop
i also use this library in one of my projects, never had any issues.Oppenheimer
dead links - can someone update?Fasciculus
I maybe a little bit noob; but: I've got to disagree on: "is the best". TagLib# does not include any documentation nor method comments to use it. Wich in my opinion goes against "is the best". How come a user is supposed to use the API with no help? i.e: Been trying to get Album art as Image or BitmapImage to pictureBox unsuccessfully. Even copying the code from someone wont work; as tagLib is quite difficult to understand the usage. Perhaps its just me. Also: there is no way to find info on doing it your self programmatically in order to avoid using sad wrapped classes like tagLib.Fourflusher
O
5

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.

Obsolesce answered 17/11, 2009 at 18:32 Comment(0)
S
0

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.

Scintillate answered 17/11, 2009 at 17:52 Comment(0)
P
-1

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

Pankey answered 17/11, 2009 at 18:19 Comment(1)
Or the project is dead...Article

© 2022 - 2024 — McMap. All rights reserved.