View Source Membrane.Transcoder (Membrane Transcoder plugin v0.1.2)
Provides transcoding capabilities for audio and video streams in Membrane.
The bin takes an incoming stream on its input and converts it into the desired one as specified by the option. Transcoding is applied only if it is neccessary. The following video stream formats are supported:
The following audio stream formats are supported:
Membrane.AAC
Membrane.Opus
Membrane.RawAudio
Membrane.RemoteStream{content_type: Membrane.Opus}
(only as an input stream)
Bin options
Passed via struct Membrane.Transcoder.t/0
output_stream_format
Requiredstream_format() | stream_format_module() | stream_format_resolver()
An option specifying desired output format. Can be either:- a struct being a Membrane stream format,
- a module in which Membrane stream format struct is defined,
- a function which receives input stream format as an input argument and is supposed to return the desired output stream format or its module.
Pads
:input
Accepted formats:
format when Audio.is_audio_format(format) or Video.is_video_format(format)
Direction: | :input |
Availability: | :always |
:output
Accepted formats:
format when Audio.is_audio_format(format) or Video.is_video_format(format)
Direction: | :output |
Availability: | :always |
Summary
Types
Describes stream formats acceptable on the bin's input and output.
Describes stream format modules that can be used to define inputs and outputs of the bin.
Describes a function which can be used to provide output format based on the input format.
Struct containing options for Membrane.Transcoder
Types
@type stream_format() :: Membrane.H264.t() | Membrane.H265.t() | Membrane.VP8.t() | Membrane.RawVideo.t() | Membrane.AAC.t() | Membrane.Opus.t() | Membrane.RemoteStream.t() | Membrane.RawAudio.t()
Describes stream formats acceptable on the bin's input and output.
@type stream_format_module() ::
Membrane.H264
| Membrane.H265
| Membrane.VP8
| Membrane.RawVideo
| Membrane.AAC
| Membrane.Opus
| Membrane.RawAudio
Describes stream format modules that can be used to define inputs and outputs of the bin.
@type stream_format_resolver() :: (stream_format() -> stream_format() | stream_format_module())
Describes a function which can be used to provide output format based on the input format.
@type t() :: %Membrane.Transcoder{ output_stream_format: stream_format() | stream_format_module() | stream_format_resolver() }
Struct containing options for Membrane.Transcoder
Functions
@spec options() :: keyword()
Returns description of options available for this module