Skip to main content
Media streams are organized into a hierarchy of tracks, groups, and frames.
  • Track: A continuous media stream, such as video or audio, within a broadcast path.
  • Group: A self-contained segment of a track, often corresponding to a time-based unit like a video GOP or an audio packet group.
  • Frame: The smallest unit of media data, such as a single video image or audio sample.

Track

Each track has a name that distinguishes it within the broadcast path, often corresponding to a specific media layer (e.g., SVC).

moqt.TrackWriter

The moqt.TrackWriter handles all aspects of writing data to a track, including managing the lifecycle of the track, opening and closing groups, transmitting media data, and dealing with errors.

moqt.TrackReader

The moqt.TrackReader is responsible for reading data from a track, receiving groups and frames in order, and managing any errors that occur during the process.

Group

Groups are processed and transmitted independently, and may contain frames that are either standalone or interdependent (for example, I/P/B frames in video).

moqt.GroupWriter

The GroupWriter writes frames, can set deadlines, cancel or close groups, and exposes the group’s sequence.

moqt.GroupReader

The GroupReader reads frames sequentially, can cancel reads, and provides group sequencing and deadline control.

Frame

Frames can be independent (like keyframes) or rely on other frames (like delta frames in video), and together they form the building blocks of a track.

moqt.Frame

The Frame struct represents the smallest unit of media data. It ensures that data is stored immutably.