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
-
-
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) -
Originally Posted by Gavino
-
Originally Posted by okman
my DVD source is Interlaced video
so i should amend the height to be divisible by 4 -
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.
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? -
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
-
Problem resizing with avidemux
By crazy3d in forum EditingReplies: 0Last Post: 20th Nov 2010, 10:54 -
Avi resizing or creating quick dvd using avidemux
By striker9 in forum Video ConversionReplies: 13Last Post: 2nd Nov 2010, 11:01 -
problem resizing
By w3wt in forum Video ConversionReplies: 3Last Post: 24th Sep 2010, 07:35 -
problem resizing movie
By goatvideo in forum Newbie / General discussionsReplies: 3Last Post: 21st Jun 2009, 18:58 -
Avisynth resizing/letterboxing problem
By czerro in forum Authoring (VCD/SVCD)Replies: 3Last Post: 3rd Jan 2008, 14:29