gtaylor
28th October 2008, 02:08
You'll see AVS files anyway because they are used to feed the encoder... but if you open them up you should be able to see your script embedded in them.
Thanks all for the help. I understand much better now but am having an issue getting the script to work with dvd-RB pro. The script is used to improve the quality of the non-anamphoric release of the original star wars movie released by Lucas Film in 2006. I have this release and used dvd-decrypter to get the files. I'm using AVS 2.58 and HC encoder. The script was created by G-Force on www.originaltrilogy.com (http://originaltrilogy.com/forum/topic.cfm/GOUT-image-stabilization/topic/9038/). I would like to try to use this to make a better star wars dvd, but am having errors with the script in dvd-rb. HC encoder gives the error "script error: end of file reached without matching }. DVD RB segment viewer shows "script error: syntax error, current.avs, line 54, column 5. The actual script is below. I would appreciate any thoughts anyone might have on what the issue might be. Thanks much.
#######################################################################################
############################ GOUT Filter By G-force V.3.09 ############################
#######################################################################################
########## setup stage
sw_frame_no = 689 # <-----Enter number of first frame of "Star Wars" logo
PAL = false # <-----Set to false for NTSC, true for PAL
Mpeg2Source("C:\Program Files\AviSynth 2.5\Scripts\VTS_03_1.d2v") # <-----Set path
########## cut off some of the black bars for faster processing (but keep mod 16)
PAL==false ? Crop(0,96,0,-96,align=true) : Crop(0,120,0,-120,align=true).AddBorders(8,0,8,0)
########## set black level/gamma, saturation/hue
Levels(10,1.13,255,0,255)
Tweak(sat=1.08,hue=-4)
########## global motion stabilization stage
temp = last.TemporalSoften(7,255,255,25,2)
Interleave(temp.Repair(last.TemporalSoften(1,255,255,25,2)),last)
DePan(last,data=DePanEstimate(last,trust=0,dxmax=1,dymax=0),offset=-1)
SelectEvery(2,0)
########## local motion stabilization/degrain stage
source = last
sigma = 5
filt = source.fft3dfilter(sigma=sigma,sigma2=sigma*.75,sigma3=sigma*.5,sigma4=sigma*.25,sharpen=.3)
temp = temp.Repair(filt,9)
fw_vec2 = temp.MVAnalyse(isb=false,delta=2,pel=2,sharp=1,overlap=4,plevel=0,idx=1,dct=1)
fw_vec1 = temp.MVAnalyse(isb=false,delta=1,pel=2,sharp=1,overlap=4,plevel=0,idx=1,dct=1)
bw_vec1 = temp.MVAnalyse(isb=true, delta=1,pel=2,sharp=1,overlap=4,plevel=0,idx=1,dct=1)
bw_vec2 = temp.MVAnalyse(isb=true, delta=2,pel=2,sharp=1,overlap=4,plevel=0,idx=1,dct=1)
source.MVDegrain2(bw_vec1,fw_vec1,bw_vec2,fw_vec2,thSAD=400,idx=2)
Median1(source,last,filt,chroma="copy first")
last.MVDegrain2(bw_vec1,fw_vec1,bw_vec2,fw_vec2,thSAD=400,thSCD1=200,thSCD2=100,idx=3)
########## sharpening
Contra(last,source)
########## restore stars stage
prest = last
prest.MT_Binarize(threshold=20,upper=true).MT_Expand()
MT_Merge(prest,source,last,chroma="copy first")
prest.Trim(0,sw_frame_no-1)++last.Trim(sw_frame_no,0)
########## anti-aliasing
NNEDI(dh=true,field=1)
########## resize to 16x9 AR, remove sides, add borders
PAL==false ? Spline16Resize(720,384).Crop(8,8,-4,-12,align=true).AddBorders(6,58,6,58)
\ : Spline16Resize(736,448).Crop(12,6,-12,-8, align=true).AddBorders(4,70,4,72)
########## subtitle stage
delay = sw_frame_no-689
f = "Franklin Gothic Medium Cond"
f_col = $ffffff
f_wid = 10
f_pos = PAL==false ? 464 : 557
f_siz = PAL==false ? 38 : 46
Subtitle ("Going somewhere, Solo?",
\ -1,f_pos,70663+delay,70698+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("It’s too late. You should have paid him when you had the chance.",
\ -1,f_pos,70825+delay,70931+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Jabba’s put a price on your head so large...",
\ -1,f_pos,70940+delay,71005+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("...every bounty hunter in the galaxy will be looking for you.",
\ -1,f_pos,71014+delay,71088+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I’m lucky I found you first.",
\ -1,f_pos,71098+delay,71137+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("If you give it to me, I might forget I found you.",
\ -1,f_pos,71203+delay,71282+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("Jabba’s through with you.",
\ -1,f_pos,71365+delay,71406+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("He has no time for smugglers...",
\ -1,f_pos,71435+delay,71489+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("...who drop their shipments at the first sign of an Imperial cruiser.",
\ -1,f_pos,71498+delay,71595+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("You can tell that to Jabba. He may only take your ship.",
\ -1,f_pos,71656+delay,71748+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("That’s the idea.",
\ -1,f_pos,71806+delay,71833+delay,f,f_siz,f_col,font_width=f_wid)
Subtitle ("I’ve been looking forward to this for a long time.",
\ -1,f_pos,71843+delay,71931+delay,f,f_siz,f_col,font_width=f_wid)
#######################################################################################
Function Contra(clip denoised, clip orig)
{# re-write of Didée's contra sharpening routine from TemporalDegrain.avs
Interleave(denoised,denoised.RemoveGrain(12,-1),denoised.RemoveGrain(4,-1))
Clense(reduceflicker=false,grey=true)
SelectEvery(3,1)
MT_MakeDiff(last,last.RemoveGrain(12,-1).RemoveGrain(12,-1))
last.Repair(MT_MakeDiff(orig,denoised),1,-1).MT_LUTxy(last,"x 128 - abs y 128 - abs < x y ?")
denoised.MT_AddDiff(last,chroma="copy first")
Return(last)
}
#######################################################################################
Function Median1(clip input_1, clip input_2, clip input_3, string "chroma")
{# median of 3 clips from Helpers.avs by G-force
chroma = default(chroma,"process") #default is "process". Alternates: "copy first" or "copy second"
Interleave(input_1,input_2,input_3)
chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
SelectEvery(3,1)
chroma == "copy first" ? last.MergeChroma(input_1) : chroma == "copy second" ? last.MergeChroma(input_2) : last
Return(last)
}
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.