I'm looking for a little script to filter borders only: top/bottom (and maybe left/right). I already have one but i wasn't able to tweak it so far; i can filter one border at a time.
The code i use:
###############s
# Border Top
X1 = 0
Y1 = 0
X2 = 720
Y2 = 26
## Border Bottom
#X1 = 0
#Y1 = 418
#X2 = 720
#Y2 =480
# Make the values MOD4
X1 = X1 - (X1 % 4)
Y1 = Y1 - (y1 % 4)
X2 = (X2 + 3) / 4 * 4
Y2 = (Y2 + 3) / 4 * 4
Active = crop(X1,Y1,X2-X1,Y2-Y1)
Above = Y1 > 0 ? crop(0,0,width(),Y1) : NOP
Below = Y2 < height() ? crop(0,Y2,width(),height()-Y2) : NOP
Left = X1 > 0 ? crop(0,Y1,X1,Y2-Y1) : NOP
Right = X2 < width() ? crop(X2,Y1,width()-X2,Y2-Y1) : NOP
Last = Active
##########
# Put filters here:
grayscale()
##########
IsClip(Left) ? StackHorizontal(Left, Last) : NOP
IsClip(Right) ? StackHorizontal(Last, Right) : NOP
IsClip(Above) ? StackVertical(Above, Last) : NOP
IsClip(Below) ? StackVertical(Last, Below) : NOP
return Last
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 4 of 4
Thread
-
*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
-
Code:
function filter_borders(clip c, int Left, int Top, int Right, int Bottom) { # Left = size of left border # Top = size of top border # Right = size of right border # Bottom = size of bottom border inner = Crop(c, Left, Top, -Right, -Bottom) GreyScale(c) # or whatever filters you want Overlay(last, inner, Left, Top) # overlay unfiltered inner portion }
Last edited by jagabo; 20th Dec 2016 at 18:58.
-
This may not be exactly what you had in mind, but this is another way to filter only the outside borders, but without making it a function:
A=Last
B=BlankClip(A, color = $ff0000)###Filter here, in this case create a red border
A=A.Crop(16,8,-16,-8)###Define the border area
Overlay(B,A,16,8) -
Thank you both, i'm using jagabo solution for now
*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
Similar Threads
-
Phosphor filter for Avisynth Help
By Caiosouza in forum RestorationReplies: 4Last Post: 11th Jun 2014, 21:10 -
AviSynth Filter Suggestions
By hech54 in forum RestorationReplies: 38Last Post: 12th May 2013, 16:34 -
avisynth filter recommendation
By mmbwdpnz in forum Newbie / General discussionsReplies: 50Last Post: 10th Dec 2012, 23:23 -
Avisynth filter RemoveDirt not doing anything
By ThePhoenix in forum Newbie / General discussionsReplies: 10Last Post: 4th Mar 2012, 18:40 -
AviSynth and Filter Order
By sambat in forum EditingReplies: 3Last Post: 11th Jan 2012, 10:04