Mux-side H.264 / H.265 NAL handling: take the encoder’s Annex-B output
(start-code-delimited NAL units), strip the out-of-band parameter sets
(SPS/PPS, plus HEVC VPS) for the avcC/hvcC config box, and repackage the
remaining NALs (slices, SEI) as length-prefixed (4-byte) samples for the
MP4 mdat. This is the inverse of the demux path in
annexb, which reads length-prefixed → Annex-B.
Extended MKV colour/mastering metadata parsed from Segment → Tracks → TrackEntry → Video → Colour and its nested MasteringMetadata. The
core H.273-equivalent fields (matrix / primaries / transfer /
full-range) round-trip through StreamInfo.color_metadata on
DemuxResult; this struct exists to carry the rest (bits_per_channel,
chroma siting / subsampling offsets, MaxCLL/MaxFALL, SMPTE-2086
mastering chromaticities) without requiring a breaking extension of
the shared StreamInfo type in the codec crate.
SMPTE ST 2086 mastering display metadata, carried verbatim from the
MKV MasteringMetadata sub-element. Used by HDR10 mux and by future
SEI-passthrough paths to preserve the creator-intended display gamut
and min/max luminance.