Read-only extraction of a track's codec + media metadata into %ISOMedia.TrackInfo{}.
Slices the opaque stsd sample entry and mdhd tail directly (avc1 + mp4a); the core
parser/Registry are untouched, so the byte-for-byte round-trip invariant is preserved.
Summary
Functions
Build an avc1.PPCCLL codec string from an avcC payload.
Decode an MPEG-4 expandable length (each byte's high bit is a continuation flag; the low
7 bits accumulate). Returns {length, remaining_binary}.
Decode a packed 16-bit mdhd language field (1 pad bit + 3×5-bit, each char - 0x60)
into an ISO-639-2/T 3-letter code. Falls back to "und" if any character is not a-z.
Return the payload of the first child box of type within a byte slice of boxes.
Decode a trak's codec + media metadata into a %ISOMedia.TrackInfo{}.
Build an mp4a.<oti>.<aot> codec string from an esds payload (AAC-LC fallback).
Sample rate (Hz) from an esds AudioSpecificConfig, or fallback if unavailable.
Functions
Build an avc1.PPCCLL codec string from an avcC payload.
@spec decode_expandable_length(binary(), non_neg_integer()) :: {non_neg_integer(), binary()}
Decode an MPEG-4 expandable length (each byte's high bit is a continuation flag; the low
7 bits accumulate). Returns {length, remaining_binary}.
@spec decode_language(<<_::16>>) :: String.t()
Decode a packed 16-bit mdhd language field (1 pad bit + 3×5-bit, each char - 0x60)
into an ISO-639-2/T 3-letter code. Falls back to "und" if any character is not a-z.
Return the payload of the first child box of type within a byte slice of boxes.
@spec info(ISOMedia.Box.t()) :: ISOMedia.TrackInfo.t()
Decode a trak's codec + media metadata into a %ISOMedia.TrackInfo{}.
Build an mp4a.<oti>.<aot> codec string from an esds payload (AAC-LC fallback).
@spec mp4a_sample_rate(binary(), pos_integer() | nil) :: pos_integer() | nil
Sample rate (Hz) from an esds AudioSpecificConfig, or fallback if unavailable.