Skip to content

Hsvkey

Video Single output Transform

Turns a certain HSV range into transparency. Operates on YUV colors.

FFmpeg filter: hsvkey — the official reference.

Add it to a graph. The explicit form works for every filter — bind it to its input and read the result from outputs():

$node = $video->addFilter(new Hsvkey());
$result = $node->outputs()[0];

Shorthand. Single-output filters can skip the node — apply() returns the result stream directly:

$result = $video->apply(new Hsvkey());

TODO — when this filter shines: what it’s the right tool for, what to reach for instead when it isn’t, and how it composes with neighbouring filters.

TODO — prose: how the filter actually works and what its key parameters mean (the explanation FFmpeg’s terse option help omits).

TODO — runnable PHP, with the equivalent ffmpeg CLI alongside.

TODO

TODO

ParameterTypeDefaultRange / valuesDescription
huefloat0-360360set the hue value
satfloat0-11set the saturation value
valfloat0-11set the value value
similarityfloat0.011.0E-51set the hsvkey similarity value
blendfloat001set the hsvkey blend value

Maps to FFmpeg’s hsvkey filter. Verified against ffmpeg n7.1.1.

An Artisan Build project.

Built on FFmpeg — an independent binding, not affiliated with or endorsed by the FFmpeg project. Support FFmpeg.