Drawgraph
Video Single output Transform
Draw a graph using input video metadata.
FFmpeg filter:
drawgraph— 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 Drawgraph(…));$result = $node->outputs()[0];Shorthand. Single-output filters can skip the node — apply() returns the result stream directly:
$result = $video->apply(new Drawgraph(…));When to use it
Section titled “When to use it”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.
How to use it
Section titled “How to use it”TODO — prose: how the filter actually works and what its key parameters mean (the explanation FFmpeg’s terse option help omits).
Examples
Section titled “Examples”TODO — runnable PHP, with the equivalent ffmpeg CLI alongside.
Gotchas
Section titled “Gotchas”TODO
See also
Section titled “See also”TODO
Parameters
Section titled “Parameters”| Parameter | Type | Default | Range / values | Description |
|---|---|---|---|---|
m1 | string | — | — | set 1st metadata key |
fg1 | string | 0xffff0000 | — | set 1st foreground color expression |
m2 | string | — | — | set 2nd metadata key |
fg2 | string | 0xff00ff00 | — | set 2nd foreground color expression |
m3 | string | — | — | set 3rd metadata key |
fg3 | string | 0xffff00ff | — | set 3rd foreground color expression |
m4 | string | — | — | set 4th metadata key |
fg4 | string | 0xffffff00 | — | set 4th foreground color expression |
bg | string | white | — | set background color |
min | float | -1 | — | set minimal value |
max | float | 1 | — | set maximal value |
mode | DrawgraphMode | line | bar, dot, line | set graph mode |
slide | DrawgraphSlide | frame | frame, replace, scroll, rscroll, picture | set slide mode |
size | string | 900x256 | — | set graph size |
rate | string | 25 | — | set video rate |
FFmpeg also names these options (use the parameter shown above): s → size, r → rate.
Maps to FFmpeg’s drawgraph 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.