Forum Archive Home -> DVD Ripping -> DVD to AVI resizing problem
DVD to AVI resizing problem | ||||||||
| okman posted 2009 Sep 21 02:51 | ||||||||
| 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) | ||||||||
| Baldrick posted 2009 Sep 21 03:05 | ||||||||
| 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. | ||||||||
| manono posted 2009 Sep 21 03:46 | ||||||||
| 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. | ||||||||
| Gavino posted 2009 Sep 21 05:02 | ||||||||
| 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. | ||||||||
| okman posted 2009 Sep 21 06:35 | ||||||||
| 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) | ||||||||
| jagabo posted 2009 Sep 21 06:55 | ||||||||
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. | ||||||||
| manono posted 2009 Sep 21 07:43 | ||||||||
Upgrade your AviSynth.
After the IVTC it's no longer interlaced.
For encoder efficiency both height and width should be divisible by 16. But once made progressive they only have to be divisible by 2. | ||||||||
| Gavino posted 2009 Sep 21 07:45 | ||||||||
The minimum requirement is height/2 should be an integer. 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.
See above, but if you are applying IVTC, your video is progressive by the time you resize it. (I missed that earlier.)
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. | ||||||||
| creamyhorror posted 2009 Sep 21 08:01 | ||||||||
| 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. |
Login/Register to our forum to be able to post here.
