Nodes/ComfyTV/Video Stabilize
ComfyUI Node

Video Stabilize

The fast deshake when you don't need the full treatment

By jtydhr88·Created 3 months ago·Updated about 15 hours ago· 725
Video Stabilize
  • video
  • video
force_run_token0
project_id
parent_output_id0
range_x16
range_y16
edgemirror

Handheld footage is shaky, and the fast fix is a deshake pass: search each frame for the best matching shift, then counter-move to hold the picture steady. That's exactly what Video Stabilize does - FFmpeg's deshake filter, single pass, no analysis cache, done. It's the "good enough, right now" stabilizer, and the pack makes the tradeoff explicit with a beefier sibling.

What it does

On ▶ Run it runs the deshake filter over a COMFYTV_VIDEO and writes a new stabilized snapshot. Three knobs:

  • range_x / range_y - maximum horizontal/vertical shift searched, in pixels (8–64, default 16; range_x rounds to multiples of 16 internally). Larger ranges catch bigger shake at more compute cost.
  • edge - how to fill the borders exposed when the frame shifts: mirror (default, reflects the edge), blank (black margins), original (keeps original edge pixels), clamp (extends edge pixels). mirror usually hides the shift best; blank is honest about what's going on but ugly.

The honest tradeoff

This is a fast, frame-to-frame stabilizer. For mild handheld jitter, it's perfect. For heavy walking shake, rolling shutter, or a shot you want to feel locked off, it will visibly fall short - the pack itself points you to Stabilize Pro (V2) for that. V2 is a two-pass camera-path stabilizer with smoothing and auto-zoom, which means longer renders but a fundamentally steadier result. The workflow tip that comes up repeatedly: try Stabilize first, and only escalate to Pro when the shake wins.

Edge handling deserves a second thought. mirror and clamp hide the correction by distorting the edges slightly; blank reveals it as black margins. If you're delivering to a platform that crops anyway, blank edges are harmless and the cleanest option.

Install and troubleshooting

Pack-standard: git clone https://github.com/jtydhr88/ComfyTV into ComfyUI/custom_nodes, restart, under ComfyTV → VideoFX. No models, no GPU - PyAV processing.

  • Still shaky after the pass - bump range_x/range_y, or escalate to Stabilize Pro; single-pass deshake has real limits.
  • Black bars or warpy edges - that's the edge setting. mirror for hidden seams, blank if you're cropping for delivery anyway.
  • Blurry result - stabilization often softens; the docs pair this with a Blur / Sharpen stage after, or a subtle sharpen pass.

Output is a COMFYTV_VIDEO snapshot; cross into native ComfyUI with a ← ComfyTV Video Bridge. Inside the pack it chains straight into the next VideoFX stage.

CategoryComfyTV/VideoFX

Inputs (7)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
range_xINT168–64max horizontal shift searched
range_yINT168–64max vertical shift searched
edgeCOMBOmirror4 options: mirror, blank, original, clamp
videooptCOMFYTV_VIDEO

Outputs (1)

NameTypeDescription
videoCOMFYTV_VIDEO