This project is read-only.

I am working on a more universal solution to tag audio files in managed code: Luminescence.Audio. The library supports the following audio formats: MP3, FLAC, Ogg Vorbis, WMA and AAC/ALAC (.m4a). You can get the code on GitHub.

Project Description

Luminescence.Xiph is a full managed assembly developped in C# for reading and writing Vorbis Comment tags (including picture), contained in Ogg and native FLAC.


Metatogger screenshot

For my freeware project, Metatogger, I needed a managed library to read and write tags contained in Ogg and FLAC streams. As I couldn't find any, I decided to write one myself.

The codecs supported by this library include Vorbis, FLAC and Speex. Technical informations about Ogg and FLAC files can also be gotten using this library.

Text tags will be stored in a Dictionary<string, List<string>> because you can have several identical tags such as "artist," etc. Picture tags will be stored in a collection of ID3PictureFrame with a BitmapFrame property (Windows Imaging Component).

It's possible to read any raw data in an Ogg stream with the OggPageReader class.

Using the Code

The use of OggTagger and FlacTagger is very easy. The source code is fully documented (in French).

using Luminescence.Xiph;
var ogg = new OggTagger(@"C:\Song.ogg");

// Load duration
DateTime time = new DateTime(0);
time = time.AddSeconds(ogg.Duration);

// Tags manipulation
string artist = ogg.Artist;
ogg.Title = "My Immortal";
ogg.AddTag("LYRICS", "I am singing in the rain...");
ogg.SetTag("LYRICS", "I am not singing in the rain...");
Dictionary<string, List<string>> tags = ogg.GetAllTags();
BitmapFrame cover = ogg.FlacArts.FirstOrDefault(p => p.PictureType == ID3PictureType.FrontCover);


Here is the diagram for main classes:

Classes diagram


You can download a tutorial (in french) here: tutoriel-luminescence-xiph.pdf
You can prefer to read it online at

Last edited Feb 27, 2016 at 5:40 PM by Cyber_Sinh, version 9