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

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

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

:input

Accepted formats:

%RawVideo{aligned: true}
Direction::input
Availability::always
Flow control::auto

:output

Accepted formats:

%RawVideo{aligned: true}
Direction::output
Availability::always
Flow control::auto

Summary

Types

t()

Struct containing options for Membrane.VideoCutter

Functions

Returns description of options available for this module

Types

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

Struct containing options for Membrane.VideoCutter

Functions

@spec options() :: keyword()

Returns description of options available for this module