Why does FFmpeg say “No such filter: vidstabdetect”?
Your build was made without the vid.stab library. Install a full build that includes it, or use the one-pass deshake filter instead.
Guide · free tool included
The two commands that steady a clip with FFmpeg’s vid.stab filters, the options worth changing, a loop for a whole folder and a one-line fallback when your build lacks them.
FFmpeg stabilises video in two passes with the vid.stab library: vidstabdetect measures how the camera moved and writes it to a file, then vidstabtransform reads that file and moves each frame to cancel the shake. Both are free, run on your own computer and suit batches of files and servers well.
Prefer not to use a terminal? The tool at the top of this page does the same job in your browser, with a rolling-shutter fix and a before-and-after view that vid.stab doesn’t have; the table further down maps each vid.stab option to its control. For other desktop options, see the comparison of stabilisation software.
Run ffmpeg -filters and look for vidstabdetect and vidstabtransform. Most full builds include them (they are compiled in with --enable-libvidstab); some minimal ones don’t.
Run the first pass. It writes transforms.trf next to your video and makes no video file.
Run the second pass with the same input. It encodes the picture again and copies the sound unchanged.
If the result is still jittery, raise smoothing; if it crops too much, lower it or set a negative zoom. Only the second pass needs running again.
Pass one measures the motion. shakiness (1 to 10, default 5) says how shaky and quick the camera is; accuracy (1 to 15, default 15) trades speed for precision.
ffmpeg -i input.mp4 -vf vidstabdetect=shakiness=5:accuracy=15:result=transforms.trf -f null -Pass two applies it. smoothing=30 averages the camera over 61 frames (2 × 30 + 1); interpol=bicubic gives a sharper result than the default bilinear; the unsharp filter restores a little of the crispness the zoom takes away; -c:a copy keeps the sound as it is.
ffmpeg -i input.mp4 -vf vidstabtransform=input=transforms.trf:smoothing=30:interpol=bicubic,unsharp=5:5:0.8:3:3:0.4 -c:v libx264 -crf 18 -preset slow -c:a copy output.mp4 smoothing: how many frames either side are averaged (default 15). Higher is calmer, but follows deliberate pans less closely.optzoom: 1 (the default) picks one zoom for the whole clip that hides the edges, 2 changes it as the shake changes (at most zoomspeed per cent per frame), 0 turns it off.zoom: extra zoom in per cent; a negative value zooms out and shows more of the frame.crop=black: fill the uncovered edges with black instead of keeping the previous frame’s edge (keep, the default).tripod=1 on both passes: hold the camera completely still, as if on a tripod, relative to the first frame.optalgo: opt (the default) optimises the whole path; gauss and avg are simpler moving averages.show=1 on the first pass, written to a video instead of -f null, draws the measured motion so you can check it.In a Mac or Linux terminal (or Git Bash on Windows), this loop steadies every MP4 in the current folder and saves each as stable- plus its name. It reuses one transforms.trf, since each clip is measured and corrected before the next one starts.
for f in *.mp4; do
ffmpeg -i "$f" -vf vidstabdetect=result=transforms.trf -f null -
ffmpeg -i "$f" -vf vidstabtransform=input=transforms.trf:smoothing=30:interpol=bicubic -c:v libx264 -crf 18 -c:a copy "stable-$f"
done The stabiliser on this page works on the same ideas, with named controls instead of options, and re-plans the camera path the moment you change one, so there’s no second pass to wait for.
| vid.stab | What it does | Here |
|---|---|---|
smoothing | How calm the camera becomes | Smoothness |
tripod=1 | Holds the frame still | Camera: Locked (the Tripod preset) |
optzoom=1 | One zoom for the whole clip | Framing: Crop to fit |
optzoom=2 | Zoom that follows the shake | Framing: Smart zoom |
optzoom=0 with crop=black | No zoom, black edges | Framing: Full frame with Edges: Black |
zoom | Extra zoom in per cent | Extra zoom |
| (none) | Rolling-shutter correction | Rolling shutter: Auto or Manual |
| (none) | Perspective and local wobble | Correction: Perspective or Warp |
In November 2026 we ran vid.stab and the stabiliser on this page over the same 11 short clips: six real clips (walking, hiking, a concert, a car interior, skiing and cycling) and five steady clips with shake added, so their true camera path is known. A separate tracker, which shares no code with either, measured the shake left between 1.5 and 15 Hz, the range of hand tremor, footsteps and vibration.
smoothing=30.crop=keep it lets the previous frame’s edge show at the worst moments. With its default settings the browser stabiliser never shows an empty edge; it zooms in a little instead.Eleven clips is a small sample, and your footage may behave differently, so compare both on a clip of your own before you settle on one.
If your FFmpeg has no vid.stab, the built-in deshake filter works in one pass. It corrects only sideways and up-and-down shifts, not rotation, looking for movements of up to 16 pixels by default (rx and ry, at most 64), so it suits gentle shake best. By default it mirrors the picture into the uncovered edges.
ffmpeg -i input.mp4 -vf deshake -c:a copy output.mp4 Your build was made without the vid.stab library. Install a full build that includes it, or use the one-pass deshake filter instead.
By default optzoom=1 zooms just enough to hide the moving edges. Set optzoom=0 to turn that off and decide the edges yourself with crop and zoom.
Only if you ask: add -c:a copy to the second pass to copy the sound across unchanged.
Add tripod=1 to both the vidstabdetect and vidstabtransform options. It only works when the shot doesn’t need to pan; locked-off shots explains the limits.
vid.stab, in most cases: it measures the motion across the whole frame, including rotation, and plans a smoother path over many frames. deshake is quicker to type and comes with standard FFmpeg builds.
Not with vid.stab or deshake: both treat each frame as one rigid picture, so the lean and wobble of a rolling shutter stay. The rolling shutter page explains the effect and fixes it in the browser.