ffmeta
Media metadata files read, written and converted through one model: FFmpeg's ffmetadata, Vorbis comments, and cue sheets.
It is pure -- text in, text out: no ffmpeg, no file opened. A file read becomes one model -- its tags, its streams' tags, its chapters, a cue sheet's disc; written in another format, what that format cannot hold is told as a note, never dropped in silence.
| Format | What it is |
|---|---|
| ffmetadata | FFmpeg's ;FFMETADATA1 text: global and stream tags, chapters |
| Vorbis comment | NAME=value lines, as vorbiscomment and metaflac read and write |
| Cue sheet | the CDRWIN format: an album's tracks, their times and fields |
What crosses between them, field by field and with its reasons, is ffsuite's mappings skill.
Installing
pip install ffmeta
Python 3.13 or later; the standard library alone.
Using it
>>> import ffmeta
>>> text = ";FFMETADATA1\ntitle=Album\n\n[CHAPTER]\nTIMEBASE=1/1000\nSTART=0\nEND=60000\ntitle=One\n"
>>> meta = ffmeta.read(text, "ffmetadata", "album.ffmeta")
>>> converted = ffmeta.convert(meta, "ffmetadata", "vorbis")
>>> written = ffmeta.write(converted.meta, "vorbis")
>>> print(written.text, end="")
title=Album
CHAPTER000=00:00:00.000
CHAPTER000NAME=One
>>> converted.notes + written.notes
('chapter ends: Vorbis comments hold none (a chapter ends where the next begins): left out',)
>>> ffmeta.read("title=x\n", "ffmetadata", "bad.ffmeta")
Traceback (most recent call last):
...
ffmeta.Error: bad.ffmeta:1: not ffmetadata: the first line must begin ;FFMETADATA: title=x
What crosses into the target is converted; what does not is a note, from
convert (a field the target lacks) or write (a structure it lacks). A text
that cannot be read is refused: ffmeta.Error, its message the reason.
Licence
Part of ffsuite, beside ffman: its own package. Licensed under either of MIT or Apache-2.0, at your option.
Metadata
Release files for ffmeta 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ffmeta-0.1.0.tar.gz | 70.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ffmeta-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.6 kB
Release files / ffmeta-0.1.0.tar.gz
| Download URL | ffmeta-0.1.0.tar.gz |
|---|---|
| Size | 70.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f15c83175b3005f7c7dacaa6525b77eb9d3e05a07febb446c9ba7c62c775ae66
|
|
BLAKE2b-256 checksum How to use checksums |
e64d615da5eaaf63d65fbf0ce77ecf94c4233aeb09fd16285740be61bdea5dab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ffmeta-0.1.0-py3-none-any.whl
| Download URL | ffmeta-0.1.0-py3-none-any.whl |
|---|---|
| Size | 45.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca6e5c8c7f7e2127ed5a0b1d5760fa807dc2a39d2f874c40401de8f95979e30e
|
|
BLAKE2b-256 checksum How to use checksums |
a743e8e5c4506c036d7946a4e6493c3cecf2a1f5a3ea0bb7f71bf4f39f73b97e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|