Skip to content

metadata.py: ffmpeg silently drops freeform atoms (ASIN, MOVEMENT, sort_album, publisher) #14

Description

@rodaddy

Problem

stages/metadata.py writes tags via ffmpeg -metadata KEY=value -f ipod. ffmpeg's mp4/ipod muxer only writes keys in its recognized mapping table and silently drops non-standard/iTunes-namespaced keys. Confirmed absent from written files: ASIN, sort_album, MOVEMENT, MOVEMENTNAME, SHOWMOVEMENT, pgap, publisher.

Impact

The Audnexus Plex agent matches primarily on ASIN, which never gets embedded. Plex still matches by title/author/series (which are written), but ASIN-exact matching can't fire, and series sort relies on grouping/show rather than the intended sort_album/MOVEMENT.

Metadata is resolved correctly — ffmpeg just can't write these atom types.

Fix

Post-pass with a tool that writes freeform atoms — mutagen (already proven working: ----:com.apple.iTunes:ASIN etc.) or AtomicParsley — after the ffmpeg tag write. A one-off mutagen script already fixed the Noobtown library files in-place; the pipeline writer itself is unpatched.

Context

Found while processing the Noobtown series. Worked around manually for those 8 files; every future conversion still drops the atoms until the writer is fixed.

File: src/audiobook_pipeline/stages/metadata.py (lines ~306-310, _write_tags)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions