Video Stabilize
video-stabilize
Removes camera shake from video using GPU-accelerated two-pass optical flow stabilization.
video-stabilize accepts a boolean or an integer strength value from 0 to 100. A bare parameter (?video-stabilize) or true enables stabilization at the default strength of 25. An integer value sets a custom strength. 0, false, or an unparseable value disables stabilization.
| Value | Effect |
|---|---|
?video-stabilize (bare) | Default strength (25) |
true | Default strength (25) |
1 – 20 | Removes high-frequency jitter; follows intentional pans closely |
25 | Default — matches the classic libvidstab feel |
60 – 100 | Locked-off look; larger crop-in, more smoothing of deliberate moves |
0 / false | Off |
Strength tuning. Low values (≤ 20) remove only high-frequency jitter and follow intentional pans tightly. The default 25 matches the classic libvidstab feel. High values (60–100) iron the path toward a locked-off look, at the cost of a larger crop-in and more “floaty” response to deliberate camera moves.
Values are coerced, never rejected — a typo downgrades to the default behavior with a logged warning.
How it works
Stabilization is a two-pass process:
- Trajectory analysis. The clip is decoded once and NVIDIA’s hardware optical-flow engine measures global motion between every pair of frames. A robust fit rejects foreground movers (people, vehicles, water) and textureless regions, so the measured path reflects the camera’s motion, not the subject’s.
- Warp. The camera path is low-pass smoothed, and each frame is warped on the GPU by the difference between the real and smoothed path. HDR sources keep their 10-bit depth through the warp.
Interactions
fit=smart-crop— stabilization cancels camera motion first, then smart crop tracks subjects on the already-steady frames. Bothsmart_cropandstabilizetokens appear inX-Imgix-Video-Operations.- Trims (
video-clip-*) — analysis runs on exactly the trimmed range. - Speed, overlays, captions, color, VFX — all compose normally; the warp runs at the head of the pipeline.
- Stills, spritesheets, audio-only — stabilization is silently dropped on outputs with no video timeline.
Scope
Stabilization applies to timeline video outputs: MP4/WebM, HLS/DASH (applied once to the base pass), and animated GIF/WebP. It is dropped with a warning on single-image stills, spritesheets, VTT, audio-only outputs, and audiograms.
A successful stabilization render reports stabilize in the X-Imgix-Video-Operations response header and the stabilized encode’s duration in X-Imgix-Video-Stabilized-Duration. If analysis cannot run (source too short, mixed colorspace), the render proceeds unstabilized without error.
Examples
Steady a handheld clip at default strength:
https://assets.imgix.net/videos/handheld.mp4?fm=mp4&video-stabilizeDrone footage with a locked-off look:
https://assets.imgix.net/videos/drone.mp4?fm=mp4&video-stabilize=75Stabilized social GIF from a 3-second clip:
https://assets.imgix.net/videos/clip.mp4?fm=gif&video-stabilize&video-clip-start=12&video-clip-duration=3