logo Sign In

Post #437006

Author
Oldschooljedi
Parent topic
Guide to convert the GOUT DVD from 4:3 to 16:9 using freeware-tools
Link to post in topic
https://originaltrilogy.com/post/id/437006/action/topic#437006
Date created
2-Sep-2010, 3:33 AM

I made some encodings with DVDRebuilder but more than a year ago. I cannot remember how I made it exactly but as far as I can remember I used the script like that:

 

 

#######################################################################################
#################### GOUT Filter By G-force V.14.05 USE ONLY ON ANH ###################
#######################################################################################

########## setup

########## cut off some of the black bars for faster processing (but keep mod 16)
Crop(0,96,0,-96,align=true)

########## black level/gamma, hue
Levels(10,1.08,255,0,255).Tweak(hue=-3)

########## de-ring
pm = last
h4 = pm.RemoveGrain(4,-1)
Median1(pm,  MT_Convolution(horizontal="1",vertical="  0 0 0 1 0 .1 -.1"  ,chroma="copy first"),h4,Chroma="copy first")
Median1(last,MT_Convolution(horizontal="1",vertical="0 0 0 0 1 0 0 .1 -.1",chroma="copy first"),h4,Chroma="copy first")
Contra(last,pm)

########## global motion stabilization
orig = last
temp = orig.TemporalSoften(3,255,255,25,2)
int  = Interleave(temp.Repair(orig),orig)
DePan(int,data=DePanEstimate(int,trust=0,dxmax=1,dymax=0),offset=-1)
SelectEvery(2,0)

episode==5 ? last.Trim(0,92103)++orig.Trim(92104,93601)++last.Trim(93602,0) : last

########## local motion stabilization/degrain stage
source  = last
sigma   = 5
fft     = source.FFT3dFilter(sigma=sigma,sigma2=sigma*.75,sigma3=sigma*.5,sigma4=sigma*.25)

fft.Clense(grey=true)
filt    = Contra(last.Repair(fft,2,-1),last).MergeChroma(source)

idx1    = filt.MSuper(pel=2,sharp=1)
bw_vec1 = MAnalyse(idx1,isb=true, delta=1,overlap=4,plevel=0,dct=1)
fw_vec1 = MAnalyse(idx1,isb=false,delta=1,overlap=4,plevel=0,dct=1)

idx2    = source.MSuper(pel=2,sharp=1,levels=1,chroma=false)
pcorr   = source.MDegrain1(idx2,bw_vec1,fw_vec1,thSAD=800,thSCD1=150,thSCD2=75,plane=0)
corr1   = Median1(source,pcorr,filt,chroma="copy first")

idx3    = corr1.MSuper(pel=2,sharp=1,levels=1,chroma=false)
corr1.MDegrain1(idx3,bw_vec1,fw_vec1,thSAD=400,thSCD1=150,thSCD2=75,plane=0)

Median1(corr1,last,filt,chroma="copy first")

Contra(last,source)

########## restore stars
prest = last
prest.MT_Binarize(threshold=20,upper=true,chroma="copy first").MT_Expand(chroma="copy first")
MT_Merge(prest,source.MT_Logic(pcorr,"max",chroma="copy first"),last,chroma="copy first")

########## additional "Lucasfilm" and "Along time ago..." stabilization
prest.Trim(0,265)++prest.Trim(266,687).TemporalSoften(3,255,255,25,2)++last.Trim(688,0)

########## anti-alias
NNEDI2(dh=true, field=0)
NNEDI2(dh=false,field=1)

########## resize to 16x9 AR, remove sides, add borders
Spline16Resize(728,388).Crop(8,10,-4,-14,align=true).AddBorders(2,58,2,58)

 

#######################################################################################

#######################################################################################
Function Contra(clip denoised, clip orig)
{# re-write of Didée's contra sharpening routine from TemporalDegrain.avs

rg12d = MT_MakeDiff(denoised,denoised.RemoveGrain(12,-1))
rg12d.Repair(MT_MakeDiff(orig,denoised),9,-1).MT_LUTxy(rg12d,"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)
}

 

Copy this an paste it into the filter editor of DVDRB.

Unselect 'one click mode' in DVDRB and hit the 'prepare' button.

You get several avs-files in the working folder that DVDRB creates, for every DVD chapter one file.

As far as I can remember you have to delete the last line in EVERY little script that RB created, but ONLY for the main movie, otherwise the lego commercial is unwatchable.

Choose another working folder in DVDRB and delete the script in the filter editor of DVDRB. Then make a second 'prepare' phase and copy/paste the avs files for the extras (lego commercial etc.) from you second working folder into the first working working folder you created. Just a important reminder: delete the last line of the avs scripts for the main movie in your working folder you first created otherwise the video is wrong resized.

You should preview the scripts in media player classic before you encode.

I cannot remember exactly if I made my few encodings like my little description here, it was too long ago. I really recommend to do the encodings like described in my first tutorial. If you decide to make it with DVDRB this is all help I can give. Good luck!

I forgot: DVDRB gives you the selectable subtitles, no need to use the subitle work in g-force's script here.