Log in

View Full Version : error in faq: resizing


Wilbert
21st November 2002, 12:21
Since the faq is closed I had to make a separate thread. In the faq it is said:

1. You can crop 32 pixels, 16 from each side and resize to 640x480. AVS sample script:
AviSource("C:\DV\testAR_DV_type2.AVI")
crop(15,0,704,576)
BilinearResize(640,480)

Which is not correct. You have to crop 8 pixels on each side, so your script must be:
AviSource("C:\DV\testAR_DV_type2.AVI")
crop(8,0,704,576) # crop(8,0,704,480)
BilinearResize(640,480)

calculations:

640/480 = 1.3333

(720-16)*59/54/576 = 1.3354 #PAL
(720-16)*10/11/480 = 1.3333 #NTSC

bb
21st November 2002, 15:27
The values from the F.A.Q. are based on my own experiments. I got correct results when viewed on a 1:1 pixel aspect ratio TFT monitor. But I'll double check with a cropping value of eight vs. sixteen on each side and tell which one is better. The 59/54 factor seems to be based on empiric experiments, too.

bb

Wilbert
21st November 2002, 15:50
Let me know your findings ...

It is probably just a typo but "crop(16,0,704,576)" means cropping 16 from the left and nothing from the right. So if you used this line (as opposed to crop(16,0,688,576)) the cropping/resizing results in a correct AR.

bb
21st November 2002, 15:58
Oops, yes, a typo... But I'll wait to correct it until I double checked the AR topic again. I'll post my findings, of course.

bb

bb
23rd November 2002, 21:18
Ok, here we go:
Testing scenario: filmed a square sheet of paper from the top with my Canon MV3 at 4:3 (using progressive scan, but that doesn't matter). Then I cropped and resized to 640x480. The resulting size was measured on screen - a 15" TFT at 1024x768.

crop( 8, 0, 704, 576) -> WxH = 11,4 cm x 11,6 cm
crop(15, 0, 688, 576) -> WxH = 11,7 cm x 11,7 cm

Conclusion: You need to crop 16 pixels from each side (left and right) to get correct aspect ratio on a display having a pixel aspect ratio of 1:1.

Feel free to do the same test with your camcorder, and please post the results.

bb

Wilbert
25th November 2002, 11:02
The problem is that I don't have a camcorder. There are three possibilities: our current theory is incorrect, my understanding of the theory is incorrect or your experiment is incorrect. Are there other volunteers that want to do this test?

btw, change crop(15, ...) into crop(16, ...).

bb
25th November 2002, 12:47
Originally posted by Wilbert
The problem is that I don't have a camcorder. There are three possibilities: our current theory is incorrect, my understanding of the theory is incorrect or your experiment is incorrect
Don't know how correct the theory is, but I don't know either what should be wrong with my experiment. Using the values I found out results in circles, not ovals, at least for my camcorder.

btw, change crop(15, ...) into crop(16, ...).
Thanks, these +/-1 errors seem to hunt me...

bb

onesoul
14th December 2002, 19:46
I am very confused right now so please forgive for my silly questions:
how come do you need to resize 720*576 dv and don't have to resize 720*576 dvd format? (I hope my question is clear)

bb
15th December 2002, 11:42
Because 720x576 is neither 4:3 nor 16:9, and the resizing to the correct aspect ratio is done during playback. To get 1:1 aspect ratio for computer monitor viewing you need to resize.

And we resize to lower resolutions to get better quality at the same filesize. But you can encode without changing the resolution, if you use a player with custom resizing settings. You always have to keep in mind to which resolution you need to resize during playback.

If you encode for DVD, you keep the resolution, of course.

bb

onesoul
17th December 2002, 21:53
Thank you for your response, I guess a good program to do the real time resize would be zoom player for example.

stickboy
24th December 2002, 22:44
Are the left/right crop values the same for NTSC DV?

bb
26th December 2002, 15:21
I guess yes, but I can't approve that (no NTSC camcorder here). You can verify it yourself: shoot a few seconds of video from a square sheet of paper, crop, and see if it's still square on your monitor (TFT preferred).

If you do it, please post your results.

bb

Rash
9th January 2003, 17:10
Can anyone help me here? Please? It is something much more simple than what you are discussing.

I have a video 720x480 and I want to resize it keeping the aspect ratio and the numbers divisible by 16. How do I get the "resizing options", I mean, the resolutions I can get to keep the aspect ratio?

I've already tried using %, like 70% of 720x480 is 504x336 but 504 is not divisible by 16 so I can't encode it with DivX, for example.

Thank you guys so much. :)