Skip to content

Floodfill

Video Single output Transform

Fill area with same color with another color.

FFmpeg filter: floodfill — 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 Floodfill(…));
$result = $node->outputs()[0];

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

$result = $video->apply(new Floodfill(…));

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
xint00–65535set pixel x coordinate
yint00–65535set pixel y coordinate
s0int0-1–65535set source #0 component value
s1int0-1–65535set source #1 component value
s2int0-1–65535set source #2 component value
s3int0-1–65535set source #3 component value
d0int00–65535set destination #0 component value
d1int00–65535set destination #1 component value
d2int00–65535set destination #2 component value
d3int00–65535set destination #3 component value

Maps to FFmpeg’s floodfill 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.