Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
Here's an example video I made
brew install ffmpeg --with-libvidstab
This won't modify your video or create a new video, but it should create a new file called transform.trf
ffmpeg -i clip.mov -vf vidstabdetect -f null -
ffmpeg -i clip.mov -vf vidstabtransform=smoothing=5:input="transforms.trf" clip-stabilized.mov
This should create a new stabilized video called clip-stabilized.mov
Found on a forum here
ffmpeg -i Clip8.mov -i Clip8-vidstab.mov -filter_complex "[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w" merged.mov
@mrgloom ..that is the syntax of the 1st-phase,
here is an extended version, that I use in a Windows-compatible batch-file.
the
null
is a ffmpeg-preserved phrase, for forced-format encoding, to essentially do not output anything from the encoder-phase, but to still run it, it is used in various filters that need to 'walk over' the video-frames, the output-file is usually handled by the filter, as one of its-given variables. In the example above the output is actually written by the filter, using the file name, given in theresult=
part (and then again in theinput=
part for the 2nd-phase).The
nul
at the end (missingl
) is Windows-related and essentially same as/dev/null
on *nix systems, it keeps the standard/error streams empty (less I/O).