convert_colorspace
convert_colorspace(
input: Clip,
#{
range?: String,
matrix?: String,
transfer?: String,
primaries?: String,
chroma_siting?: String,
dither?: String,
}
)
Changes color metadata and, when needed, pixel values without changing the clip format or resolution.
The input must be one fixed-format planar Gray, YUV, or planar RGB clip, and you
must set at least one colorspace option. PixelFlow expects canonical metadata
names such as "bt709" rather than aliases such as "rec709". Some
conversions are metadata-only, while others need render-time source metadata such
as core:range, core:matrix, core:transfer, core:primaries, and
core:chroma_siting. Missing or unsupported metadata can still fail render.
Examples
output = source("input.mkv").std.convert_colorspace(#{ range: "full" })
output = source("input.mkv").std.convert_colorspace(#{
matrix: "bt709",
transfer: "bt1886",
primaries: "bt709",
chroma_siting: "left",
})
Input
One fixed-format planar Gray, YUV, or planar RGB clip.
Output
A clip with the same format, resolution, and timing, with colorspace metadata rewritten and pixel values converted as needed.
Options
range(String) – Set the output color range; supported values are"full"and"limited".matrix(String) – Set the output matrix using PixelFlow’s canonical matrix names. See Matrix coefficients strings.transfer(String) – Set the output transfer characteristic using PixelFlow’s canonical transfer names. See Transfer characteristic strings.primaries(String) – Set the output color primaries using PixelFlow’s canonical primaries names. See Color primaries strings.chroma_siting(String) – Set the output chroma siting; supported values are"left","center","top_left","top","bottom_left", and"bottom".dither(String, default:"fruit") – Select the dither mode for lossy range conversions; supported values are"fruit"and"none".