logo Sign In

dgindex>gordian knot>.avs file= wrong aspect ratio?

Author
Time
 (Edited)

well first thanks for all the help from everyone. i have gotten to the point of making an avs script to use in virtual dub and output my source to lagarith avi lossless. i am having a problem with the aspect ratio. after output the avi is 3:2  the first step dgindex  shows the status box as it is making the d2v file it says 16:9. then i put it into gordian knot to make the avs file. i see no aspect ratio settings in gk. i open up the avs script in notepad and i see no aspect ratio setting. only crop and resize i tried messing with those and nothing changed. i tried the avs script in tmpgenc and vdub=same results. what am i missing here? why does it output a 3:2 ratio when the source is 16:9?  here i will post the avs script. everything else seems ok the deinterlace is working bringing it to 23.976 progressive where i need it.

# Created with Gordian Knot
#
# http://gknot.doom9.org

#  PLUGINS
LoadPlugin("C:\PROGRA~2\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\UnDot.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\dgbob.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\Convolution3d.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\FluxSmooth.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\SimpleResize.dll")

#  SOURCE 1\VTS_02_1.d2v")

#  TRIM
#trim(startframe,endframe)

#  IVTC
#Telecide(order=1,guide=1).Decimate()
#  or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)

#  DEINTERLACING (1)
FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)

#  DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
#  or maybe
#DGBob(order=1,mode=0)

#  DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()

#  CROPPING
#crop(0,0,720,480)

#  SUBTITLES
#VobSub("FileName")

#  RESIZING
#LanczosResize(704,386)

#  DENOISING: choose one combination (or none)
Undot()

#  1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)

#  2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)

#  3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)

#  BORDERS
#AddBorders(left,top,right,bottom)

#  COMPRESSIBILITY CHECK
#  !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)

#  FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)

believe in the ball and throw yourself!

Author
Time

long story short i end up with the picture in a box. black boarder,s on all sides. i am getting somewhere finally though thanks to the good folks here at ot.com.

believe in the ball and throw yourself!

Author
Time

I don't know shit about avisynth, so take this with a heaping mound of salt.

But doesn't this line indicate that you're adding black borders on all sides?

#  BORDERS
#AddBorders(left,top,right,bottom)

Author
Time

No, because all lines starting with the "#" symbol are comments, and are ignored by AviSynth.

An aspect ratio of 3:2 is correct - this is DVD resolution in pixel terms (720 x 480). When you encode back to MPEG-2 for DVD, you will specify a display aspect ratio of 16:9.

If you want to preview your video in VirtualDub at the correct AR, just right-click on the image and select view->16:9.

One other point - you say "the deinterlace is working bringing it to 23.976 progressive". Can you explain what this means? You might be confusing deinterlacing with IVTC. If the framerate is already 23.976 because you used "force film" in DGIndex, then you do not need the FieldDeinterlace() line in the above script.

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here

Author
Time
 (Edited)

First, as Moth said, get rid of FieldDeinterlace

Second, since your picture isnt coming out right, ala looking squished or OFF

You need to adjust the values in the upper left and upper middle portion of the cropping/resize section of GK, these are for you to input the source material standard and select the DAR i believe

Also, in another tab of GK, if the DVD is anamorphic, I believe you have to UNTICK the box that says to encode to 601 standards, i forget what part of GK this is called, but just look for the check box

Adjusting these parts should help with your rip

Moth3r said: No, there is no video embedding option in this forum software (thank god!)

 

Author
Time

ok yeah i realize you guys are right about the field deinterlace and got rid of that. compmovieguy i believe the settings you are speaking of in gordian knot are for the xvid/divx encoding in gordian knot. corrrect me if i am wrong. but i am using gk to create the avs script which i load into vdub to encode to lagarith. so these settings are not changing anything. and moth3r if 3:2 is correct i am confused. most dvd,s i watch have a dar of 16:9. i tried using vegas to set the dar to 16:9. all that did was give me a 16:9 dar of the picture i loaded into vegas with black bars on the sides. i believe the picture needs to be 16:9 to display at 16:9. so those black bars on the sides need to be gone before i load my lagarith into vegas. i am missing something crucial here. nothing in the gk settings has made a difference it is set to 16:9 in the middle column and the crop is turned off. thanks for the continued effort at helping me but i still have black side boarders after trying these steps.

believe in the ball and throw yourself!

Author
Time
 (Edited)

here is the new script

# Created with Gordian Knot
#
# http://gknot.doom9.org

#  PLUGINS
LoadPlugin("C:\PROGRA~2\GORDIA~1\DGMPGDec\DGDecode.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\UnDot.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\dgbob.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\Convolution3d.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\FluxSmooth.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\SimpleResize.dll")

#  SOURCE
mpeg2source("\Desktop\vob dgindex attempt\vob 1\VTS_02_1.d2v")

#  TRIM
#trim(startframe,endframe)

#  IVTC
#Telecide(order=1,guide=1).Decimate()
#  or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)

#  DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)

#  DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
#  or maybe
#DGBob(order=1,mode=0)

#  DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()

#  CROPPING
crop(0,0,720,480)

#  SUBTITLES
#VobSub("FileName")

#  RESIZING
LanczosResize(720,480)

#  DENOISING: choose one combination (or none)
Undot()

#  1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)

#  2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)

#  3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)

#  BORDERS
#AddBorders(left,top,right,bottom)

#  COMPRESSIBILITY CHECK
#  !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)

#  FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)

i tried to take a snapshot in vlc but the picture had cropped the side bars. if i load a clip of the video after using this script into vegas or premier and set the dar to 16:9 it just gives me the same black boarders on the sides but changes the dar from 3:2 to 16:9 so there is a problem with the way the avs script is being made right? i tried to manually adjust the crop setting in the avs script to crop out the side bars but vdub gave error saying cant us crop to increase size. could it be i need to change something in the d2v file before i make the avs file?

believe in the ball and throw yourself!

Author
Time

i now tried the vob directly in vdub with mpeg2 support bypassing the avs script all together and it still output to 3:2. so moth3r must be right but how do get rid of the black bars? i loaded my test file into vegas which will most likely be what i edit it with and chose the ntsc template made sure to set it to 16:9 and it outputs with the bars so i am lost.

believe in the ball and throw yourself!

Author
Time

ibleedspeed said:

moth3r if 3:2 is correct i am confused. most dvd,s i watch have a dar of 16:9. i tried using vegas to set the dar to 16:9. all that did was give me a 16:9 dar of the picture i loaded into vegas with black bars on the sides.

Oh, I think I see what's up.

16:9 DVDs aren't actually 16:9.  They're 3:2, stretched vertically (so people look skinnier and taller).  When you put it into a DVD player, there's a flag encoded into the video that tells the player to stretch it out - on a 4:3 TV, it squishes it vertically, adding black bars on the top and bottom that are generated by the player; on a 16:9 TV, they stretch it out horizontally to fit in the 16:9 frame without adding any black bars.  This is what's known as anamorphic widescreen (on video, at least - on film, anamorphic widescreen is a different beast, though the principle is similar).

4:3 DVDs are technically 3:2 (720x480) as well, but the pixels are rectangles instead of squares.  If the pixels were squares, it would be 640x480.

So what you need to do is just work with the stretched 720x480 video (there might be an option in your editing program to change the monitors to 16:9 so you can see it properly, but the file will still be 720x480), and when you've finished and are building the DVD, make sure that you give the video the proper 16:9 anamorphic flag.

Author
Time

i see ash. this is what i didnt get. i am rendering a clip out of vegas right now. i think i had the wrong template set before. now it all makes since.  but will working with the 3:2 video in vegas cause a problem with the subs since i will be manually adding those in vegas like you said wont it stretch the subs after rendering? i am getting ahead of myself on that i think. so much info my little brain is gonna blow up! lol. this is fun though i like trouble shooting.

believe in the ball and throw yourself!

Author
Time
 (Edited)

Well, doing the subs in Vegas means they'll be burned into the movie, not a new subtitle file.  And if you can set the monitors to display the movie in 16:9 correctly (I know this can be done in Avid and Final Cut, but like I've said before, I have never used Vegas, so I don't know about that one), then you'll be watching the movie in the correct aspect ratio and should be able to add the subs properly that way.  When you render it out as 720x480, the subs will be stretched vertically, like they were supposed to.

I don't know, though, I'm definitely not the best person to ask about that.

Also, you could render out the lossless AVI at 854x480 (with square pixels), which is 16:9, and work with it in Vegas that way, so you don't have to worry about the anamorphic issue until you're done and go to make the DVD.  It'll probably make the encoding from MPEG-2 to Lagarith/huffyuv AVI take quite a bit longer, though.

Author
Time

yes! that makes since i do believe vegas has the monitor feature as well. i am done with the mpeg2 render now for testing and about to put it into my dvd author to see it all work. update in a little while. thanks ash,moth3r,compmovieguy.

believe in the ball and throw yourself!

Author
Time

nope this is not working. i am still confused. as far as letting the dvd author scale it to 16:9 it does not work. when i add the 3:2 clip into vegas and render out to mpg2 on a 16:9 ntsc template its still going to show the black bars. in vegas i can go to project properties there is a setting there called pixel aspect ratio. if i change that to 0.9091(dv ntsc). it almost works but there is still about 1/8 inch of black on the sides. i dont think this is what needs to be done. it should be showing no black on the sides before i put it in vegas. so i will now try ash,s suggestion of 854x480.

believe in the ball and throw yourself!

Author
Time

that does not work either. vdub will not allow for oversizing in the avs script.  well i am stuck until someone can tell me the proper way to do this. the question remains how do i get the 3:2 source to be 16:9 before i edit it?

believe in the ball and throw yourself!

Author
Time
 (Edited)

It does not have to be 16:9 to edit it, who told you that, just keep it the way it is, straight from the retail DVD, you do all your editing that way, then when done let the encoder make it 16:9, you really need to read ADigitalMan's edit Guide, it DOES work, that is how I did my Edits, and I have done a few of them.

I must not be seeing exactly what you are trying to do, but if you are editing Kill Bill with Kill Bill 2, why are you making it 16:9? don't even worry about that until the editing is finished, but you WILL have to make sure that both sources are the same fps, I prefer 23.976 myself, then let the encoder add the flags, as well as the 16:9, and those sample scripts you are showing above, way to cluttered.

So unless there is some other reason why this has to be set to 16:9 now I am not getting, I would not worry about that yet.

reading through some of this some more it is really hard to tell exactly what you are trying to do, you mention a few things, if I was you, I would just slow down a bit, and take 1 thing at a time, especially if this is the first time using avisynth, this would be the best way to approach this, in my opinion.

Author
Time

 i understand this is a 16:9 film crammed into a 3:2 aspect ratio but i have tried rendering it to 16:9 from vegas and it makes the whole thing 16:9 not just the video part. let me try to state this so its easier to understand. the goal as you know is to have the video look the way it did on the dvd this means black bars on top and bottom but none on the sides. so step by step now. i created my script using gk as for cluttered that is the way gk makes it i have never made a script manually. i then load the avs script to virtualdub and render out to lagarith. at this point the forced film setting in dgindex has made 23.976 fps. the avi is 720x480 3:2. i then load the clip to vegas and have tried various dvd templates they are all 16:9. this is all testing phase now so i am rendering a 2 minute clip from vegas. no matter what 16:9 template i use the render has ended up as a 16:9 dar with a 3:2 picture in it. at what point do the flags come in?  where are these in vegas? i get that the dvd includes a flag to tell the player to display the 3:2 frame in 16:9. i just do not know how to add the flag back to a finished edit.i will be rendering the final edit out of vegas to mpeg2 for authoring with dvd architect. dark jedi said"let the encoder add the flags and the 16:9" does anyone know how to apply these flags? since vegas is my encoder for the edit that must mean vegas must apply the flags right? so i think  thats the only thing i dont understand is the flag setting in vegas.

believe in the ball and throw yourself!

Author
Time

i have tried google on this subject and there is not much help. it just added to my confusion. from what dark jedi said the encoder must add the flag. or am i lost and it is the dvd author that adds the flag? as i understand it a flag and a template are 2 different things. so i have trouble finding any flag settings in vegas or dvd architect. i see 16:9 templates but that just gives me 3:2 in16:9. so what i need to know is which program adds the flags and where are these flag settings? i am going back to poke around in vegas now to try and figure it out but i have not seen those flag settings yet.

believe in the ball and throw yourself!

Author
Time

um yeah i do not see any flag settings in vegas or dvda. what i did read was that people use ifo edit to set flags. but here is my problem with that. vegas and dvda use either a 4:3 or a 16:9 template. i dont think there is a template for 3:2 lol so when i render from dvda i have to choose either 4:3 or 16:9. i then opened the ifo with ifo edit to try and set the flag to 16:9 and you guessed it its already 16:9. this is hard i am not even close to understanding how to do this.  if vegas or dvda has no flag settings then how am i supposed to get it to display right? i know there is a solution.

believe in the ball and throw yourself!

Author
Time

I have to admit I am very confused on what exactly you are trying to do here, are you trying to make a lossless avi file first to make all your edits on? and I don't use Vegas for editing, so I was unaware that Vegas can encode, I know it can render, I use CCE SP2 for encoding, and CCE SP2 does the pulldown and sets my encode to 16:9, so I guess what I am asking is this, are you trying to make a lossless avi from your DVD of Kill Bill? if so that is so easy it is not even funny, but I need to know if that is what you are after first.

Author
Time

i am using lagarith avi in vegas and yes it is easy. all i want is to edit my movies in vegas and have them display correctly on a tv. i have passed the point of encoding to lagarith. my source kill bill comes out in lagarith as a 3:2 file. as i understand a flag on the dvd tells the player to display it at 16:9. so how do get from my edit in vegas to a 16:9 dvd like it is supposed to be?

 

believe in the ball and throw yourself!

Author
Time

i think i see what you mean dj. so i edit it in vegas and output again as lossles avi then encode it to mpeg2 in cce which is what adds the display flag is that correct?

 

believe in the ball and throw yourself!

Author
Time

ok i am in cce and have loaded the test clip which is lagarith avi. do i choose "dvd film pulldown" or "dvd film pulldown detection"?

believe in the ball and throw yourself!

Author
Time
 (Edited)

finally! the answer i was looking for dark jedi thankyou! even after i was an ass to you you helped and made my day. that says a lot about your character.i encoded my test clip in cce and chose the settings 16:9 and 3:2 pulldown and it worked the test clip plays in vlc as intended. just one more question. the clip has a small amount of black near the side edges. how do i fix that?

believe in the ball and throw yourself!

Author
Time

Just leave it, you won't see that on your TV at all.

Author
Time

Most DVD transfers have a small amount of black bars on the sides.  It's not a big deal at all, just leave it be, as DJ said.