View Source ExMP4.Box.Movie (MP4 Reader and Writer v0.4.0)

A module providing a function assembling an MPEG-4 movie box.

The movie box (moov) is a top-level box that contains information about a presentation as a whole. It consists of:

  • exactly one movie header (mvhd atom)

    The movie header contains media-independent data, such as the number of tracks, volume, duration or timescale (presentation-wide).

  • one or more track box (trak atom)

  • zero or one movie extends box (mvex atom)

Summary

Functions

Assembles a list of tracks into a moov box.

Deserializes and unpacks a moov box data.

Types

@type movie_header() :: %{
  duration: integer(),
  timescale: integer(),
  creation_time: DateTime.t(),
  modification_time: DateTime.t(),
  fragmented?: boolean()
}

Functions

Link to this function

assemble(tracks, header_opts, extensions \\ [])

View Source

Assembles a list of tracks into a moov box.

@spec unpack(ExMP4.Container.t()) :: {movie_header(), [ExMP4.Track.t()]}

Deserializes and unpacks a moov box data.

The return type is a tuple with the first element as the movie header and the second element as a list of tracks.