Membrane.MPEG.TS.Demuxer (Membrane MPEG.TS Plugin v2.4.2)

Copy Markdown View Source

Demuxes MPEG TS stream.

After transition into playing state, this element will wait for Program Association Table and Program Mapping Table.

For :H264_AVC streams, the demuxer emits %Membrane.H264{alignment: :au, stream_structure: :annexb} and assumes each PES contains exactly one access unit.

Use profile: to select streams that require descriptors and depacketization (e.g. Opus in MPEG-TS). For custom payloads, match stream_type: and registration_descriptor: explicitly.

Element options

Passed via struct Membrane.MPEG.TS.Demuxer.t/0

  • strict?

    boolean()

    Default value: false

  • wait_rai?

    boolean()

    Default value: true
    If true, first packet buffer is going to be a keyframe (in case of video)

  • drop_until_video_rai?

    boolean()

    Default value: false
    If true, drop all non-video buffers until the first video buffer (RAI) arrives

Pads

:input

Accepted formats:

%Membrane.RemoteStream{}
Direction::input
Availability::always
Flow control::auto

:output

Accepted formats:

Membrane.RemoteStream
Membrane.H264
Direction::output
Availability::on_request
Flow control::auto

Pad options:

  • pid

    pos_integer() | nil

    Default value: nil
    The PID of the target stream. If specified, all other selection options are ignored

  • stream_type

    atom() | nil

    Default value: nil
    More generic selector than pid, allows to specify the stream type of the target stream, e.g. AAC_ADTS. The first stream that matches the selector will be returned.

  • profile

    atom() | nil

    Default value: nil
    Well-known stream profile (e.g. :opus_mpeg_ts, :scte35).

  • registration_descriptor

    String.t() | nil

    Default value: nil
    Matches a registration descriptor (tag 0x05) format identifier, e.g. "Opus".

  • stream_category

    atom() | nil

    Default value: nil
    Even more generic, select either :video, :audio, :subtitles, :cues, :metadata target streams. The first stream that matches the selector will be returned.

Summary

Types

Options for pad :output

t()

Struct containing options for Membrane.MPEG.TS.Demuxer

Functions

Returns description of options available for this module

Types

output_pad_opts()

@type output_pad_opts() :: [
  pid: pos_integer() | nil,
  stream_type: atom() | nil,
  profile: atom() | nil,
  registration_descriptor: String.t() | nil,
  stream_category: atom() | nil
]

Options for pad :output

t()

@type t() :: %Membrane.MPEG.TS.Demuxer{
  drop_until_video_rai?: boolean(),
  strict?: boolean(),
  wait_rai?: boolean()
}

Struct containing options for Membrane.MPEG.TS.Demuxer

Functions

options()

@spec options() :: keyword()

Returns description of options available for this module