Log in

View Full Version : problem making a script


Van the man
16th December 2005, 22:05
Hey

I want to make an dvd out of my .avi file.the .avi file is ntsc 23.976 and 960x528 (1.82:1) [=20:11]. How can I get the correct borders and bicubicresize? I want an ntsc dvd.

Would be great if someone could help ;)

Manao
16th December 2005, 23:32
Ok, lets assume your AVI doesn't have black borders and its AR is indeed 1.82:1 ( hence no AR is written by the codec in the AVI ).

You want a NTSC DVD, 16/9, which means that 720x480 will have an source aspect ratio of 16/9 / (3/2) = 32:27. That means pixels are rectangular and will be streched horizontally by 32/27. So in order to get an AR of 20:11, you need to have a resolution in the 720x480 frame whose width / height ratio is 20/11 / (32/27) = 135/88.

135/88 ~ 1.53, so you'll need to add vertical borders only. 720 * 88 / 135 ~ 469, so your vertical resolution should be 469 ( and you should add black borders to fill to 480 ). But, doing so is not very good, because there'll be a black border across a line of macroblock, which will lead to annoying artifacts after encoding. So you'd better reduce that to 464, and add a 8 pixels borders at the top and the bottom of your video.

Finally, the script would look like that :source = Avisource("my_file.avi")
source = source.lanczosresize(720, 464)
source = source.addborders(0, 8, 0, 8)

return sourceNow lets check the computation : (720/464) * (16/9) / (720/480) = 1.84. You won't notice the distorsion, and the mpeg2 encoder shouldn't create ringing artifacts at the top & bottom of the picture.

Van the man
17th December 2005, 23:17
thanks a lot Manao, can I use that script with CCE?

and is there any other filter you think I should use?

Thanks again :)

Manao
17th December 2005, 23:34
Dunno, never used CCE. And for other filters to use, the subject is too vast. Best is that you search a little the forum, since YOU know what your source looks like and YOU know what YOU like. Play a little with the existing denoisers and - why not - sharpener. You'll learn a lot, and you should be able to achieve a script that'll please your eyes.

Anonymouses
17th December 2005, 23:52
thanks a lot Manao, can I use that script with CCE?

If you do you need to add a ConvertToYUY2() in the script.

Van the man
24th December 2005, 00:42
it didnt actually work putting that script in to cce...can someone make me a complete script I can import into cce? would be great. Thanks :)

Wilbert
24th December 2005, 01:46
AviSource("my_file.avi")
LanczosResize(720, 464)
AddBorders(0, 8, 0, 8)
ConvertToYUY2()


1) What errors did you get?

2) What CCE version did you use?

Van the man
24th December 2005, 02:30
I get: Framesize 836x56 is not supported.

Im using cce 2.70