TagLib# is a .NET library capabible of reading and writing both the basic and advanced tagging information stored in popular audio formats. The majority of the code and the underlying framework is a port of the TagLib tagging library from C++ to .NET and Mono.
The project was inspired by the needs of Muine, a music player for Linux. Muine reads complex tag information such as artists (plural), performers, and album art. Given the state of audio tagging with Mono, the developers were limited to three options: 1) use Entagged# at the cost of many of these features, 2) use TagLib by developing both a complex C wrapper and a glue class for that wrapper, or 3) use a bunch of modified C libraries. The third was chosen as the best, but really none of the choices are really ideal. TagLib# exists so developers can have a simple "just works" solution to all their tagging needs.
|
[edit] Recent News[edit] taglib-sharp-1.9.75474Just added this to the website. Please note that we've gone from 1.1 to 1.9. For those of you unfamiliar with Linux version naming, odd minor versions (the .1 and the .9) indicate unstable/development releases, and a .9 or a .999 (something like that) indicates an impending major version change. As such, I am jumping from 1.1 to 1.9 because:
[edit] Also, I've got a few questions for you guys.1. TagLib# has gone through enormous changes since it was originally ported from TagLib (C++/Linux), it deals with a different audience, it handles different files, and the name similarity has caused some confusion for new users. I am thinking of renaming the project, maybe dropping the “-sharp” moniker, perhaps commenting on the impending Video support. In short, What should I call it? 2. It seems like the Windows developer community and newer developers (I’m not dogging on the Windows community, but the two groups are similar in this respect) are more comfortable with forums and online documentation than mailing lists and monodoc. As such, TagLib# needs its own website, preferably new-project-name.com, that said, two things: What all should go on a library’s website? Examples, Forum, Documentation, etc. Is anyone willing to host a website and buy me a domain? I’m broke! Post your comments on my blog! --Kerrick 18:05, 9 April 2007 (MDT) [edit] Another third of your brain is now taggableI just dropped an API incompatibility bombshell. I deleted TagLib.AudioProperties and replaced it with TagLib.Properties. The difference? Simple: TagLib.Properties.VideoWidth and TagLib.Properties.VideoHeight. Okay, it's not that much and I've really only implemented it in ASF and OGG file formats (OGG was freakin' hard, man) so far, but the groundwork is there. In fact, so much has had to change that I'm thinking of calling the next stable release 2.0. How will this affect your audio-only program that uses TagLib# to screen out bad files? Well, you'll get a lot of video files. But have no fear: if (file.Properties.MediaTypes == TagLib.MediaTypes.Audio) // Do something with audio files. This will screen out all files that are not 100% audio files. Anyway, the changes are in Subversion. Tarball and Windows DLL coming soon. Any testers for the new Ogg backend would be appreciated. You can even add support for your favorite OGG Codec! Check out src/TagLib/Ogg/Codec.cs and src/TagLib/Ogg/Codecs/*.cs for examples. --Kerrick 04:06, 6 April 2007 (MDT)
|
|
[edit] Project Resources[edit] Developer Notes
[edit] File Releases
[edit] Browse the Subversion TreeBrowsing the Subversion tree gives you a great view into the current status of this project's code. You may also view the complete histories of any file in the repository.
Note: TagLib# is not hosted on the Novell-Forge Subversion. [edit] Report a BugIf something isn't working, something important is missing, or you really want feature x? You can submit them to the TagLib# bugzilla. Project Members
ActivityTotal File Downloads: 2,889
|
Below are some simple examples for getting started. More complex examples, including file type resolvers and file abstractions are available here: TagLib Sharp: Examples
The most basic features of any tagging system are easy to access with TagLib#, as all you have to do is:
try
{
TagLib.File file = TagLib.File.Create ("/path/to/music/file.mp3");
System.Console.WriteLine ("Title: " + file.Tag.Title);
System.Console.WriteLine ("Album: " + file.Tag.Album);
// Some entries support multiple strings.
foreach (string artist in file.Tag.AlbumArtists)
System.Console.WriteLine ("Artist: " + artist);
}
catch {...}
More advanced features can be accessed by using TagLib.File.GetTag (TagLib.TagTypes) object and using it's special features:
try
{
TagLib.File file = TagLib.File.Create ("/path/to/music/file.mp3");
TagLib.Id3v2.Tag tag = file.GetTag (TagLib.TagTypes.Id3v2);
// The file contains an ID3v2 tag.
if (tag != null)
foreach (TagLib.Id3v2.AttachedPictureFrame frame in tag.GetFrames ("APIC"))
SomeImageProcess (frame.Picture.Data);
}
catch {...}
Categories: Projects | Metadata | APIs
© 2008 Novell, Inc. All Rights Reserved.