PDA

View Full Version : Help adjusting closeup selection


trolltuning
3rd July 2004, 19:07
I used the following script to make an overlay (then cropped away the borders with null transform and crop in VirtualDub). I would like to set up the script so I can adjust the area I'm selecting, but I'm confused over whether to use animate, selectrange, conditional filter? and how to write the script.
If I want to rewrite it so its easy to change the area say
1)move selected area R 40 pixels during frames 740-790, L 75 pixels during frames 840-900 then R 40 during 1000-1085
how would I do that?
# File: D:\aaaCharles\redo\resizeturns4.avs (unsplitted)
#==============================================================
# AVISynth-Script to generate Stream: [DVD (NTSC 720x480)]
# created from [AviScript] at: 23.06.2004, 00:10
#==============================================================

# 01___________________________________________________________
# Variables generated by AviScript
video = "D:\aaaCharles\redo\resizeturns2.avs"
audio = ""
masktop = 64
maskbuttom = 284
maskleft = 254
maskright = 306
#End01

# 02___________________________________________________________
# Load AviSynth PlugIns
# DLL - for mpeg2source, SmartDeInterlace and TemporalSmoother
LoadPlugIn("C:\Program Files\AviScript 2.8 (Fullversion)\PlugIns\mpeg2dec.dll")
#End02

# 03___________________________________________________________
# Load Video & Audio
# read AVI videostream
AviSource(video)
# Set userdefined YUY2 - Colorspace
ConvertToYUY2()
#Import("
trim(3125,0)
# 06___________________________________________________________
# Filtering
# deinterlace with SmartDeInterlace
ConvertToYUY2().SmartDeinterlace(2,15,false,false,false)
#End06

# 07___________________________________________________________
# Resize [DVD (NTSC 720x480)]
bicubicresize(720,480)
#End07

# 08___________________________________________________________
# Masking
# mask Top and Buttom
Letterbox(masktop,maskbuttom)
# mask Left and Right (width and height are variables of AviSynth)
maskwidth=(width-maskright)-maskleft
maskheight=height
crop(maskleft,0,maskwidth,maskheight)
addborders(maskleft,0,maskright,0)
#End08

#EndAll