Member Junction
    Preparing search index...

    Function Fmp4VideoSeconds

    • The seconds of video a piece of the stream carries: the durations of its samples on the init's video track, in that track's timescale (mdhd), summed over every moof box in the piece. A sample's duration comes from its trun record, else the fragment's tfhd default, else the init's trex default. Another track's fragments add nothing, so an audio-only fragment of a muxed stream reads as 0, and so does a piece without a moof box (an init segment).

      null when the init declares no video track with a timescale, or the piece cannot be read: a box whose size runs past what holds it, a fragment without a readable tfhd, or video samples that no box gives a duration.

      Parameters

      • bytes: ArrayBuffer | ArrayBufferView<ArrayBufferLike>

        A piece of the stream, as an ArrayBuffer or a view of one.

      • init: Fmp4Init

        What the stream's init segment declares (ReadFmp4Init).

      Returns number