View Source Membrane.VideoCutter (Membrane Video Merger plugin v0.5.0)

Membrane element that cuts raw video.

The element expects each frame to be received in a separate buffer, so the parser (Membrane.Element.RawVideo.Parser) may be required in a pipeline before the encoder (e.g. when input is read from Membrane.File.Source).

To use this element, specify the desired intervals in the intervals options - VideoCutter will "filter" out all frames with timestamps outside of them.

element-options

Element options

Passed via struct Membrane.VideoCutter.t/0

  • intervals

    [{Membrane.Time.t(), Membrane.Time.t() | :infinity}]

    Default value: [{0, :infinity}]
    List of intervals of timestamps. The buffer is forwarded when its timestamp belongs to any of the given intervals. The start of the interval is inclusive and the end is exclusive.

    For example, to cut part starting from 190 ms up to 1530 ms out of the video, the intervals should be set to [{0, Membrane.Time.miliseconds(190)}, {Membrane.Time.miliseconds(1530), :infinity}].

  • offset

    Membrane.Time.t()

    Default value: 0
    Offset applied to all cut frames' presentation timestamp (PTS) values. It allows to logically shift the video to express its real starting point.

    For example, if there are two streams and the second one begins two seconds after the first one, video cutter that processes the second stream should apply a 2sec offset. Offset is applied after cutting phase.

pads

Pads

input

:input

Availability :always
Caps Membrane.RawVideo, restrictions:
  aligned: true
Demand mode :auto
Demand unit :buffers
Direction :input
Mode :pull
Name :input

output

:output

Availability :always
Caps Membrane.RawVideo, restrictions:
  aligned: true
Demand mode :auto
Demand unit :buffers
Direction :output
Mode :pull
Name :output

Link to this section Summary

Types

t()

Struct containing options for Membrane.VideoCutter

Functions

Returns pads descriptions for Membrane.VideoCutter

Returns description of options available for this module

Link to this section Types

Specs

t() :: %Membrane.VideoCutter{
  intervals: [{Membrane.Time.t(), Membrane.Time.t() | :infinity}],
  offset: Membrane.Time.t()
}

Struct containing options for Membrane.VideoCutter

Link to this section Functions

Specs

membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]

Returns pads descriptions for Membrane.VideoCutter

Specs

options() :: keyword()

Returns description of options available for this module