pcroland
27th September 2017, 03:50
Hi!
I don't know if there is a request thread for plugins. What I would like is a plugin that cuts out a cross from the center of the footage so I can inspect the corners and edges whether they need crop and/or border fix without having to scroll the FullHD image. The current method that I use is this:
a=FFMS2("D:\btn\something.mkv").Crop(0,0,-990,-710)
b=FFMS2("D:\btn\something.mkv").Crop(990,0,-0,-710)
c=FFMS2("D:\btn\something.mkv").Crop(0,710,-990,-0)
d=FFMS2("D:\btn\something.mkv").Crop(990,710,-0,-0)
e=StackHorizontal(a,b)
f=StackHorizontal(c,d)
StackVertical(e,f)
Picture of this script working (https://vgy.me/CURnc5.png)
I think it would be easy to make such plugin but I do not understand programming. It might be helpful for others also.
StainlessS
27th September 2017, 06:03
Hope this will do.
Corners.avsi (for Plugins dir)
# Corners.avsi, http://forum.doom9.org/showthread.php?p=1819881#post1819881
# Crops all 4 corners of input and outputs stack4 window clip of those corners, allows viewing of corners without scrolling large input clip.
# Giving W=Width(default width/4) and H=Height(default Height/4) of corners. (Default output dim half of input dim, ie 2*Width/4, 2*Height/4).
# (Max W=c.Width, H=c.Height, where output 4 window stack of double dimensions to input).
Function Corners(clip c, Int "W", Int "H") {
c
W = Default(W,Width/4) H = Default(H,Height/4) # Default corners quarter of dimensions
W=W/4*4 H=H/4*4 # W Mod4 (YV411 compat), H Mod4 (YV12 Interlaced compat)
Assert(0 < W <= Width , "Corners: Invalid W"+String(W,"(%.0f)"))
Assert(0 < H <= Height, "Corners: Invalid H"+String(H,"(%.0f)"))
tl=crop(0,0,W,H) tr=crop(Width-W,0,W,H)
bl=crop(0,Height-H,W,H) br=crop(Width-W,Height-H,W,H)
Top=StackHorizontal(tl,tr) bot=StackHorizontal(bl,br)
Return StackVertical(Top,Bot)
}
# Alternate function, Giving W=Width and H=Height of output clip (should be W=Mod8 for YV411 and H=Mod8 for Interlaced YV12)
# (Max W=c.Width*2, H=c.Height*2, where output 4 window stack of double dimensions to input).
Function Corners2(clip c, Int "W", Int "H") { return c.Corners( Default(W,c.Width/2)/8*4, Default(H,c.Height/2)/8*4) }
# Return stack4 window, double dim of input clip. (Maybe of use if some plugin metrics are too big for the input clip [some metrics missing])
Function CornersX4(clip c) { return c.Corners(c.Width,c.Height) }
Client script
# FFMS2("D:\btn\something.mkv")
Colorbars.KillAudio # My Test
#Corners() # Output = half input dim
#Corners(Width/4,Height/4) # Output = half input dim
#Corners(Width,Height) # Output = double input dim (stack4 window, maybe if frame metrics too big for small input clip).
#Corners2() # Output = half input dim
#Corners2(Width/2,Height/2) # Output = half input dim
#Corners2(Width*2,Height*2) # Output = double input dim (stack4 window, maybe if frame metrics too big for small input clip).
Corners2(480,360) # Output = specific size
#CornersX4 # Output = double input dim (stack4 window, maybe if frame metrics too big for small input clip).
Info
Return Last
EDIT: Added Corners2() Function, can choose whatever one you like.
EDIT: Relaxed max W,H, limited at output dim to twice input dim. (may be of use to some)
EDIT: Added DoubleDim().
EDIT: Renamed DoubleDim() to CornersX4().
lansing
27th September 2017, 07:24
This is rule 6 violation
pcroland
27th September 2017, 15:17
Hope this will do.
Wow :O Amazing work, thank you very much :D :thanks:
This is rule 6 violation
Removed the filenames in the OP if that matters...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.