gtaylor
28th January 2009, 04:35
Hi all,
I'm trying to use DVD Rebuilder Pro with an avisynth script to make a better version of the non anamphoric Star Wars dvd from Lucasfilm and am running into an issue. This script was written by G-Force on the Original Trilogy forums. Severall other there have got this to run great, but using DVD Rebuilder I am unable to get it to work. Using DVD Rebuilder 1.28, HCEncoder .23, Avisynth 2.5.8. When I run the encoder, HCencoder fails with the error "Script error: end of file reached without matching }". Eventually HCEncoder will abort. I also own CCE Basic and it doesn't crash but the encode runs in like 3 minutes so it's not doing anything. When I run this using manual tools and the HC Encoder GUI version, it completes the encoding. Takes about a week, but does the does the full encode. So I'm trying to find out why this doesn't work with DVD Rebuilder and two different encoders, but will work when doing the GUI version of HCEncoder? Here is the current.avs file:
#------------------
# AVS File Created by DVD Rebuilder
# VOBID:01, CELLID:07
#------------------
LoadPlugin("C:\Program Files\DVD-RB PRO\DGDecode.dll")
mpeg2source("D:\DVDWORK\D2VAVS\V01.D2V",idct=3)
#######################################################################################
############################ GOUT Filter By G-force V.3.17 ############################
#######################################################################################
########## 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,bt=5,sharpen=.3)
Median1(source.RemoveGrain(12),temp,filt)
fw_vec2 = last.MVAnalyse(isb=false,delta=2,pel=2,sharp=1,overlap=4,plevel=0,idx=1,dct=1)
fw_vec1 = last.MVAnalyse(isb=false,delta=1,pel=2,sharp=1,overlap=4,plevel=0,idx=1,dct=1)
bw_vec1 = last.MVAnalyse(isb=true, delta=1,pel=2,sharp=1,overlap=4,plevel=0,idx=1,dct=1)
bw_vec2 = last.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=300,thSCD1=150,thSCD2=75,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")
########## additional "Lucasfilm" and "Along time ago..." stabilization
########## DELETE THE NEXT LINE IF USING ON ESB OR ROTJ as I have not yet determined the correct frame numbers for those
prest.Trim(0,sw_frame_no-425)++prest.Trim(sw_frame_no-424,sw_frame_no-1).TemporalSoften(3,255,255,25,2)++last.Trim(sw_frame_no,0)
########## anti-aliasing
last.EEDI2().Repair(last.NNEDI(dh=true,field=1),9)
########## 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
trim(16344,22143)
ConvertToYV12()
Sorry for the long post, but I'm really at a loss on this one. Thanks
I'm trying to use DVD Rebuilder Pro with an avisynth script to make a better version of the non anamphoric Star Wars dvd from Lucasfilm and am running into an issue. This script was written by G-Force on the Original Trilogy forums. Severall other there have got this to run great, but using DVD Rebuilder I am unable to get it to work. Using DVD Rebuilder 1.28, HCEncoder .23, Avisynth 2.5.8. When I run the encoder, HCencoder fails with the error "Script error: end of file reached without matching }". Eventually HCEncoder will abort. I also own CCE Basic and it doesn't crash but the encode runs in like 3 minutes so it's not doing anything. When I run this using manual tools and the HC Encoder GUI version, it completes the encoding. Takes about a week, but does the does the full encode. So I'm trying to find out why this doesn't work with DVD Rebuilder and two different encoders, but will work when doing the GUI version of HCEncoder? Here is the current.avs file:
#------------------
# AVS File Created by DVD Rebuilder
# VOBID:01, CELLID:07
#------------------
LoadPlugin("C:\Program Files\DVD-RB PRO\DGDecode.dll")
mpeg2source("D:\DVDWORK\D2VAVS\V01.D2V",idct=3)
#######################################################################################
############################ GOUT Filter By G-force V.3.17 ############################
#######################################################################################
########## 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,bt=5,sharpen=.3)
Median1(source.RemoveGrain(12),temp,filt)
fw_vec2 = last.MVAnalyse(isb=false,delta=2,pel=2,sharp=1,overlap=4,plevel=0,idx=1,dct=1)
fw_vec1 = last.MVAnalyse(isb=false,delta=1,pel=2,sharp=1,overlap=4,plevel=0,idx=1,dct=1)
bw_vec1 = last.MVAnalyse(isb=true, delta=1,pel=2,sharp=1,overlap=4,plevel=0,idx=1,dct=1)
bw_vec2 = last.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=300,thSCD1=150,thSCD2=75,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")
########## additional "Lucasfilm" and "Along time ago..." stabilization
########## DELETE THE NEXT LINE IF USING ON ESB OR ROTJ as I have not yet determined the correct frame numbers for those
prest.Trim(0,sw_frame_no-425)++prest.Trim(sw_frame_no-424,sw_frame_no-1).TemporalSoften(3,255,255,25,2)++last.Trim(sw_frame_no,0)
########## anti-aliasing
last.EEDI2().Repair(last.NNEDI(dh=true,field=1),9)
########## 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
trim(16344,22143)
ConvertToYV12()
Sorry for the long post, but I'm really at a loss on this one. Thanks