View Source Membrane.H265.Parser (Membrane H265 plugin v0.2.0)
Membrane element providing parser for H265 encoded video stream.
The parser:
- prepares and sends the appropriate stream format, based on information provided in the stream and via the element's options
- splits the incoming stream into h265 access units - each buffer being output is a
Membrane.Buffer
struct with a binary payload of a single access unit - enriches the output buffers with the metadata describing the way the access unit is split into NAL units, type of each NAL unit making up the access unit and the information if the access unit hold a keyframe.
The parser works in one of three possible modes, depending on the structure of the input buffers:
:bytestream
- each input buffer contains some part of h265 stream's payload, but not necessary a logical h265 unit (like NAL unit or an access unit). Can be used for i.e. for parsing the stream read from the file.:nalu_aligned
- each input buffer contains a single NAL unit's payload:au_aligned
- each input buffer contains a single access unit's payload
The parser's mode is set automatically, based on the input stream format received by that element:
- Receiving
%Membrane.RemoteStream{type: :bytestream}
results in the parser mode being set to:bytestream
- Receiving
%Membrane.H265.RemoteStream{alignment: :nalu}
results in the parser mode being set to:nalu_aligned
- Receiving
%Membrane.H265.RemoteStream{alignment: :au}
results in the parser mode being set to:au_aligned
- Receiving
%Membrane.H265{alignment: :nalu}
results in the parser mode being set to:nalu_aligned
. - Receiving
%Membrane.H265{alignment: :au}
results in the parser mode being set to:au_aligned
.
element-options
Element options
Passed via struct Membrane.H265.Parser.t/0
vps
binary()
Default value:
""
Video Parameter Set NAL unit binary payload - if absent in the stream, may be provided via this option.Any decoder conforming to the profiles specified in "Annex A" of ITU/IEC H265 (08/21), but does not support INBLD may discard all VPS NAL units.
sps
binary()
Default value:
""
Sequence Parameter Set NAL unit binary payload - if absent in the stream, should be provided via this option.pps
binary()
Default value:
""
Picture Parameter Set NAL unit binary payload - if absent in the stream, should be provided via this option.framerate
{pos_integer(), pos_integer()} | nil
Default value:
nil
Framerate of the video, represented as a tuple consisting of a numerator and the denominator. Its value will be sent inside the outputMembrane.H265
stream format.output_alignment
:au | :nalu
Default value:
:au
Alignment of the buffers produced as an output of the parser. If set to:au
, each output buffer will be a single access unit. Otherwise, if set to:nalu
, each output buffer will be a single NAL unit.
pads
Pads
input
:input
Accepted formats:
%RemoteStream{type: :bytestream}
%H265.RemoteStream{alignment: alignment} when alignment in [:au, :nalu]
%H265{alignment: alignment} when alignment in [:au, :nalu]
Direction: | :input |
Availability: | :always |
Flow control: | :auto |
Demand unit: | :buffers |
output
:output
Accepted formats:
%H265{alignment: alignment, nalu_in_metadata?: true} when alignment in [:au, :nalu]
Direction: | :output |
Availability: | :always |
Flow control: | :auto |
Demand unit: | nil |
Link to this section Summary
Types
Struct containing options for Membrane.H265.Parser
Link to this section Types
Specs
t() :: %Membrane.H265.Parser{ framerate: {pos_integer(), pos_integer()} | nil, output_alignment: :au | :nalu, pps: binary(), sps: binary(), vps: binary() }
Struct containing options for Membrane.H265.Parser
Link to this section Functions
Specs
options() :: keyword()
Returns description of options available for this module