It might be easier to use Avisynth or Vapoursynth with MVTools directly:

  * [MVTools from Avisynth wiki](http://avisynth.nl/index.php/MVTools)
  * [MVTools technical page](http://avisynth.nl/index.php/MVTools)



Example to blur blocky area with occlusion mask 
    
    
    AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous 
filter, etc
    super = MSuper()
    vectors = MAnalyse(super, isb = false)
    compensation = MCompensate(super,vectors) # or use MFlow function here
    # prepare blurred frame with some strong blur or deblock function:
    blurred = compensation.DeBlock(quant=51) # Use DeBlock function here
    badmask = MMask(vectors, kind = 2, ml=50)
    overlay(compensation,blurred,mask=badmask) # or use faster MaskedMerge 
function of MaskTools
    

This can be fed directly to mencoder or x264 compiled with avs (Avisynth 
script) support. MPV can read directly from avs/vapoursynth so you can have a 
"REPL" for video files with vapoursynth/avisynth.

And last, port to Vapoursynth:

  * [MVTool Vapoursynth](https://github.com/dubhater/vapoursynth-mvtools)


Reply via email to