W dniu 31.12.2013 19:08, Dan Dennedy pisze: > On Tue, Dec 31, 2013 at 3:21 AM, Jakub Księżniak <jksiezn...@gmail.com> wrote: >> Hello, >> >> I've implemented a new module for video stabilization using the vid.stab >> library (from https://github.com/georgmartius/vid.stab). >> >> The reason to this work, was mainly due to a bad performance of videostab2 >> filter. Later, I've learned that this filter used an old version 0.75 of >> vid.stab library. So I took the code from videostab2 module as a model and >> created 3 new filters in a 'vid.stab' module: > Thank you for your contribution! > >> vid.stab.deshake - A single-pass video stabilization filter. >> vid.stab.detect - 1st-pass filter, detects motions in the video. >> vid.stab.transform - 2nd-pass filter, applies transformations to the video. > You could please combine detect and transform, or make a new service > that encapsulates and switches between them? Otherwise, it will be > quite tricky for most MLT apps to integrate them. Quite a bit of new > code would need to be written to handle this. There are a few examples > of services the encapsulate or wrap other services: loader producer, > melt producer, watermark filter, dynamictext filter. Sure, I can combine detect and transform filters, just like in videostab2 filter, but it isn't clear to me how other apps know which pass is performed by the filter. The videostab2 filter determines it by checking if exists the "vectors" property. In my approach, I rename the vid.stab.detect filter to vid.stab.transform when running the detection filter:
mlt_properties_set(properties, "mlt_service", "vid.stab.transform"); It works very well in a command-line environment, when I use the vid.stab.detect filter with a xml consumer, though it's a bit ugly. Also, examples you mentioned do not require multiple passes (or am I wrong?), so I'll just stick to the solution from videostab2 filter. >> The code is not perfect, but it works great for me. :) >> >> In order to compile and use the new module, you need to download and build >> the vid.stab library first. All filter parameters are the same as in >> videostab2. >> >> The source code is available here: >> https://github.com/jksiezni/mlt/tree/master/src/modules/vid.stab >> >> Feel free to modify this code or integrate it back to videostab module. > Or perhaps someone else can volunteer to do that. > >> -- >> Happy New Year! >> Jakub Księżniak > +-DRD-+ -- Best Regards, Jakub Księżniak ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel