View Full Version : Why One should capture at a High frame width ... even for VHS
trevlac
28th May 2004, 20:56
I have looked into this subject quite a bit, and thought I'd share ... in laymens terms. :) For a while I used to argue that one does not need to capture high ... but for practical purposes you do. I don't want to go on and on (again) about the details ... but I'd happly provide them if anyone cares. :D
Background
Nyquist threory states that if you sample at > 2x the highest frequency, you are getting all of the data. Some people seem to think that this is incorrect. However, Digital Signal Processing is based upon this. So doubters are a bit off.
Here is a technical discussion of why Nyquist IS correct.
www.lavryengineering.com/documents/Sampling_Theory.pdf
Analog source has a limited bandwidth. This is a reference to the highest frequency (details) in the signal. VHS for example is ~ 3MHz. This equates to about a 320x480 (NTSC) frame size. PAL is 320x576. 320 goes to the famous 240 TVL if you adjust for the 4:3 frame. 320/4*3 = 240. So yes! Analog source requires a limited frame size. Anything higher is a waste!
Capture cards capture at a very high frequency. Usually more than the 2x that is required by Nyquist. This allows them to better filter out noise, sync the signal from line to line, and probably a few other things. In frame sizes, this is at least 1440x480 pixels!
Capture cards then ALWAYS resize from their high capture frequency (size) to the lower size you ask for in your capture app. A resize is a change in the sampling rate. Pixels are basically samples. So changing the frame size == change of sample rate.
In practice
Given the above, it is reasonable to think that capping at 352x480 should give you all the info available in a VHS source. 352 pixels is a more than adiquate sample rate to use on 3MHz VHS source.
However, when the card resizes/resamples, it also lowpass filters the source. It is supposed to do this. Any decent resizer filters the high frequencies out of a source. This means it blurs out the details. Try doing a repeated resize of some text. It will continue to blur as you go down, back up, down, back up... ect.
The Catch
Most card resize filters blur down past 3MHz when they resize below ~480x480/576 pixels. This includes ATI, Philips, and BT based cards. BT is a special case. 368 (NTSC) and 392 (PAL) do not blur too much. If you go below those sizes, a vertical filter goes into effect and kills your vertical resolution. Plus, those sizes are not exactly standard ... especially if you want source with a proper aspect ratio.
Any post capture resize will again smooth out details. Try the text repeated resize thing.
So, it is near imposible to get VHS source down to a 352x size without loosing detail. (Of course a given tape may not have the detail, or maybe your viewing device kills it, or even your eyes.)
In conclusion
If you capture VHS at less than 480, you risk smoothing out details. If you resize after a capture, you will again smooth out details.
VHS is the worst analog source. Anything else requires more.
Nyquist is valid. 352x480/576 is big enough for VHS. Unfortunately, you can't get your source down to that size without bluring out some details. :(
acrespo
29th May 2004, 06:16
I usually capture from VHS at 640x480. I crop with x1=0,x2=0, y1=14, y2=18, resulting 640x448. Then I resize to 640x480 or 512x384.
If I capture with 352x480, crop to 352x480 and resize to resoltions above, the results will be the same?
My capture card is based on CX883 chip.
trevlac
29th May 2004, 15:31
@acrespo
I'm not sure if you are asking about frame size and aspect ratio or the resolution (detail) in the picture.
To get the aspect ratio correct, you need to know how much of the horizontal picture your card naturally captures. IIRC, yours probably is 688x480 for a 4:3 TV AR. So if you want 640x480 PC 4:3 with no borders, resize your cap to 640x496 and crop 8 off the top and bottom. If borders are ok, cap at 620x480 (if you can) and add 10 on each side.
The no borders option assumes you are deinterlacing your source, which i assume you are because you are resizing the vertical.
On the detail/resolution. When you deinterlace, you are loosing detail. How much depends upon the method and source. When you resize, you are loosing detail/resolution. So it is best to limit these things if you can. I did not mention your chip in my writeup because it has a really high filter cut off. Meaning, it hardly filters anything out. Good things and bad things. So as far as I know, you can capture at < 480 resolutions with a CX chip and still keep all of the detail in a VHS source. The catch is that any noise in your source may duplicate and cause false images. Anyway, any resizing blurs the image. So limit that if you want to keep sharper details. The CX's resizer will keep the most 'detail' of any method of resizing.
PS: Sharper details probably are detrimental to compression.
[edit] Maybe you were asking if 640 then resize is better than 352 then resize. Using the same resizer, it is. This is because the filter generally has a set cutoff point as % of the starting frame size. Since 50% of 640 is > 50% of 352, and resize will filter more out of the 352. I'm no electrical engineer ... ;) ... I'm assuming the resizers 1st filter then resample, regardless if they are going up or down. Maybe wrong there. Might have to test that .... :D
minolta
30th May 2004, 21:49
trevlac, from what i've read on this forum my capture settings are okay, but let me pass them by you since i'm still a little confused:
Card: ATI TVWonder VE (bt878)
Drivers: BTWinCap (sourceforge...)
Capture: 712x480 YUY2 (picvideo mjpeg, Q=19)
Then, of course, decimate for movies or leave interlaced if not. For the standard DVD/SVCD and 4:3AR resolutions i then:
DVD: Crop sides (if any black), resize to 704x480, and pad to 720x480.
DVD-Low: Crop sides and resize to 352x480.
SVCD (1): Crop sides, resize to 472x480, pad to 480x480.
SVCD (2): Crop sides and resize to 480x480.
the 'Crop' step usually involves ~4 left/right (sometimes none at all) and ~2 top/bottom. also, i make sure to do a proper interlace resize when necessary.
i've heard that 4:3 SVCD should have borders, but i hate to waste pixels and usually do #2 instead. Also, i forget where my choice of 712 came from, but it has to do with my BTWinCap drivers and avoiding hardware resizing. are these setting on par?
-Minolta
trevlac
30th May 2004, 23:13
@minolta
"DVD: Crop sides (if any black), resize to 704x480, and pad to 720x480."
You should not be resizing here. Just crop to 704 or pad to 720. You'll never see the borders on a TV.
"DVD-Low: Crop sides and resize to 352x480." Yes. Crop 712 to 704 and resize to 352. Note that this size is too small to keep the full details that are possible even on VHS. Depending on the source content and your taste, you may not care.
"SVCD (1): Crop sides, resize to 472x480, pad to 480x480." Here i'd pad 712->720 and resize to 480x480.
I'd never do SVCD (2) because I don't think there is such a thing as a proper vertical resize for interlaced material. The material is made of 2 fields. These are take at different points in time. Interpolating across the fields is not valid. Even if you seperate the fields, your sample rate is too low for the detail that may be in the scene. There are too few lines in a field (240). Proper interpolation is based upon the assumption that the smallest detail covers 2 lines.
The new doom9 capture guide is expected to be available within a few weeks. You should check that out to confirm what I've said. :D
Cheers
PS: For others, the sizes are due to the BT card and BTWincap driver.
minolta
31st May 2004, 00:49
ahh, so the correct 704 wide 4:3AR is within the 712 w/o rescaling (just need to crop). thanks for clarifying! perhaps the new FAQ should contain some hardware/driver specific suggestions (such as the 712 for btwincap), unless its too debatable. thanks again.
-Minolta
p.s. from before, by "resize" it was implied to mean SeparateFields().Resize() when interlaced ;).
trevlac
31st May 2004, 01:40
Originally posted by minolta
ahh, so the correct 704 wide 4:3AR is within the 712 w/o rescaling (just need to crop). thanks for clarifying! perhaps the new FAQ should contain some hardware/driver specific suggestions (such as the 712 for btwincap), unless its too debatable. thanks again.
-Minolta
p.s. from before, by "resize" it was implied to mean SeparateFields().Resize() when interlaced ;).
I was just reading thru Wilbert's new guide. I got a preview copy before it has hit the stores. Maybe I should offer it to some movie release group. So they can make a divx :) It has speifics on chips, even pictures.
PS: I still don't think vertical resize like that is a good thing.
I made a test pic for you. It has some black lines on white; 1,2,3, & 4 pixels tall. I started with 472x472 and did a SeparateFields().Lanczos(480,240).Weave() on this. The pic is a jpeg I point resized up with adobe so it was easier to see what this small resize does.
http://trevlac.us/pics/VResize.jpg
Perhaps if you did a pointresize, you might get ok results.
trevlac
31st May 2004, 02:02
Here are some excellent comments Wilbert made to me on this 'off line'. The context is that i4004 disagreed with me on my comments about Nyquist. Because I said it was 'valid' period.
At the end of this post, i try to clarify some. But I will say that i mean Nyquist is a valid theory. In practice (with my equipment), i can not achieve the low Nyquist rate without loss of detail.
I think the main disagreement is not that there is an
optimal capture size. The disagreement is about:
"you said(in doom9 thread);
>Nyquist is valid. 352x480/576 is big enough for VHS."
or 312x480/576 or whatever.
The point is that for applying Nyquist certain
conditions need to be fullfilled. The problem is that
those conditions aren't met in practice. This means
that the optimal cap size will be larger than "twice
the bandwidth of the signal". How much larger, we
don't know. Depends also on the used resizers (during
capture or during post processing).
There are several issues when applying Nyquist:
1) Ideal reconstruction filter doesn't exist in
practice => optimal capture size is larger than
312x576 (6 MHz).
2) Nyquist isn't even fully applicable. To repeat
Arachnotron's word:
"Nyquist is about a complete analogue-digital-analogue
cycle. Most people break half way into the cycle and
split off to do something different. The correct
cycle: analogue signal from VHS -> digitized -> fed
into DAC (digital analogue converter) to reconstruct
the original analogue signal. An incorrect cycle: VHS
-> digitized -> MPEG2 -> RGB. In the second path the
original signal is not reconstructed. Instead, the
samples are lossy compressed, and the result is
converted later into a completely different type of
analogue signal."
Wilbert
Here is my reply and a follow up by Wilbert
trevlac:
> On Nyquist ...
>
> So as Ivo has said ... Nyquist only tells us the
> lowest possible sample size. It is not a guide to
> the
> sample rate needed for a specific process.
>
> Do you agree? I do.
Wilbert:
Yup.
trevlac:
> However, when this comes up it
> seems like we say that you must cap as high as
> possible. I think that has no basis.
Wilbert:
To be quite fair. I don't know what to think of that.
It can be true, or it can be false. A different
question is whether it really matters or not. I mean,
if there's visually hardly any difference ...
But you are correct, it's not true per definition.
trevlac:
> In fact, this
> keeps the myth going that the higher you sample the
> more info you get. That pdf i sent was from
> HydrogenAudio. It was this myth it tried to bust.
Wilbert:
I still have to read it. Do you have a link?
trevlac:
> On you 2 points:
>
> 1) True, but I believe it is a lot better than is
> implied.
Wilbert:
bt8x8 and ati have lousy scaler, so I don't know ...
trevlac:
> PS: I think we are talking about the DAC process.
> 2) On the surface this sounds reasonable. But the
> implied conclusion is that Nyquist can not be used
> to
> understand part of the cycle. And that 'other'
> steps
> (like compression) perform better on more samples.
Wilbert:
Nyquist can be used as an "approximation". But like
you said below, there's more to it. And we don't know
exactly how that (ie 'the more') influences it.
trevlac:
> So maybe there is more (much more) to it than
> Nyquist
> (the idea that any waveform can without much loss,
> be
> broken into descrete pieces).
Wilbert
Here is the hydrogen thread ... quite short
http://www.hydrogenaudio.org/index.php?showtopic=20550&
For parctical purposes, I have found that Nyquist (aka 2x) is not a high enough rate for Philips, ATI, or BT based cards. If this was not clear in my original post.
This pretty much translates into (For NTSC) cap VHS at least at 480. The new guide has some specific recommendations for specific cards.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.