View Source ExMP4.Box.Stbl (MP4 Reader and Writer v0.6.0)

A module representing an stbl box.

The sample table contains all the time and data indexing of the media samples in a track. Using the tables here, it is possible to locate samples in time, determine their type (e.g. I‐frame or not), and determine their size, container, and offset into that container.

Summary

Functions

Get the next sample from the sample table.

Types

@type t() :: %ExMP4.Box.Stbl{
  co64: ExMP4.Box.Co64.t() | nil,
  ctts: ExMP4.Box.Ctts.t() | nil,
  stco: ExMP4.Box.Stco.t() | nil,
  stsc: ExMP4.Box.Stsc.t(),
  stsd: ExMP4.Box.Stsd.t(),
  stss: ExMP4.Box.Stss.t() | nil,
  stsz: ExMP4.Box.Stsz.t() | nil,
  stts: ExMP4.Box.Stts.t(),
  stz2: ExMP4.Box.Stz2.t() | nil
}

Functions

Link to this function

next_sample(stbl, sample_index, total_duration)

View Source
@spec next_sample(t(), integer(), integer()) :: {t(), ExMP4.SampleMetadata.t()}

Get the next sample from the sample table.

The sample_index is the index of the next sample to retrieve (must start from 1).

The total_duration is the total duration of all the retrieved samples.

The return type is a tuple with the first element being the sample table after removing the extracted sample and the second element is the extracted sample.