package metadata

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

Install

Dune Dependency

Authors

Maintainers

Sources

v0.3.1.tar.gz
md5=5a0597eb24363728fb11983fdad2f338
sha512=7aa6a01579c38634eef9583dd192ddec3c621b2f1f19f9da1eee5e3dddaf5de925bf8177158f2734dd27b69be3309bd6a8d6b7888e5c698a843f7fe8bc0185c8

doc/README.html

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

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

OCaml

Innovation. Community. Security.