Chapter tracks (v0.4.2) #6
Reference in New Issue
Block a user
Delete Branch "feature/chapter-track"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Day 4 follow-up (v0.4.2): QuickTime chapter tracks.
LibriVox M4B (and iTunes, most M4B tools) keep chapters in a chapter track (a text track that the audio track names in
tref/chap), not a Nerochpl. On the real LibriVox Metamorphosis the parser found the 2.5 h duration but no chapters.stts/stsz/stsc/stco/co64);trakboxes are bounded (64).chapter_trackdecodes only the referenced text track: start times fromstts, sample offsets fromstsc+ chunk offsets +stsz, every count capped at 10,000 chapters and checked against its box.Info.chapter_samplestells the caller where they are andtitles_from_samplesreads them (each at most 1 KiB) — the app reads them from the file without loading the media data.Test (
tests/hostile.rs): a generated M4B with a chapter track (three titles, starts), the metadata-only path, a lying sample count refused. Workspace 110 tests green; clippy 0; deps --check clean.