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

Syntax and call forms

Use supported call form that best fits your script. Paired examples in same section are alternate syntax for same operation.

Generic filter calls

output = filter(source("input.mkv"), "resize", #{ width: 1280, height: 720 })
output = source("input.mkv").resize(#{ width: 1280, height: 720 })

Built-in std namespace

output = std.resize(source("input.mkv"), #{ width: 1280, height: 720 })
output = source("input.mkv").std.resize(#{ width: 1280, height: 720 })

Third-party plugin namespace

output = plugin.acme.blur(source("input.mkv"), #{ radius: 2 })
output = source("input.mkv").plugin.acme.blur(#{ radius: 2 })

Multi-input filters

Use array input form when filter consumes more than one clip:

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" })

Metadata property reads

Use prop(clip, key) to read a metadata property from frame 0, or prop(clip, frame, key) to read a specific zero-based frame.

clip = source("input.mkv")
output = clip

if prop(clip, 0, "core:matrix") == "bt709" {
    output = clip.std.convert_colorspace(#{ matrix: "bt2020_ncl" })
}

The method form is equivalent:

clip = source("input.mkv")
frame_number = clip.prop(10, "core:frame_number")
output = clip

None metadata values return none(). Use is_none(value) before comparing or passing optional metadata into filters.