Hi,

i'm adapting the videostab2 to the latest git code.
The Big Changes are done, it will first compile and run withotu segfault.
But it seems some minor changes must be done to have good results.

A lot of code cleanup shoudl be done after taht, since teh api changes a lot.

regards marco


Am Sonntag, 27. Oktober 2013, 23:23:11 schrieb Dan Dennedy:
> On Sun, Oct 27, 2013 at 5:23 PM, Dan Dennedy <[email protected]> wrote:
> > On Sun, Oct 27, 2013 at 12:41 PM, Net Keenest <[email protected]> 
wrote:
> >> Hi, I use melt (0.9) because of the videostab2 filter. Transcode is
> >> practically unusable and there aren't any ffmpeg binaries available
> >> yet with vid.stab enabled (as far as I know).
> >> 
> >> It is sad that the included version (0.75) is older than 3 years. The
> >> developer was quite active in the meantime.
> >> 
> >> There is also an ugly bug in the melt version: it seems to ignore the
> >> interpolation setting. The only way it gets reported (with -debug)
> >> correctly, is to set "rescaler=name" for the consumer like:
> >> melt -debug test.mlt -consumer avformat f=yuv4mpegpipe
> >> rescale=bicublin | ffmpeg -i - image%02d.png
> > 
> > This is by design. It is typical in MLT to set a global interpolation
> > level on the consumer and then the filters pick that up. That way one
> > can easily set fast, draft quality levels for preview in a GUI and get
> > higher quality when rendering for finish without having to set
> > parameters on each filter and transition instance. The SDL and
> > audio-only consumers default themselves to nearest and avformat
> > consumer defaults to bilinear.
> > 
> >> This outputs (along other lines):
> >> 
> >> Image Transformation/Stabilization Settings:
> >>     smoothing = 10
> >>     maxshift  = -1
> >>     maxangle  = -1.000000
> >>     crop      = Keep
> >>     relative  = True
> >>     invert    = False
> >>     zoom      = 0.000000
> >>     optzoom   = On
> >>     interpol  = Bi-Cubic (4) <== OK!
> >>     sharpen   = 0.800000
> >> 
> >> Final zoom: 0.000000
> >> 
> >> Corresponding code section:
> >> https://github.com/mltframework/mlt/blob/2308a7/src/modules/videostab/fil
> >> ter_videostab2.c#L168> 
> > yep, that is fine except for some of the mapping seems incorrect, for
> > example bicubic, which is easy enough to fix.
> > 
> >> However, no matter what interpolation setting is used, the image
> >> always looks uninterpolated. Here is a sample with default settings
> >> and the vectors:
> >> 1=0/0:0.02x0;2=0/0:-0.01x0;3=0/0:-0.014x0;4=0/0:0.0265x0;5=0/0:0.0123x0;6
> >> =0/0:-0.0178x0;7=0/0:-0.02044x0;8=0/0:0.01276x0;9=0/0:0.01111x0 Frames:
> >> http://imgur.com/a/q3khB#0
> >> Original: https://en.wikipedia.org/wiki/File:Pm5544_ntsc-1.png
> >> 
> >> The code looks right, though:
> >> https://github.com/mltframework/mlt/blob/2308a7/src/modules/videostab/tra
> >> nsform_image.c#L674
> >> 
> >> For a normal video, this results in wobbling blocks.
> >> 
> >> Can this be fixed?
> > 
> > I did some tests, and I definitely see it going into the interpolation
> > functions, and I definitely see differences in the results when
> > looking under a screen magnifier. However, the results are definitely
> > nowhere what I see compared with:
> > 
> > melt Pm5544_ntsc-1.png -filter affine transition.rotate_x=0.1
> > -consumer sdl real_time=0 rescale=bilinear
> > 
> > I will look into it further this week.
> 
> This is fixed in git now. rescale=bicubic and =bicublin will not
> actually use a bicubic algorithm because that interpolation mode is
> still broken on packed pixel formats, which we are using. In fact,
> even vid.stab git master only uses bilinear with packed formats:
> 
> https://github.com/georgmartius/vid.stab/blob/master/src/transformfloat.c#L2
> 31
> 
> That is OK because after I fixed bilinear, that now gives much, much
> better results than what we had been getting. And bilinear will be
> used when requesting bicubic, or something else high quality such as
> lanczos, which the image scaler recognizes.
> 
> Thank you for reporting upon it with such good backing information.
-- 
Chuck Norris kann Fische ertränken!


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Mlt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to