JKP123

The.Last.Laugh.1924-JKP

May 1st, 2021 (edited)
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. import vapoursynth as vs
  2. import vsutil
  3. from rekt import rektlvls
  4. import awsmfunc as awf
  5. import havsfunc as haf
  6. import fvsfunc as fvf
  7. core = vs.get_core()
  8.  
  9. video=core.lsmas.LWLibavSource(r'D:\Test\Der.Letzte.Mann.aka.The.Last.Laugh.1924.Bluray.REMUX-Machine.mkv')
  10. video=core.std.CropRel(video,left=242,top=0,right=242,bottom=0)
  11. video4=video
  12. video=video.fb.FillBorders(left=1, right=1, bottom=0, top=0, mode="fillmargins")#fixing 1 px dirty line on left and right
  13. video2=vsutil.depth(video, 16)
  14. mask = core.std.Sobel(video2, 0)
  15. luma = core.std.ShufflePlanes(mask, 0, colorfamily=vs.GRAY)
  16. mask_outer=luma.std.Maximum().std.Maximum().std.Inflate()
  17. mask_inner=mask_outer.std.Minimum().std.Minimum().std.Minimum().std.Deflate()
  18. halos = core.std.Expr([mask_outer, mask_inner], 'x y -')
  19. dehalo = haf.DeHalo_alpha(video2)
  20. src = core.std.MaskedMerge(video2, dehalo, halos)
  21. src = vsutil.depth(src, 8, dither_type='error_diffusion')
  22. final=fvf.rfs(video,src,"[22484 23399]")
  23. final.set_output()
Add Comment
Please, Sign In to add comment