Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

164 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The metadata library

Warning

This repository is read-only. All changes must be made in savonet/liquidsoap under src/modules/synced/metadata/ and will be mirrored here automatically.

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

Releases

Used by

Contributors

Languages