Attached is a little ruby script which uses Zach's motion_est filters
(requires current CVS) to provide things like video stabilisation and
auto tracking obscure masks (or arbitary tracked effects like watermarks
An example of the output can be found at:
The example consists of two parts - the first shows the 'scan' phase
where the motion is tracked - the second shows the stabilised results.
The script is written in ruby and uses stdout pipes from inigo to
collect the geometry as the video plays (ie: it doesn't use the mlt++
swig stuff). Usage message is:
Usage: tracker.rb file geometry [ args ]
where args are:
result=[mlt consumer] default = sdl
operation=[stabilise|mlt filter] default = stabilise
variance=[key variance] default = 20
scan=[preview|null] default = preview
for non-stabilise operations
shape=[rectangle|circle|file default = rectangle
tracker.rb file.avi 30%,30%,40%,40% scale=0.6 variance=1
tracker.rb file.avi 30%,30%,40%,40% operation=obscure shape=circle
tracker.rb file.avi 30%,30%,40%,40% scale=0.6 result=westley:output.westley
To install it, just copy it to a writable location on your PATH
($HOME/bin is a good place for such things) and run:
chmod +x $HOME/bin/tracker.rb
Caveats: The script doesn't handle widescreen (other than in letter
boxed use) but should be easy enough to manipulate to do that. If anyone
feels like taking it further, feel free to mail the results back. It
wouldn't be difficult to put a little GUI on this functionality....
Hope it's of use.
Get latest updates about Open Source Projects, Conferences and News.