StabilizeVideo
provides the stabilize
command, which uses FFmpeg
to improve shakey videos.
Provided as a Ruby Gem, StabilizeVideo
exposes an API which can be invoked from other programs.
To use the stabilize
command from a console, type:
$ gem install stabilize_video
If you would like to use the API from your Ruby program,
add the following line to your application’s Gemfile
:
gem 'stabilize_video'
And then execute:
$ bundle
If you would like to use the API from your Ruby gem,
add the following to your gem’s .gemspec
:
spec.add_dependency 'stabilize_video'
And then execute:
$ bundle
This is the help message:
$ stabilize -h
stabilize: Stabilizes a video using the FFmpeg vidstabdetect and vidstabtransform filters.
Syntax: stabilize [Options] PATH_TO_VIDEO
Options:
-f Overwrite output file if present
-h Show this help message
-s Shakiness compensation 1..10 (default 5)
-v Verbosity; one of: trace, debug, verbose, info, warning, error, fatal, panic, quiet
-z Zoom percentage (computed if not specified)
See:
https://www.ffmpeg.org/ffmpeg-filters.html#vidstabdetect-1
https://www.ffmpeg.org/ffmpeg-filters.html#toc-vidstabtransform-1
After checking out this git repository, install dependencies by typing:
$ bin/setup
You should do the above before running Visual Studio Code.
$ bundle exec rake test
The following will allow you to experiment:
$ bin/console
To install this gem onto your local machine, type:
$ bundle exec rake install
To create a git tag for the new version, push git commits and tags, and push the new version of the gem to https://rubygems.org, type:
$ bundle exec rake release
Bug reports and pull requests are welcome at https://github.com/mslinn/stabilize_video.
The gem is available as open source under the terms of the MIT License.