Files
taglib/tests
Ryan Francesconi 4a73d73b20 MP4: Add QuickTime-style chapter track support
QuickTime-style chapter tracks are the native chapter format for
Apple's ecosystem. They use a disabled text track (hdlr type "text")
referenced by a chap track-reference in the audio track's tref box.
This format is recognized by QuickTime, iTunes/Music, Final Cut Pro,
Logic Pro, DaVinci Resolve, VLC, and most other MP4/M4A players. It
is also the format that AVFoundation reads natively via
AVAssetChapterMetadataGroup.

The implementation produces output that matches ffmpeg's chapter track
structure byte-for-byte: per-sample stts entries (required by
AVFoundation), encd atoms for UTF-8 text encoding, edts/elst edit
lists, gmhd with gmin+text media information, and disabled tkhd flags
(track_in_movie only).

Key behaviors:
- write() inserts tref + chapter trak as a single contiguous block,
  then appends text samples in an mdat atom at EOF
- Handles non-zero first chapter times by prepending a dummy chapter
  at time 0 (stripped on read)
- Overwrite support: removes existing chapter track before writing
- Preserves existing metadata tags and audio data integrity
- Uses timescale=1000 (milliseconds) for chapter track timing

7 new tests covering write/read round-trip, remove, overwrite, tag
preservation, empty file read, timestamp precision, and non-zero
first chapter handling.
2026-04-23 11:03:23 -07:00
..
2024-01-21 20:46:27 +01:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2024-01-21 20:46:27 +01:00
2023-12-07 05:00:00 +01:00
2023-09-16 08:22:36 +02:00
2023-12-18 17:29:39 +01:00
2026-03-31 11:14:44 -05:00
2023-12-07 05:00:00 +01:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2023-12-07 05:00:00 +01:00