I'm storing music tracks in a SharePoint Foundation 2010 library. I want users to be able to search for tracks using music file metadata e.g. Track Name. Artist, Album, Lyrics, etc.
This metadata is stored within popular music file types (e.g. mp3, wma, ogg, etc); though the format of the metadata varies. So how can SharePoint index these files and extract the metadata? You have a number of options:
- Install FAST Search Server 2010 and the "Advanced Filter Pack", which can index certain music file types.
- Install a 3rd party IFilter, which knows how to index your music files. You'll probably need one IFilter for each specific media file type.
- Develop your own music file IFilter. This should be written in C++ and it's not an easy exercise - believe me; I've tried.
- Expose the music file metadata through the standard SharePoint user interface.
I went for option (4), but it does require some development knowledge, and the use of a 3rd party .Net library called "taglib-sharp". In essence you create a SharePoint Event Receiver that fires whenever a music file is added to a library. The Receiver then uses "taglib-sharp" to extract metadata from the file and copy it to custom SharePoint metadata.
The picture below shows the custom SharePoint metadata, extracted from an .mp3 file:
The SharePoint indexer can now index the custom metadata, which you can then use in custom searches.
Two great things about taglib-sharp:
- It can be called from .Net and is easy to use - you just point it directly at a file in the SharePoint library.
- It supports the following music file formats: wma, aiff, asf, mp3, m4a, mpeg, ogg, riff, aac, ape, flac, Musepack and WavPack.