Hey I need convert avi to dvd and don't remember how calculate black borders and add in avisynth. Source Pal, resize avi 640x360 16:9. How should look correct script?
Is the target DVD going to be PAL or NTSC? That affects the proper content and border values, unless (and this is what I'd do, personally) you just do a standard 16:9 anamorphic encode, in which case you won't add borders and simply resize to 720x576 or 720x480, and set the 16:9 flag in the encoding program so that it's flagged correctly.
If you're dead-set on letterboxing to 4:3, then the proper values are: NTSC content: 720x360, borders: 60 pixels PAL content: 720x432, borders: 72 pixels
Since it's MPEG-2 and therefore advisable to make sure the content and borders are all mod16, this means NTSC content: 720x352, borders: 64 pixels PAL content: 720x416, borders: 80 pixels
Getting the content to mod16 in this case can be done by cropping 4 pixels from the top and bottom (NTSC), or 8 pixels from the top and bottom (PAL)? Or, simply ignore the small distortion in the aspect ratio caused by not cropping and just resizing to those values, since you probably won't be able to notice it anyway.
Also, since the source is PAL, with the assumption being a framerate of 25fps, if the target is an NTSC DVD, then you'll have to do one of two things: A) Perform a slowdown/audio length-pitch shift to 23.976fps and then use standard 23.976->29.97 pulldown flags. B) Encode without pulldown flags, leave the audio alone, and then use DGPulldown to set custom 25->29.97 flags.
B is more preferable since it keeps the audio pitch the same and NTSC viewers are already accustomed to the slight pulldown stutter (which would also be there for 23.976->29.97)?