Home

Awesome

audiometa

An audio metadata/tag reading library written in Zig. Currently supports ID3v2, ID3v1, FLAC, APE, Ogg Vorbis, and MP4/M4A (iTunes Metadata Format).

still heavily work-in-progress, everything is subject to change

The general idea is to:

  1. Parse all metadata verbatim, with no de-duplication, and as little interpretation as possible. (this part is mostly working/complete)
  2. Run the metadata through a 'collator' that does some (potentially subjective) interpretation of the metadata, and then provides only the 'best' set of metadata (doing things like de-duplication, prioritization between different types of metadata, conversion from inferred character encodings, etc). (this part is unfinished)

In terms of code, usage will probably look something like:

var stream_source = std.io.StreamSource{ .file = file };

// Step 1: Parse the metadata
var metadata = try audiometa.metadata.readAll(allocator, &stream_source);
defer metadata.deinit();

// Step 2: Collate the metadata
var collator = audiometa.collate.Collator.init(allocator, &metadata);
defer collator.deinit();

// Get the parts of the collated data you care about and do what you want with it
const artists = try collator.artists();

Limitations

Comparisons to other libraries

audiometa:

ffmpeg/ffprobe/libavformat

TagLib