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

merge_planes

merge_planes(
  input: [Clip, Clip, ...],
  #{
    format: String,
  }
)

Combines Gray plane clips into one planar Gray, YUV, or planar RGB clip.

Use array input form: std.merge_planes([a, b, c], #{ ... }). Every input clip must be Gray, use fixed format and fixed resolution, and match the frame count and frame rate of plane 0. The number of inputs and each input plane’s dimensions must match the requested target format.

Examples

y = source("input.mkv").std.split_plane(#{ plane: 0 })
u = source("input.mkv").std.split_plane(#{ plane: 1 })
v = source("input.mkv").std.split_plane(#{ plane: 2 })
output = std.merge_planes([y, u, v], #{ format: "yuv420p8" })

Input

One Gray clip per output plane, passed in array form.

Output

A planar Gray, YUV, or planar RGB clip assembled from the input planes, using plane 0 for timing and metadata.

Options