ISOMedia.Extract (ISOMedia v0.1.0)

Copy Markdown View Source

Track discovery and single-track extraction.

track_ids/1 and find_trak/2 locate tracks by their tkhd track_id; extract_track/2 (added later) produces a new single-track tree.

Summary

Functions

Return a new box tree containing only the track track_id, with mdat rebuilt as a segment list of that track's chunks and stco/co64 recomputed. Memory-safe: with a lazy source the segments are FileSlices streamed on write/2.

Find the trak box whose tkhd track_id matches, or nil.

List every track's track_id, in document order.

Functions

extract_track(boxes, track_id)

Return a new box tree containing only the track track_id, with mdat rebuilt as a segment list of that track's chunks and stco/co64 recomputed. Memory-safe: with a lazy source the segments are FileSlices streamed on write/2.

find_trak(boxes, track_id)

Find the trak box whose tkhd track_id matches, or nil.

track_ids(boxes)

List every track's track_id, in document order.