package metadata
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
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) metadataIn 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 metadataOther libraries
- ocaml-taglib: for tags from audio files (mp3, ogg, etc.)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page