Hi all,
A little help required here please
I read in this
thread about placing common routines in a
.avsi file in the Avisynth plugins directory, and calling it as a function.
With this in mind, I decided to cut the MA script in half and treat the main process as a function, like so;
Code:
####
#
function MAroutine(clip c, int width, int height) {
undot()
Limiter()
GripCrop(width,height)
GripSize(resizer="LanczosResize")
STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(1.5))
MergeLuma(blur(0.1))
#
#
## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual )
# This will apply variable temporalsoften
# and variable blur.
# Both filters are active at all times, and work inversely proportional to the
# activity, measured from current frame to next frame.
ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")
#
#
#
GripBorders()
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()
return c
}
#
#
## Functions ###
function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}
That could then be left alone and I could just amend a small calling script each time, like so;
Code:
(Johnny.avs)
####
## Main section and static filters ###
#
Mpeg2Source("C:\Movies\Johnny\johnny.d2v")
#
width=544
height=576
MAroutine(width, height)
#
####
Or so I thought
First problem,
I tried opening the script in Media Player and VirtualDub. Both gave me an error saying that undot contained the incorrect number of parameters. I amended the
"function" to include the clip (c) as a parameter.
Second problem,
The movie is now upsidedown and mirror image
Can somebody else give this a try and let me know what I'm doing wrong.
Thnx guys