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)
Problem
stages/metadata.pywrites tags viaffmpeg -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/showrather than the intendedsort_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:ASINetc.) 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)