Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

split_plane

split_plane(
  input: Clip,
  #{
    plane: Int,
  }
)

Extracts one plane from a planar Gray, YUV, or planar RGB clip as a Gray clip.

The input must be one fixed-format, fixed-resolution planar Gray, YUV, or planar RGB clip. plane is zero-based and must be within the input plane count. Gray clips only accept plane: 0. For subsampled YUV formats, the output resolution matches the selected plane’s own dimensions.

Examples

y = source("input.mkv").std.split_plane(#{ plane: 0 })
output = y

Input

One fixed-format, fixed-resolution planar Gray, YUV, or planar RGB clip.

Output

A Gray clip with the selected plane’s data, matching the input sample type and bit depth.

Options

  • plane (Int) – Select the zero-based plane index to extract.