Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 867
pupeno Avatar asked Nov 17 '09 17:11

pupeno


People also ask

How do I read an ID3 tag in an MP3 file?

If you want to view and edit ID3 audio or MP3 tags in VLC Media Player, then it has been really made simple. The quickest way to view/edit it is by using the CTRL + I shortcut key on your PC or by navigating to Tools > Media Information.

How do I convert ID3 tags?

To change ID3 tags, right click in iTunes on the song that you need to change and select "Convert ID3 Tags".

What is MP3 ID3 tag?

An ID3 tag is a type of metadata container used to store information into a media file (traditionally an MP3 audio file). The ID3 tags could include a title, an album title, the artist (author), genre, cover art, the year recorded and other details that are useful for the listener of your show.


1 Answers

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(); 
like image 67
Zac Bowling Avatar answered Sep 18 '22 16:09

Zac Bowling