package metadata

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

Install

Dune Dependency

Authors

Maintainers

Sources

v0.3.0.tar.gz
md5=368839ac027c397ce57cf3e4922888a7
sha512=3e94f136f910d3484e688dd0afb3510a5b5d9618b2d991635416a69316e19653022ea21a236705be965a2980d1dc07370a115fd942b64e9d307103dbe02172ce

Description

A pure OCaml library for reading files from various formats.

Published: 27 Mar 2024

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

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 (1)

  1. liquidsoap-core

Conflicts

None

OCaml

Innovation. Community. Security.