# Audiobind: development [← Back to the README](../README.md) ## Development ```bash python -m unittest discover -s tests -v docker build -t audiobind:dev . ``` ## Notes on correctness * **`+use_metadata_tags` must never be added to the ffmpeg command.** It makes the MP4 muxer drop the attached cover art while still exiting 0. `encode.py` verifies the output has a stream with `attached_pic=1` before publishing, precisely because of this. * **Audnex chapters are camelCase** (`lengthMs`, `startOffsetMs`). Reading `length_ms` yields zero for every chapter and silently falls back to per-file chapters. * **Chapter timings are only trusted when they fit.** Audnex timings are scaled onto the real duration only if `local / catalog` is within 0.85-1.20; otherwise per-file chapters are used, because the catalog entry is for a different edition. * **Audiobookshelf rewrites `metadata.json`** when it scans the new book. Losing our extra `duration` key is the app adopting the book, not a failed write.