View Full Version : Before and After Script...
luders
20th June 2005, 03:42
I am wondering if there is a way script an avs so that it shows a before filter version of an avi on top of an after filter version for comparison.
Something like....
v=avisource("test.avi")
w=avisource("test.avi").FieldDeinterlace()
return(v on top of w)
That is just a really lame example but you get what I am going for. It would seem it is possible. If not, why?
Edit... I am an idiot. Looks like I found it. StackHorizontal and StackVertical.
Scintilla
20th June 2005, 06:38
Methinks this is what you are looking for:
http://www.amvwiki.org/index.php/BeforeAfter
##################################################################
# BeforeAfter by Absolute Destiny and Corran (Eric Parsons) #
# e.g. #
# beforeafter(clip, placement, filters) #
# #
# 1 for vertical splitscreen, 0 for horizontal splitscreen #
##################################################################
function beforeafter(clip a, int "placement", string "filters"){
placement = Default(placement, 1)
Assert((Float(Width(a))/16)==Round(Width(a)/16), "Source image width must be a multiple of 16")
b = Eval("a."+filters)
c = (placement==1) ? StackHorizontal(a.Crop(0,0,-((Ceil(Float(Width(a))/32))*16),0).\
Subtitle("before"),b.Crop(((Floor(Float(Width(a))/32))*16),0,0,0).\
Subtitle("after")) :StackVertical(a.Crop(0,0,0,-Height(a)/2).Subtitle("Before"),b.\
Crop(0,Height(a)/2,0,0).Subtitle("After"))
Return c
}
See also: BeforeAfterDiff (http://www.amvwiki.org/index.php/BeforeAfterDiff) and BeforeAfterLine (http://www.amvwiki.org/index.php/BeforeAfterLine)
Didée
20th June 2005, 09:08
Don't forget about
interleave( source, filtered )
Makes you see some differences you won't spot with stacking.
Backwoods
20th June 2005, 22:45
One I use:
left=AVISource("CAQ_PLAIN.avs").Crop(360,0,0,0).Subtitle("PLAIN")
right=AVISource("CAQ_V2F_TEST.avs").Crop(0,0,-360,0).Subtitle("V2F_TEST")
#top=AVISource("CAQ_PLAIN.avs").Crop(0,0,0,240).ConvertToYUY2()
#bot=AVISource("CAQ_V2F.avs").Crop(0,240,0,0).ConvertToYUY2()
StackHorizontal(right,left)
#StackVertical(top, bot)
It's more of a labeled split screen, but may come in handy.
HighInBC
20th June 2005, 22:59
Don't forget about
interleave( source, filtered )
Makes you see some differences you won't spot with stacking.
Good idea, never thought of that.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.