package metadata

  1. Overview
  2. Docs
Read metadata from various file formats

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.3.2.tar.gz
md5=c336d1b0771e774d909943ea3684e62b
sha512=74a950354d3bcec0fd70c5fcdcf195c20890583de25be7e85a8e202d4a81398bf4b6d2f646605df1aa64eca8b30c26205316f677fb1dc9020bb3546fea8b41eb

Description

A pure OCaml library for reading files from various formats.

Published: 05 Jan 2026

README

The metadata library

A pure OCaml library to read metadata from various formats. For now, are supported:

  • audio formats: ID3v1 and ID3v2 (for mp3), ogg/vorbis, ogg/opus, flac and wav
  • image formats: jpeg and png
  • video formats: mp4 and avi
  • text formats: pdf

Usage

Basic usage is

let () =
  let metadata = Metadata.parse_file "test.mp3" in
  List.iter (fun (k,v) -> Printf.printf "- %s: %s\n" k v) metadata

In the above example, the function Metadata.parse_file takes a file name as argument and returns an association list describing its metadata. It consists of pairs of strings being the name of the metadata and its value.

Installing

The preferred way is via opam:

opam install metadata

Other libraries

Dependencies (2)

  1. ocaml >= "4.14.0"
  2. dune >= "3.6"

Dev Dependencies (1)

  1. odoc with-doc

Used by (2)

  1. liquidsoap >= "2.3.3"
  2. liquidsoap-core

Conflicts

None