i'm trying to write avisynth script for making LanczosResize in virtualdub, however the virtualdub will automatically close when i opened the avs file in virtualdub, below is my avs script and the video source is DVD (NTSC 16:9, 720x480), i just want to convert it to avi format, i think that 720x405 (16:9) is the right display ratio, after that, i have searched some articles about the resizing, someone used 720x404 for resizing the video, then i tried to open the avs file in virtualdub by this display ratio, it works!!! so does any one ans me what's the problem of my avs script, it seems the problem is come from the display ratio...please help, thanks...
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
MPEG2Source("C:\test.d2v") <--- generated by DGindex 1.55
Telecide(post=0, guide=1, blend=false, show=false)
Decimate(cycle=5, quality=3, mode=3)
Crop(0,6,720,468)
LanczosResize(720,405)
+ Reply to Thread
Results 1 to 11 of 11
Thread: DVD to AVI resizing problem
Thread
-
I guess the size must divisible even by at least 2 or the best is probably divisible by 16. So 405=202.5 = not even. Try instead 404,406 or best 400.
But since you've cropped away the black bars to the tune of 6 rows from the top and 6 rows from the bottom, it's not a 1.78:1 movie but more like 1.85:1 and it should be resized to 720x384:
LanczosResize(720,384)
As Baldrick says, you should usually resize to Mod16 (height and width divisible by 16). Your original 405 is completely wrong. No YV12 source (like DVDs) can be resized to an odd number.
Which version of Avisynth are you running?
You should have got an error message:
"Resize: YV12 destination height must be multiple of 2."
instead of crashing VDub.
Note that for interlaced sources, a multiple of 4 is needed (though Avisynth won't enforce that), so 406 would also be wrong. In fact, if your source is interlaced (you don't say), your crop would have to be mod4 too, cropping 6 lines is going to reverse the field dominance.
thanks for your helping all guys...
oh, i think i'm wrong, Is YV12 destination height should be divided by 2 or 4 to get integer number?
i'm using ver 2.52 of avisynth, nothing message i have got, it just automatically close when i open the avs file. my DVD source is Interlaced video, so i should amend the height to be divisible by 4 if it is an interlaced video? am i right?
i have yet another question is that my understanding of resizing rule (for 16:9 video) is width and height should be divisible by 16 and 9 respectively, is it right? or this rule cannot be applied in YV12 format?
below is my amended avs script: (it works very well in vdub and i cross out the cropping script)
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
MPEG2Source("C:\test.d2v")
Telecide(post=0, guide=1, blend=false, show=false)
Decimate(cycle=5, quality=3, mode=3)
LanczosResize(720,404)
Even worse, the luma channel will still have the same field dominance, but the chroma channels' field dominance will be reversed. So the wrong colors will be applied to the two fields.Originally Posted by Gavino
Upgrade your AviSynth.Originally Posted by okman
After the IVTC it's no longer interlaced.my DVD source is Interlaced video
For encoder efficiency both height and width should be divisible by 16. But once made progressive they only have to be divisible by 2.so i should amend the height to be divisible by 4
The minimum requirement is height/2 should be an integer.Originally Posted by okman
If interlaced, then same goes for height/4.
And for encoding purposes it is recommended that height/16 be an integer too.
You should upgrade to the latest version 2.58, which is more robust and does more error checking, as well as having more built-in filters.i'm using ver 2.52 of avisynth, nothing message i have got, it just automatically close when i open the avs file.
See above, but if you are applying IVTC, your video is progressive by the time you resize it. (I missed that earlier.)my DVD source is Interlaced video, so i should amend the height to be divisible by 4 if it is an interlaced video? am i right?
To get an exact 16:9 ratio, then yes, but as long as width/height is close to 16/9, you won't really notice the difference. It's more important (indeed, necessary) to satisfy the mod2/mod4 rule.i have yet another question is that my understanding of resizing rule (for 16:9 video) is width and height should be divisible by 16 and 9 respectively, is it right? or this rule cannot be applied in YV12 format?
If you're just trying to make an AVI from the DVD, why don't you use Handbrake or a similar tool? They are specifically designed to do this sort of thing.
If you do it manually in VirtualDub/Avisynth, you have to calculate the post-cropping aspect ratio yourself, like manono said. In this case, you should resize to 720x384.
in the resize script you forgot to put the - in... i.e. Crop(0,6,720,468)
should be crop(0,6,-720,-468) but this would basically delete your video cropping your 720 wide to 0 and 468 high to 0 giving you no picture you might want to do
crop(0,6,-0,-0)
Lanczosresize(720,400)
You can do it at least 3 different ways, none of them the way you did it. You can:
Crop(0,6,0,-6)
LanczosResize(720,384))#or LanczosResize(Width,384)
or:
Crop(0,6,720,468)
Lanczosresize(720,384)#or LanczosResize(Width,384)
or:
LanczosResize(720,384,0,6,720,468)
And if a crop value is zero, you don't need to put the negative sign before it, no matter where it is in the list of crops.
Similar Threads
-
Resizing AVI to fit DVD
By hockeytown_rox in forum Newbie / General discussionsReplies: 7Last Post: 21st Dec 2006, 06:55 -
Resizing an AVI?
By jeffonthego in forum EditingReplies: 5Last Post: 7th Aug 2003, 00:39 -
Resizing avi
By JN in forum Video ConversionReplies: 1Last Post: 28th Aug 2002, 03:46 -
problem resizing avi files for mpg to make vcd
By lilt in forum Video ConversionReplies: 7Last Post: 11th Aug 2002, 06:12 -
VDub resizing DV avi file problem,please help!
By Frank Yu in forum Video ConversionReplies: 2Last Post: 17th Jan 2002, 07:42
Newest guidesLatest tool updatesNew media commentsRecent DVD HacksVSO Software ConvertXtoDVD lets you convert any video like AVI,MKV to DVD easily. More info or download trial! About   Advertise   Forum   Forum Archive   RSS Feeds   Statistics   Tools   



Quote