pub struct FragmentedOptions {
pub cadence: FragmentCadence,
pub styp: Option<BrandPreset>,
pub emit_random_access_indexes: bool,
}Expand description
Fragmented-MP4 muxer options.
When Mp4MuxerOptions::fragmented is Some(FragmentedOptions { .. }),
the muxer writes the file as
ftyp
moov (mvex+trex; no media samples in moov)
sidx? (one per fragment, references the next moof+mdat)
styp? + moof + mdat (per fragment, repeated)
sidx? + styp? + moof + mdat
...
mfra? (at end: per-track tfra + mfro size trailer)matching ISO/IEC 14496-12 §8.8 (Movie Fragments) + §8.16 (sidx) + §8.8.10
(mfra) + DASH-IF Interop guidelines for styp brands.
Fields§
§cadence: FragmentCadenceWhen to flush a fragment; see FragmentCadence.
styp: Option<BrandPreset>Emit a styp SegmentTypeBox before each moof+mdat pair (CMAF
segment marker). When None, no styp is written and the file is
a plain fragmented ISOBMFF (still valid for any DASH parser, but
not a CMAF-conformant addressable segment).
DASH-IF Interop §6.2 recommends styp(major=msdh, compat=msdh msix)
for an indexed media segment, or cmfs / cmff for CMAF brand
signalling. The default Some(BrandPreset::Custom { major: msdh, compatible: [msdh, msix] }) is the broadly-interop choice.
emit_random_access_indexes: boolEmit sidx (SegmentIndexBox §8.16.3) before each moof+mdat and
an mfra (MovieFragmentRandomAccessBox §8.8.10) trailer with
per-track tfra random-access tables + the size-of-mfra mfro
at end of file. Required for the DASH on-demand profile (single
file with embedded byte-range index) and for fast random-access
without scanning every moof. Default true.
The emitted sidx is a single-entry index covering the immediately-
following moof+mdat (the simplest legal form per §8.16.3); a
multi-segment top-level sidx can be layered on by an outer
segmenter if needed.
Trait Implementations§
Source§impl Clone for FragmentedOptions
impl Clone for FragmentedOptions
Source§fn clone(&self) -> FragmentedOptions
fn clone(&self) -> FragmentedOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more