stlizer is a fast conservative video stabilizer.
It basically just translates or rotates the video frames. It means that lens distortion or motion blur cannot be fixed, but there is no need to worry about unwanted distortions or artifacts caused by algorithms or AI models.
I use this software just for watching videos or for pre-processing for other software, so this is the best specification.
example1.mp4
Realworld video example from DeepStab dataset.
python3 -m stlizer -i input_video.mp4 -o output_video.mp4
(If you are using nunif-windows-package on Windows, run nunif-prompt.bat
and enter the command from the console.)
Show all options
python3 -m stlizer -h
Only important options are described below.
You can specify out-of-frame processing with --border
option.
Simply fill with black color. The output resolution will be the same as the input video.
black.mp4
Crop with the fixed ratio specified by --padding
option (default 0.05 = -5% border cut).
The output resolution will be smaller then the input video.
crop.mp4
Simply fill with black color. Add border padding specified by --padding
(default 0.05 = 5% addtional border).
The output resolution will be larger then the input video. There is less potential for some pixels of the frame to be cut off.
expand.mp4
Fill with coarse blurry outpainting.
outpaint.mp4
This would be suitable for input to other software such as iw3. However, I have not tested it yet.
outpaint version of expand
.
expand_outpaint.mp4
You can specify the smoothing strength with --smoothing
option (2 by default).
If a higher value is specified, the original camera trajectory will not be respected and the out-of-frame area will increase.
*.stilizer
file is a cache file for pre-computed camera trajectory. It does not include raw file names or any privacy-sensitive data.
If this file exists, pass1 and pass2 can be skipped, when the options are compatible.
The storage location depends on OS.
Linux: ~/.cache/stlizer
macOS: ~/Library/Caches/stlizer
Windows: %APPDATA%\\Local\\nunif\\stlizer\\Cache
When --disable-cache
option is specified, the cache file is ignored and not created.
All cache files can be deleted with the following command.
python3 -m stlizer.purge_cache