Why Do This in Your Browser?
Stabilization is one of those FFmpeg features that sits behind a desktop install for most people. The vidstab filter has been part of FFmpeg for over a decade — it's the same engine professional editors run when they need to fix handheld shake without a gimbal pass — and the math is well-understood. The only thing keeping it out of the browser was build size.
FFmpeg.wasm with the full filter set includes vidstab. The browser pass runs the same two-stage analysis-then-application algorithm as desktop FFmpeg, just at roughly 30–50% of the speed. For 30-second to 2-minute clips, that's a wait of a few minutes, not the multi-hour grind that fooled most people into thinking browser-based stabilization wasn't viable.
How It Works
Stabilization runs in two passes. Pass one (`vidstabdetect`) scans the video frame-by-frame, computes optical-flow transformations between adjacent frames, and writes a per-frame motion vector file. Pass two (`vidstabtransform`) reads those vectors and applies a smoothing curve — typically a 30-frame moving average — to cancel out high-frequency shake while preserving intentional camera moves.
Three controls matter most. Smoothness (0–30) sets the moving-average window — higher values smooth more aggressively but soften slow pans. Crop mode trims edges to hide the residual shake; 'no crop' preserves full frame at the cost of visible black borders during motion. Optical flow strength (1–10) balances detection sensitivity against false positives in low-light footage.
Tip: Stabilization works best on clips trimmed to the section you actually want stable — process less, get better results. Use the Video Trimmer first. For follow-up reframing of stabilized vertical content, pair with the Video Resizer.
Common Use Cases
How We Compare
Honest read on free, paid, and self-hosted options for this kind of job: