tsal
3rd November 2006, 21:58
I´m a fan of autogk, very easy and powerful.
But now i want to learn more about encoding and want more control over the process to finetune my encodings.
I looked at the avisynth scripts autogk creates and tried to modify them to create my own avisynth scripts for encoding with virtualdub.
My first question is about the auto cropping and resizing.
Autogk always uses the same exact script for this, except for 1 line which changes according to the source file used.
The line is:
fixed_aspect = 1.18518518518519
This line changes, depending if the source is pal or ntsc, 4:3 or 16:9.
As i want to use this function in my avisynth scripts too, i need to know all possible values, and when they are used.
My first question is, are there only 4 different values, naming pal 4:3 or 16:9 and ntsc 4:3 or 16:9 ?
So far i have hopefully correct found out:
pal 4:3, fixed_aspect = 1.06666666666667
pal 16:9, fixed_aspect = 1.42222222222222
ntsc 16:9, fixed_aspect = 1.18518518518519
Are these values correct ?
And i am missing the ntsc 4:3 value, because i have no such source available, can someone tell me the exact value ?
Also, do maybe film or hybrid or widescreen also have their own values, or are there only the mentioned 4 values.
My second question:
Autogk uses 1 additional line:
input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0)
From what i could gather, this line is for near 4:3 sources to become fully 4:3 when played back, in some faq mentioned as, so you dont get black borders, when watching these files on a tv.
You can disable this line in autogk´s hidden settings, am i correct that it is safe and ok to remove this line, because i want to have the closest original aspect ratio and dont mind a small black border ?
Now i would like to post my first avisynth script and ask some questions about it:
loadplugin("h:\dgmpgdec148\dgdecode.dll")
loadplugin("h:\plugins\colormatrix.dll")
loadplugin("h:\plugins\autocrop.dll")
loadplugin("h:\plugins\tdeint.dll")
loadplugin("h:\plugins\convolution3dyv12.dll")
mpeg2source("__vid__",cpu=6,info=3)
colormatrix("rec.709->rec.601",opt=0,hints=true)
cropclip = autocrop(mode=0,wmultof=4,hmultof=4,samples=10,threshold=0)
fixed_aspect = 1.06666666666667
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
out_width = 720
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
tdeint(slow=2,opt=0)
autocrop(mode=3,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=0)
lanczos4resize(out_width,out_height)
convolution3d("movielq")
My first question is about colormatrix, autogk uses hints=false, why so ? in the manual it is said that dgdecode can output the color hints and colormatrix then can use them, why doesnt autogk do that ?
Then is it safe to use cpu=6 in mpeg2source to get the best quality ?
And can i use this deinterlacer even with progressive sources, or does it somehow make something bad to the source ?
Please also advise on my script if it is ok, or needs finetuning.
Please help :)
But now i want to learn more about encoding and want more control over the process to finetune my encodings.
I looked at the avisynth scripts autogk creates and tried to modify them to create my own avisynth scripts for encoding with virtualdub.
My first question is about the auto cropping and resizing.
Autogk always uses the same exact script for this, except for 1 line which changes according to the source file used.
The line is:
fixed_aspect = 1.18518518518519
This line changes, depending if the source is pal or ntsc, 4:3 or 16:9.
As i want to use this function in my avisynth scripts too, i need to know all possible values, and when they are used.
My first question is, are there only 4 different values, naming pal 4:3 or 16:9 and ntsc 4:3 or 16:9 ?
So far i have hopefully correct found out:
pal 4:3, fixed_aspect = 1.06666666666667
pal 16:9, fixed_aspect = 1.42222222222222
ntsc 16:9, fixed_aspect = 1.18518518518519
Are these values correct ?
And i am missing the ntsc 4:3 value, because i have no such source available, can someone tell me the exact value ?
Also, do maybe film or hybrid or widescreen also have their own values, or are there only the mentioned 4 values.
My second question:
Autogk uses 1 additional line:
input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0)
From what i could gather, this line is for near 4:3 sources to become fully 4:3 when played back, in some faq mentioned as, so you dont get black borders, when watching these files on a tv.
You can disable this line in autogk´s hidden settings, am i correct that it is safe and ok to remove this line, because i want to have the closest original aspect ratio and dont mind a small black border ?
Now i would like to post my first avisynth script and ask some questions about it:
loadplugin("h:\dgmpgdec148\dgdecode.dll")
loadplugin("h:\plugins\colormatrix.dll")
loadplugin("h:\plugins\autocrop.dll")
loadplugin("h:\plugins\tdeint.dll")
loadplugin("h:\plugins\convolution3dyv12.dll")
mpeg2source("__vid__",cpu=6,info=3)
colormatrix("rec.709->rec.601",opt=0,hints=true)
cropclip = autocrop(mode=0,wmultof=4,hmultof=4,samples=10,threshold=0)
fixed_aspect = 1.06666666666667
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
out_width = 720
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
tdeint(slow=2,opt=0)
autocrop(mode=3,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=0)
lanczos4resize(out_width,out_height)
convolution3d("movielq")
My first question is about colormatrix, autogk uses hints=false, why so ? in the manual it is said that dgdecode can output the color hints and colormatrix then can use them, why doesnt autogk do that ?
Then is it safe to use cpu=6 in mpeg2source to get the best quality ?
And can i use this deinterlacer even with progressive sources, or does it somehow make something bad to the source ?
Please also advise on my script if it is ok, or needs finetuning.
Please help :)