Stabilize Shaky Video While Keeping the Shot You Need
Use FFmpeg and VidStab to analyze one shot, apply matching corrections and compare the saved file. Balance smoothing, edge room, intended camera movement and sound.

To stabilize shaky video, analyze the camera movement, apply a smoother motion path and leave enough edge room for the correction. Export a new file, then compare the same moments against the source. A steadier center is not a useful trade if the speaker's hands, product detail or caption is cut out.
CutNow is an AI video editor for footage you already have: it finds relevant passages and organizes first cuts. Start with the useful action from that material. Stabilization is a separate preparation decision for a selected shot; it should preserve the action and original sound that make the passage worth using.
Decide whether the movement should be corrected
Separate unwanted hand tremor from a deliberate pan, tilt or follow shot. A walking shot can contain both. Keep the intended movement; do not assume every camera should become a locked tripod.
Choose one continuous shot with a visible reference such as a wall edge or horizon. Split at scene cuts before analysis. A moving person filling the frame, a blank wall or repeated patterns can make camera motion harder to distinguish from subject motion. If one section demands an excessive crop, choose a shorter useful passage or another take.
This method uses FFmpeg with the open-source VidStab library. Use this local two-pass process to prepare the selected shot for its editing handoff. Choose an FFmpeg build that includes the filters and keep the original available for comparison.
Prepare one source and one matching motion file
Keep the master. Put a selected copy named shot-v01.mp4 in a new, empty working folder, open a terminal there, and use filenames that do not belong to an earlier job. Inspect it and check the available filters:
ffprobe -v error -show_streams -show_format -of json "shot-v01.mp4"
ffmpeg -hide_banner -filters
ffmpeg -hide_banner -encoders
Look for vidstabdetect and vidstabtransform, plus the encoders used below. If either filter is missing, use a build with libvidstab from a provider linked by the official download page; do not treat an unavailable filter as a successful analysis.
The recipe is for a decodable, ordinary SDR shot with square pixels, even dimensions and normal timestamps. Identify the main video and intended audio; inspect orientation and color before exporting. HDR, unusual pixel shapes and interlaced material need their own preparation plan.
Both passes must receive the same frames in the same order and orientation. Do not trim, change frame rate, rotate or replace the source between them. The library's matching-frame guidance explains why a motion file from another frame sequence can silently apply the wrong corrections.
Pass one: analyze the shot without making the delivery
ffmpeg -n -i "shot-v01.mp4" -map 0:V:0 -vf "format=yuv420p,vidstabdetect=shakiness=5:accuracy=15:result=motion-v01.trf" -an -fps_mode:v passthrough -f null -
This reads the selected moving-video stream and writes motion information to motion-v01.trf; the null output is not your finished video. Uppercase V excludes attached cover pictures. The official filter specification documents the analysis and result-file options. Its official source version contains the same definitions.
shakiness=5 and accuracy=15 are starting analysis settings, not a percentage improvement or a speed promise. Keep this motion file with this source version. A video-output -n is not protection for a filter-written .trf: the new working folder and unused motion filename prevent mixing or replacing earlier analysis.
Pass two: apply correction and inspect the edge trade
ffmpeg -n -i "shot-v01.mp4" -map 0:V:0 -map "0:a:0?" -vf "format=yuv420p,vidstabtransform=input=motion-v01.trf:smoothing=10:optalgo=gauss:optzoom=1:zoom=0:crop=black" -c:v libx264 -preset medium -crf 20 -pix_fmt yuv420p -fps_mode:v passthrough -c:a aac -b:a 160k -movflags +faststart "shot-stabilized-v01.mp4"
The transform reference defines these controls. Both passes use the same decoded source and format step. Video is re-encoded; this is not a lossless stream copy. The optional audio map allows a silent source. For several languages, choose the correct sound instead of assuming the first track is right.
| Setting | What to judge in the saved video |
|---|---|
smoothing=10 | A 21-frame motion window; more smoothing can suppress intended pan or tilt acceleration |
optzoom=1 | One calculated static zoom to avoid most exposed borders; strong movement can still reveal edges |
zoom=0 | No additional manual zoom beyond the automatic value; it does not mean no crop |
crop=black | Any remaining uncovered border is black rather than borrowed from an earlier frame |
Here crop names a border-filling policy, not crop dimensions. Start conservatively. If hands or text move out of view, reduce the smoothing or choose a shot with more room. Re-export under a new filename and compare one change at a time. A smoother path may cost more framing; keeping the same output dimensions does not mean keeping the whole original field of view.
Know what this correction cannot recover
Moving the whole image does not restore detail smeared during an exposure. A motion-blurred hand can remain blurred even when its position looks steadier. Bent or rippling vertical lines from rolling shutter also need separate assessment; the commands above do not include a row-wise rolling-shutter repair.
For context, Adobe's rolling-shutter explanation distinguishes that distortion from ordinary camera shake. Do not infer a repair from stabilization alone. Heavy parallax, objects crossing most of the frame and sudden direction changes also deserve close review, not progressively stronger settings by default.
This is different from brightness, noise and sharpness adjustments, and from choosing a new frame shape. Do not add sharpening to hide a crop or assume a stronger filter reconstructs missing action.
Compare the actual exports and hand off the accepted version
Open the saved MP4 outside the conversion process. Compare the same source moments and playback speed: the beginning, strongest shake, start and stop of a pan, frame edges and the end. Watch at normal speed as well as pausing on important product details. Check for drift, jumps, unwanted zoom, black borders, softened detail and cropped hands or captions.
Listen to the chosen voice and check action sync. The recipe re-encodes audio to AAC and does not map separate subtitle tracks; retain or reapply subtitles deliberately against the approved version. Use the subtitle guide for that handoff.
Probe the output as you did the source, then open it in the receiving editor. Confirm duration, orientation, displayed proportions and the complete action. A player effect or CSS transform is not the saved stabilization. Keep the source, matching .trf, settings and accepted output together. Explore CutNow for the earlier work of selecting and shaping useful footage into a first cut.