Skip to content

Deshake

Video Single output Transform

Stabilize shaky video.

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

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

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

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
xint-1-1set x for the rectangular search area
yint-1-1set y for the rectangular search area
wint-1-1set width for the rectangular search area
hint-1-1set height for the rectangular search area
rxint16064set x for the rectangular search area
ryint16064set y for the rectangular search area
edgeDeshakeEdgemirrorblank, original, clamp, mirrorset edge mode
blocksizeint84128set motion search blocksize
contrastint1251255set contrast threshold for blocks
searchDeshakeSmodeexhaustiveexhaustive, lessset search strategy
filenamestringset motion search detailed log file name
openclboolfalseignored

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