PDA

View Full Version : Correct aspect ratio of captured video


alexVS
19th September 2010, 08:54
I'm trying to determine correct aspect ration of source video, captured long ago from TV to VSH, and the digitised from VHS to DVD. Now I want to make small mp4-avc clip from it.

DVD PAL video has aspect ratio 4:3 (720x576, viewed like 768:576=4/3). But look at my screenshot from video. Looks like it was narrowed horizontally. What was the cause of it? TV-station, VSH-recorder or DVD-recorder?

If I crop 4 from left and 32 from right, Do I receive 4/3 (1,333) at once and resize it to, let's say 640x480? If it was distorted?

Or shoud I work like this:
Crop 4 from left and 32.
Height: 576
Correct width: (720-4-32)*768/720=729,6
So the aspect ratio will be 1,267
And after crop, resize it to 640x505 ?

http://img810.imageshack.us/img810/8397/67479647.jpg

Ghitulescu
19th September 2010, 09:36
Does the DVD and or VHS play correctly on your TV?

They should .... ;)

TheSkiller
19th September 2010, 12:46
Yeah, it should look correct on your TV (no black border on the right on most TVs, on some there might be a very small border because the blanking on the right is quite big).


DVD PAL video has aspect ratio 4:3 (720x576, viewed like 768:576=4/3).

No, it's not exactly like that. If a (PAL) video is 720 pixels horizontally it is actually not exactly 4:3, it is 15:11. This is because the actual active picture area is only 702 pixels wide and lies within those 720 pixels, the rest is just there to have some overhead and to reach a number that is divisible by 16 (720).

Your video has lots of blanking on the right, it was probably broadcasted like that (don't worry about it, it's okay).
Think of this blanking like this: it overwrites parts of the picture that were originally there at some point (may it be on the cameras sensor, it doesn't matter).

So, what to do to make the video look on a PC like on a TV?
Zoom in evenly, emulating the TVs overscan.

This will kill the borders and resize it correctly to square pixels.

Crop(40,25, -40,-25) #Crop to the center 640x526 which equals 4:3 exactly
Spline16Resize(640,480) #Resize to 4:3 square pixel

Usedocne
19th September 2010, 14:38
TheSkiller's approach seems correct, but I'd maybe use less cropping, but only if the borders are stable (ie. not jumpy/jittery).

Crop(8,10,-38,-18)
Spline16Resize(640,480)

alexVS
30th September 2010, 11:47
Thanks!
As far as I understand, in the script of TheSkiller the width of the image after crop is 640. And during Spline16Resize the resizer works only vertically and that saves quality of picture.
But too much valuable pixels is being cropped. So I prefer to crop less, and here is the second problem.

Almost all digitized VHS recordings have blockiness, even when digitized at high bitrate. During downscale this blockiness getting even worse. I don't want to use deblocking filters cause I don't know how to use deblocking/denoiser filters. Picture becomes bad. I want to leave the video as much close to the source as I can.

What resizer should I use if I crop like Usedocne said?
Spline16Resize (and even LanczosResize) works fine only if the source picture is not blocky.

May be do like this? Here is no horizontal resize like in TheSkiller's script. But huge bitrate will be needed here.
crop(34, 16, -30, -18)
Spline16Resize(656,496)

TheSkiller
30th September 2010, 15:19
crop(34, 16, -30, -18)
Spline16Resize(656,496)
Checked it, totally correct. :) You still end up with a mod16 resolution and avoid horizontal resize and keep the aspect ratio perfectly correct, good.
My approach is a general solution that emulates TV overscan, but of course one can always crop less pixels.


Almost all digitized VHS recordings have blockiness, even when digitized at high bitrate. During downscale this blockiness getting even worse. I don't want to use deblocking filters cause I don't know how to use deblocking/denoiser filters.

Do you use MPEG2Source() for decoding? You can enable deblocking by adding cpu=4.

If you need a softer resize try BicubicResize(width, height, a,b) and tweak the parameters a (blur) and b (sharpness) (try 1,0 for example).

henryho_hk
22nd December 2010, 05:47
Legacy PAL 4:3 has a pixel aspect ratio (i.e., pixel shape) of 12/11 (or 1150/1053). Hence, the display aspect ratio is (roughly) 720/576*12/11 = 15/11 or 704/576*12/11 = 4/3.

But why isn't your capture interlaced?