Skip to content

Mandelbrot

Video Single output Source

Render a Mandelbrot fractal.

FFmpeg filter: mandelbrot — the official reference.

Generate a stream. Mandelbrot is a source — it has no input, so you create a stream from it rather than applying it to one:

$video = \FFmpeg\VideoStream::generate(new Mandelbrot());

apply() and addFilter() do not apply to source filters (there is nothing to attach them to).

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
sizestring640x480set frame size
ratestring25set frame rate
maxiterint71891set max iterations number
start_xfloat-0.74364388703716-100100set the initial x position
start_yfloat-0.13182590420531-100100set the initial y position
start_scalefloat30set the initial scale value
end_scalefloat0.30set the terminal scale value
end_ptsfloat4000set the terminal pts value
bailoutfloat100set the bailout value
morphxffloat0.01set morph x frequency
morphyffloat0.0123set morph y frequency
morphampfloat0set morph amplitude
outerMandelbrotOuternormalized_iteration_countiteration_count, normalized_iteration_count, white, outzset outer coloring mode
innerMandelbrotInnermincolblack, period, convergence, mincolset inner coloring mode

FFmpeg also names these options (use the parameter shown above): ssize, rrate.


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