Desktop video stabilization for quick fixes, manual FFmpeg tuning, OpenCV feature tracking, and RAFT dense optical flow.
Video Stabbot is an Electron app for stabilizing shaky footage from a single interface. It combines FFmpeg vidstab, OpenCV sparse optical-flow tracking, and RAFT dense optical flow so users can choose between speed, control, and maximum motion-analysis quality.
File selection Mode selection Custom settings Processing
-
Quick FFmpeg Mode - Fast two-pass stabilization using FFmpeg vidstab with bicubic transforms, recommended sharpening, optional audio mapping, and practical defaults.
-
Custom Mode - Full manual control over vidstab parameters:
- Border mode, smoothing strength, shakiness detection
- Accuracy, auto/manual zoom, zoom speed, interpolation method
- Tripod mode, relative transforms, max shift, max rotation
- Step size, minimum contrast, encoding quality
-
OpenCV Feature Tracking (requires Python, OpenCV, NumPy, and SciPy) - Sparse optical-flow stabilization with robust trajectory smoothing.
- Auto Track mode uses Shi-Tomasi corners and pyramidal Lucas-Kanade tracking.
- Features are distributed across a grid so motion estimates do not overfit one textured area.
- SIFT, ORB, and AKAZE can seed tracking points when preferred.
- Forward/backward track validation rejects unstable points.
- ECC refinement improves the tracked transform when image alignment converges.
- Farneback dense optical flow is used as a fallback when sparse tracks are weak.
- RANSAC estimates camera motion while rejecting moving-object outliers.
- Output keeps the selected resolution and muxes source audio.
-
RAFT Deep Learning (requires PyTorch and torchvision) - Dense mesh-flow stabilization for hard footage.
- Uses torchvision RAFT large weights for Sintel-style or Things-style motion.
- Uses a 7 x 9 local mesh by default instead of only one global camera path.
- Smooths local mesh trajectories to reduce parallax and rolling local jitter.
- Automatically caps analysis resolution for practical memory use.
- Converts dense flow to robust global camera motion with RANSAC.
- Falls back to sparse tracking when dense flow is unreliable.
- Output keeps the selected resolution and muxes source audio.
- Faster startup checks - Python packages are probed in one lightweight pass instead of importing each dependency.
- GPU acceleration - Auto-detects NVIDIA NVENC, Intel QSV, AMD AMF, or Apple VideoToolbox; falls back to CPU libx264.
- Smart dependency detection - Advanced modes appear disabled with tooltip explanations when prerequisites are missing.
- Drag-and-drop or file picker - Easy video input.
- Real-time progress tracking - Phase labels, progress bar, and elapsed time.
- Tooltips - Hover over any setting for detailed explanations.
- Bidirectional slider/input controls - Type values manually or use sliders.
- Node.js v18 or later - https://nodejs.org
- FFmpeg with libvidstab support - must be on your system PATH
- Download from https://ffmpeg.org/download.html
- Verify:
ffmpeg -filters | findstr vidstabon Windows orffmpeg -filters | grep vidstabon macOS/Linux
-
Python 3.8+ on your system PATH
-
Required packages:
pip install opencv-python numpy scipy
-
Python 3.8+ on your system PATH
-
PyTorch and torchvision:
# GPU version for NVIDIA CUDA pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128 # CPU-only version pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
-
Additional packages:
pip install opencv-python numpy scipy
First RAFT run may download model weights. GPU is strongly recommended.
git clone <repo-url> cd Video-Stabbot npm install pip install -r requirements.txt
npm start
From the app:
- Select a video - Drag onto the drop zone or click to browse.
- Choose a stabilization mode - Quick FFmpeg, Custom, OpenCV Features, or RAFT Deep Learning.
- Configure settings - Each advanced mode has its own settings view with tooltips.
- Pick a save location - Choose where to save the stabilized video.
- Wait for processing - Progress shows the current phase and elapsed time.
- View result - Open the output folder or process another video.
Video-Stabbot/
|-- package.json
|-- requirements.txt
|-- README.md
|-- screenshot-file-selection.jpg
|-- screenshot-mode-selection.jpg
|-- screenshot-custom-settings.jpg
|-- screenshot-processing.jpg
|-- src/
| |-- main/
| | |-- main.js
| | |-- detect-worker.js
| | `-- preload.js
| `-- renderer/
| |-- index.html
| |-- renderer.js
| `-- styles.css
`-- scripts/
|-- smoothing_lib.py
|-- opencv_feature_tracking.py
`-- raft_dense_motion.py
| Mode | Speed | Quality | Requirements | Best For |
|---|---|---|---|---|
| Quick FFmpeg | Fast | Good | FFmpeg only | General use and quick results |
| Custom | Fast to medium | Good to excellent | FFmpeg only | Fine-tuning vidstab parameters |
| OpenCV Features | Medium | Excellent | Python, OpenCV, NumPy, SciPy | Complex handheld motion and CPU-friendly quality |
| RAFT Deep Learning | Very slow | Highest | Python, PyTorch, torchvision, SciPy | Difficult footage where processing time is acceptable |
- OpenCV: Install
pip install opencv-python numpy scipy. - RAFT: Install
pip install torch torchvision opencv-python numpy scipy. - Hover over the disabled mode tile for the specific missing dependency.
- Install PyTorch with CUDA support for GPU acceleration.
- Reduce refinement iterations only when speed matters more than quality.
- Use OpenCV mode on CPU-only systems when speed matters.
- Download an FFmpeg build with libvidstab support.
- Verify with
ffmpeg -filters | grep vidstab. - Windows users can try builds from https://www.gyan.dev/ffmpeg/builds/.
To package the app as a standalone Windows executable:
npm run dist:win
Output files are created in dist/:
video-stabbot Setup <version>.exevideo-stabbot <version>.exeif the portable target is generated
Optional build commands:
npm run pack npm run dist
Python dependencies must still be installed separately by end users for advanced modes.
Commit source and project metadata only:
src/scripts/package.jsonpackage-lock.jsonrequirements.txtREADME.md- screenshot jpgs or other intentional assets
.gitignore
Do not commit generated build artifacts such as dist/, installers, portable executables, or unpacked app folders.
After running npm run dist:win, upload release artifacts from dist/:
video-stabbot Setup <version>.exevideo-stabbot <version>.exeif generated
Recommended release steps on Windows:
- Update version in
package.json. - Commit and push changes.
- Build release artifacts with
npm run dist:win. - Create and push a tag such as
v2.0.1. - Draft a GitHub release for that tag and upload the
.exeassets.
MIT License - see LICENSE file for details.
- FFmpeg vidstab filters for the quick and custom stabilization paths.
- OpenCV for feature detection, Lucas-Kanade optical flow, and robust affine estimation.
- RAFT for dense optical flow.
- SciPy for trajectory smoothing.