Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 Doom9's Forum PAL resolution IS...VHS resolution IS...
 Register FAQ Calendar Search Today's Posts Mark Forums Read

30th September 2002, 19:47   #21  |  Link
Xesdeeni
Registered User

Join Date: Aug 2002
Posts: 467
aldonix - That's the Nyquist frequency (like ronnylov said). But it applies to frequency, not lines of resolution. However, you can equate lines of resolution to 2x the frequency. This is because for each cycle the frequency in question contains, there would be a high (white) and a low (black) part, which is equivalent to two lines. This is the 2 in the equations used above.

ronnylov - You were going along fine until you said:
Quote:
 So if VHS is maximum 240 lines horisontal resolution this would be equal with the on screen visual picture width of 320 pixels. Adding the overscan and you can be safe to reproduce the whole resolution in 352 pixels width as used in half D1 (like 352x576 PAL or 352x480 NTSC).
You made the same mistake pointed out above.

PIXELS != LINES OF RESOLUTION

Reread the above explanation and post again if this doesn't make sense. But your 320 number above is actually the number of lines of (horizontal) resolution which VHS can produce, and this is an analog measurement. You must use the Extended Kell Factor (which is somewhat debatable but we'll stick with sqrt(2) or 1.41) to convert from lines of resolution to digital pixels in order to ensure you can capture that number of lines with all phase relationships. This means you need in the neighborhood of 450 digital pixels to represent what a VHS recording can produce.
Quote:
 But capture cards are not perfect. The Nyqvist theorem also requires to remove all frequencies above the sampling frequency before the sampling. The required capturing resolution to get all the needed 240 lines resolution is probably higher than 352 width. I suggest capturing at 704 pixels width, or at least 480 pixels width and then resizing down to 352 pixels width after capturing before encoding.
What you are referring to is called aliasing, and it is not a result of an imperfect capture card.

Sampling is theoretically done in an infinitely small time (in reality it takes a finite time that is extremely short, but it's definitely close enough for our purposes). So if the frequency is not limited, it is possible to get a sample that is not representative of the overall signal. [ex. Sample 00411422433444433422411 at points 3,6,9, etc., and you would completely lose the baseline wave/frequency.]

To avoid aliasing, the input signal must be low-pass filtered. [The above sequence would end up being something like 01211222333344333211, and the baseline wave/frequency is not lost.] The maximum frequency of that filter is determined by the Nyquist frequency. But the important point here is that the appropriate filtering frequency varies with the sampling frequency.

The problem with real-world sampling devices (as I mentioned above) is that most of them have only a single filter frequency. It is more complex to build multiple frequency filters, and most people won't notice if you don't. And of course, that single frequency chosen will not be for the lowest sampling rates, but for the highest, because otherewise the higher sampling rates would be a complete waste. So to sample at lower frequencies, these devices leave in undesirable frequencies that will cause aliasing.

This is why it is always best to sample at the highest frequency that the device allows, making the assumption that the filter is matched to this rate. Then using software, you can scale the image down with appropriate filtering, to get the desired sampling rate (or in our discussion, resolution).
Quote:
 I have done half D1 resolution DVD's (352x576 PAL) from VHS source and can't see any loss in detail compared to the original.
As I mentioned above, I have also used half-D1 resolution, but I have definitely seen the difference. The above information was obtained during my research into why everyone said that half-D1 was sufficient, when in fact my equipment and my eyes told me it was not. Perhaps your equipment and your eyes do not see the difference, but mine did, so I was intrigued as to how this was possible. The information I've found and shared above closely matches my actual experience, which makes me feel much more comfortable :-)

Xesdeeni

 1st October 2002, 08:38 #22  |  Link ronnylov Registered User   Join Date: Feb 2002 Location: Borås, Sweden Posts: 492 We are talking the same thing. You just call it something different. With the factor 1.41 you can calculate that 704 pixels resolution is equal with 703/1.41=497 lines of resolution of DVD. Just exactly the same as my calculation! Where have you got the value 320 lines of resolution on VHS? As I said IF VHS resolution is 240 lines, it corresponds to 320 visible pixels. IF it is 320 lines of resolution then it corresponds to a resolution of 427 visible pixels on the screen. If 8 % of the picture is in the overscan area of the TV then you'll need 464 pixels resolution. But this is no standard capture format. SVCD resolution is 480 pixels width and should be sufficient in your case (with your equipment and your eyes). I thought VHS resolution was around 240 lines, and SVHS 400 lines but this may be wrong. You can do the opposite test. Feed your VCR with half D1 source and record and then compare the result with a VHS recording from full D1 source. I can't see the difference on my equipment with my eyes when I play the VHS copy... __________________ Ronny
1st October 2002, 14:32   #23  |  Link
Xesdeeni
Registered User

Join Date: Aug 2002
Posts: 467
Quote:
 We are talking the same thing. You just call it something different.
I don't think this is tomato/tomoto. Lines of resolution are quite different from pixels, so the two terms should not be interchanged.
Quote:
 With the factor 1.41 you can calculate that 704 pixels resolution is equal with 703/1.41=497 lines of resolution of DVD. Just exactly the same as my calculation!
No. Lines of resolution must be specified for a square display (or using a circle as noted above). So for a 4:3 display, 720/1.41 * 3/4 = 382 lines of resolution.
Quote:
 Where have you got the value 320 lines of resolution on VHS?
The 320 lines per scanline (240 lines of (horizontal) resolution) comes from the actual VHS bandwidth (please see the calculations above).
Quote:
 As I said IF VHS resolution is 240 lines, it corresponds to 320 visible pixels.
No. 320 lines per scanline...not pixels.
Quote:
 IF it is 320 lines of resolution then it corresponds to a resolution of 427 visible pixels on the screen.
Approximately, depending on what you want to use for your Extended Kell Factor.
Quote:
 If 8 % of the picture is in the overscan area of the TV then you'll need 464 pixels resolution.
You don't need to add this 8%. 240 lines of (horizontal) resolution is equivalent to 320 lines per scanline. The 320 lines per scanline already includes the overscan regions.
Quote:
 But this is no standard capture format.
For whom? The ITU committee would probably argue that the ITU-R 601 specification (previously CCIR 601) is a standard :-)
Quote:
 SVCD resolution is 480 pixels width and should be sufficient in your case (with your equipment and your eyes).
That would work if I were making SVCDs, but 480x480 is not a legal DVD format. Since we all agree that even VHS tapes have more resolution than 352x480 can show, if you really want to keep as much quality as you can, you have to use 720x480 (or 704).
Quote:
 I thought VHS resolution was around 240 lines, and SVHS 400 lines but this may be wrong.
Those are the numbers that are generally quoted, and the calculations above seem to support them.
Quote:
 You can do the opposite test. Feed your VCR with half D1 source and record and then compare the result with a VHS recording from full D1 source. I can't see the difference on my equipment with my eyes when I play the VHS copy...
Wait a minute. Now you are throwing a curveball into the mix. We were trying to compare the quality of half-D1 and D1 when digitizing from VHS. This is different from taking half-D1 and D1 and recording to VHS.

If (as we assert above) VHS has 240 lines of (horizontal) resolution, then there are about 320 lines per scanline. That's the most that a VHS tape can store. If you start with a 720 pixel source, then you will be providing more than 320 lines per scanline. The analog circuitry will effectively filter the input (or it may be done explicitly) so that you record about 320 lines per scanline into your VHS tape deck. If you instead start with a 352 pixel source, then based on the Extended Kell Factor, you will get at least 250 lines per scanline. But in some cases, you will actually get more than 250 lines per scanline, if the lines are in phase with the 352 pixels (see above). The filter mechanism (implicit or explicit) will not filter much of this. As a result, you will get an average resolution somewhere between 240 and 320 lines per scanline (let's call it 280). So although you don't have a full 320 lines per scanline at all times, you do approach that resolution in some cases, so you average something line 280 lines per scanline. That is much closer to 320 lines per scanline, and I suspect I couldn't tell the difference on my end either.

But we were discussing the other direction. When you produce 320 lines per scanline from a VHS tape, what is the minimum digital resolution that will show all the information? Obviously 720 pixels is more than sufficient. So the question is what do you get with 352? Well, either your digitizer filters the incoming video, or you do so (as mentioned above) after capturing at a higher resolution. In this case, the filtering will be done to avoid aliasing at a 352 resolution. But the filters are usually not selective based on phase (filters that vary based on phase are considered low-quality). So the image will be filtered to no more than 250 lines per scanline.

[In fact, I believe that linear interpolation is selective based on phase, so using this scaling might take advantage of those in-phase lines, effectively increasing the apparent resolution...hmmm...you may have hit upon something there...I may have to try this!]

So in this case you are comparing 320 to 240 lines per scanline. In the case you mentioned, you are comparing 320 lines per scanline to a range that averages about 280 lines per scanline. That is much closer and more difficult to distinquish.

Xesdeeni

 1st October 2002, 19:12 #24  |  Link Tokafondo Registered User   Join Date: Feb 2002 Posts: 44 Hello everybody. I've readen this entire post and I'd like to have some conclusions from the people that know what they are talking about: What's the best resolution to capture from VHS via CVBS? 8mm via CBS? Hi8 via CVBS? Hi8XR via CVBS? VHS via SVIDEO? 8mm via SVIDEO? Hi8 via SVIDEO? Hi8XR via SVIDEO? Thank you all
 2nd October 2002, 01:19 #25  |  Link ronnylov Registered User   Join Date: Feb 2002 Location: Borås, Sweden Posts: 492 My test results I decided to do my own test instead of just talking. This was the only way to convince myself. I used two test pictures and created two DV Avi's in Ulead Mediastudio Pro 6.5 using mainconcept dv codec and canopus dv codec. I noticed that the DV codec caused some compression artifacts on the "torture circle pattern" that I found in the avisynth forum discussing lanczos rezise. So I have attached original images and also the DVAvi encoded images. I recorded the DV-Avis via firewire to my Panasonic NVDS-28 MiniDV camcorder in PAL 720x576 25fps format. Then I connected the S-VIDEO out from the camcorder and captured it with my ATI All-In-Wonder Radeon using AVI_IO capture program and capturing to huffyuv avi 704x576 resolution. Then I connected the camcorder to my SVHS VCR, JVC HR-S7700 and recorded to a new SVHS tape of good quality. I also recorded to an average quality normal VHS tape, both in SVHS ET mode (JVC has a method of recording to normal VHS with "almost SVHS quality"). I also recorded to the same tape in normal VHS mode, all recordings was done in "short play". I captured with 704x576 resolution in huffyuv from all the VCR tape recordings with my VCR connected via S-VIDEO cable to the AIW Radeon. Then I also did some tests by downsizing to a lower resolution and upsizing again from the lower resolution to 704x576 to be able to compare with the original images. I used the lanczos rezise both for down and upsizing in avisynth. The images was taken from copying source video to clipboard and then inert the picture in mspaint and then they was saved as bmp and afterwards converted to jpg to reduce the file size a bit. CONCLUSION VHS, SVHS and SVHS ET all have full vertical resolution compared to the original! The vertical resolution was the same in all formats. That makes the statement "VHS is 240 pixels vertical resolution" completely false! The horisontal resolution seems to be close to 352 pixels in VHS mode. It can be seen in the "circle torture clip" that the resolution does not increase above 480 pixels horisontal resolution. There is a small difference between 352 and 480 pixels resolution but it seems closer to 352 than 480 in my eyes. 320 pixels was a little bit worse and 240 pixels was too low. In SVHS the resolution is almost the double compared to VHS. SVHSET is not recommended unless the tape is of very good quality because it introuduced a lot of noise. VHS looked better on this tape. In my case I'm converting to DVD and to me it seems that 352x576 is the most resonable format to use when copying VHS to DVD, but if it is a recording of high personal value I may use 704x576 rsolution. Remember that I'm looking at uncompressed images and it may be very likely that video compression to MPEG-2 or any other format makes the image a little bit more blurry so to compensate for that it may be nesessary to go higher than 352 horisontal resolution. But don't downsize vertically because now it has been proven that you need the full vertical resolution! I did one test with downsizing to 544 pixels heigth and it was a visible decreased resolution in the output! Images __________________ Ronny Last edited by ronnylov; 2nd October 2002 at 08:04.
2nd October 2002, 14:22   #26  |  Link
Xesdeeni
Registered User

Join Date: Aug 2002
Posts: 467
Quote:
 What's the best resolution to capture from
S-Video input is probably as good as it gets for the sources you mentioned. Composite will look about the same for VHS (and possibly 8mm), but not as good for the other formats (PAL composite will not affect the horizontal resolution as badly as NTSC composite, because the color modulation frequency is higher).

VHS, as we have discussed to death, has about 240 lines of (horizontal) resolution. Depending on the Extended Kell Factor you want to use, this is equivalent to about 450 horizontal pixels. So 450x480/576 is roughly equivalent (note that for most capture boards, you will want to capture at the maximum resolution and scale down with software for the best quality--details above). However, as we have discussed, 352x480/576 may be sufficiently close for your purposes.

S-VHS has about 400 lines of (horizontal) resolution. Using the same Extended Kell Factor, this is roughly equivalent to 750 horizontal pixels (this is one of the reasons why I tend to use a smaller EKF). So for S-VHS, use 720x480/576 (obviously if your card can only capture 640x480, then you use that; if you card can do 768x576 then use this).

As I understand it, 8mm has about the same resolution as VHS, so use the same numbers.

Hi8 has about the same resolution as S-VHS, so use the same numbers.

Hi8XR looks like a slight improvement on Hi8, giving about 440 lines of (horizontal) resolution. Since you are normally maxed out by Hi8, then you should use the same resolution as S-VHS as well.

Xesdeeni

 3rd October 2002, 16:17 #27  |  Link Tokafondo Registered User   Join Date: Feb 2002 Posts: 44 Thank you for your detailed answer. At the end, it seems that if you can afford it, for VHS the best is captura at SVCD resolution and for SVHS / Hi8 , DVD resolution.
10th December 2002, 02:34   #28  |  Link
fasttimes
What-- Me Worry?

Join Date: Sep 2002
Posts: 111
Quote:
 Originally posted by ronnylov That you need at least the double the highest source frequency as sampling frequency is called the Nyqvist theorem. If the vertical frequency on one horisontal line is 1 Hz and you have sampled it with 2 Hz you'll get one black and one white sample (or 2 pixels horizontal resolution is required).
FYI guys... this information comes from the author of Virtual Dub, and was confirmed by the author of the BTWinCap drivers:

"The BT878A used in the WinTVs sample the NTSC signal at 28MHz, filter that down to 14MHz, and then scale it down via a multitap filter. According to the docs, the 14MHz rate gives you a limit of 910 pixels per line, which then drops to 780 pixels at a square aspect ratio. The WinTV thus does not capture 640 and then stretch it to 720 -- it captures 910 and drops it to 720, or whatever you require."

So there you go.

20th November 2003, 16:54   #29  |  Link
trevlac
budala

Join Date: Oct 2003
Location: U.S.
Posts: 545
Quote:
 Originally posted by fasttimes FYI guys... this information comes from the author of Virtual Dub, and was confirmed by the author of the BTWinCap drivers: "The BT878A used in the WinTVs sample the NTSC signal at 28MHz, filter that down to 14MHz, and then scale it down via a multitap filter. According to the docs, the 14MHz rate gives you a limit of 910 pixels per line, which then drops to 780 pixels at a square aspect ratio. The WinTV thus does not capture 640 and then stretch it to 720 -- it captures 910 and drops it to 720, or whatever you require." So there you go.
Sorry to bring up old posts, but I was trying to really understand Xesdeeni (who I believe has this topic 100% right).

Howerver, I wanted to correct the above quote because it is linked from the FAQ.

The quote in this context is misleading. The numbers 910 and 780 express the full NTSC 63.555 usec line at different sample rates. 720 is what you expect to be the active portion of this line (about 52.666 usec). The active protion is determined by the driver. It 'crops' off the front and back sync by seting the HDelay and HActive registers of the BT8x8 chip. The BTwincap driver sets these values to return a 754 14.3 sample portion as the active line. This number relates to a cropped 910 full 14.3 line. The chip then drops this to what you ask based upon what the driver sets for the HScale register.

The trouble is that all of the prior disucssions were with regard to a 13.5 sample. If HScale does not scale 14.3 to 13.5 your picture is indead streatched because it is not dropped enough. 712 is the number for 13.5 using the BTwincap driver. 720 is not dropped enough.

Bottom Line:
BT8x8 cards sample at a high enough frequency to easily meet the nyquist requirement. 14.3 vs 4.2 for NTSC. The trick is then to get them to not drop the horizontal frame size below what would be required to represent the analog bandwidth, and to get the aspect ratio correct.

Edit
It seems the only 'mistake' in Xesdeeni's logic is applying kell. Kell applys to what the camera does (to capture a real image) and what a TV does (to show a real image) with regard to the vertical only. It should be ignored for horizontal (except maybe for an LCD screen or a CCD camera).

TVLh should not consider kell. TVLv are all the same 480 or 576. So what's the point of adjusting them for kell any ways?

VHS NTSC is 240x480 TVLh. or 320x480 pixels for a 4/3 image. 352x480 is thus a good pixel frame size for VHS.

Full (4.2) Broadcast NTSC is 330x480 TVLh or 440x480 pixels. 352x480 is not enough.

Of course the bandwidth of your VHS machine may not be 3MHz and your CATV may not be 4.2MHz. If not, you don't even need that much.

Last edited by trevlac; 20th November 2003 at 19:00.

20th November 2003, 19:56   #30  |  Link
Arachnotron
Alias fragger

Join Date: Jul 2003
Location: the Netherlands
Posts: 863
I couldn't resist

Quote:
 352x480 is thus a good pixel frame size for VHS.
Considering that the conexant and philips chips use yuv 4:2:2 internally (and DVD does too), this would bring the resolution for the color part down to 176 x 480. Is that still enough for VHS ?? Too lazy to do the math right now...

 20th November 2003, 21:34 #31  |  Link trevlac budala   Join Date: Oct 2003 Location: U.S. Posts: 545 Good to hear from you. I can't say I fully get chroma yet. The bandwidth for chroma is lower in an NTSC signal. This implies that a lower frame size is ok. I think 4:2:2 does give enough room for NTSC chroma, but like I said, I don't have it down yet. Mpeg on the other hand is 4:2:0 This means you do loose chroma info on every other line due to this compression. But there is not much choice if you want to play it on a DVD player. So... I can go on and on about luma, which is what most talk about anyway. I'll hold my tongue on chroma .... until .... Edit: After a bit more reading, I'd say 352x480 at 4:2:2 is close for NTSC chroma. NTSC chroma has a bandwidth of ~ 1.3 and .5 for the 2 components. Converting to pixels (pixels = BW * 2 * active line) I get 1.8*2*52.666 = 190. Questions I still have are 1) is my calculation valid for chroma resolution? 2) The color components are different between NTSC analog and 4:2:2 digital. How does this effect resolution? Last edited by trevlac; 21st November 2003 at 03:48.
 15th September 2007, 03:41 #32  |  Link jult A Joy Forever     Join Date: Dec 2005 Location: Amsterdam, NL Posts: 85 I know this thread is really old, but let me try and explain. I have captured from an old Hi8 SONY CCD-V600E/PAL camera, through S Video (4 pins miniDIN) to a Canopus ADVC 300. The actual captured raw DV Type 2 file ends up being 720x576 (at 25.000 fps). Now, to clean it I had to crop the crap off from the sides (using VirtualDub), I had to cut X1 (left) 7 pixels, X2 (right) 12 pixels, Y1 (top) 2 pixels and Y2 (bottom) 0 pixels. The result then makes the actual visual content: 701x574 pixels. What should I best do with this result, in order to maintain original aspect ratio, and maximal quality? I tend to pick upsizing for DVD archiving (using DVB-T format, because I like to use the H.264 x264 codec), but I'm not so sure what resolution to pick here and what resizing type is best to do. Since I've cropped from the original, resembling what the visual area would be like if I took a picture from the old analog television (PAL, NL) screen with the Hi8 playing on it, what should I choose? Should I just resize to 720x576, or letterbox (with the same 720x576) to keep the 4:3 original? Thanks in advance, I have a lot of captures I have to do the same with..
 18th September 2007, 13:08 #33  |  Link 2Bdecided Registered User   Join Date: Dec 2002 Location: Yorkshire, UK Posts: 1,673 Do not do resize for such a small amount. It will reduce quality, and if it's interlaced it's a real pain to do it anything like properly. You can "letterbox" (actually add black pixels to all sides) to 704x576 or 720x576. Better still, don't crop in the first place - just set the "bad" pixels to black. With cropping and "letterboxing" you have issues with colour spaces (can't always crop where you want to in the native colour space, but a colour space conversion can lose quality) and the possibility of messing the interlacing up (moving the frame up by 1 line will reverse the field order, destroying movement). You would see far less on an "old analogue television" than on a PC because of the overscan. This does not mean you should "correct" for it! Cheers, David.
9th March 2008, 21:23   #34  |  Link
jult
A Joy Forever

Join Date: Dec 2005
Location: Amsterdam, NL
Posts: 85
Quote:
 Originally Posted by 2Bdecided Better still, don't crop in the first place - just set the "bad" pixels to black.
Which is exactly what happens when I use the letterboxing within VirtualDub. The cropping just sends black sliders over the sides, in essence, and leaves everything (resolution, aspect ratio) alone.

My basic problem here is:
How do I know if the resulting Aspect Ratio and Resolution for PC-viewing are correct (and I mean no more than 0.1% off, so very precise) , if I don't have any reference on screen?
I only know the source is an old Hi8 camera (analog), but what is unclear is how much screenspace it actually used in its own AR. I can tell the material to uphold its original captured AR, but is that the correct one?

13th March 2008, 18:43   #35  |  Link
facialz
Registered User

Join Date: Feb 2008
Posts: 17
Quote:
 Originally Posted by jult My basic problem here is: How do I know if the resulting Aspect Ratio and Resolution for PC-viewing are correct (and I mean no more than 0.1% off, so very precise) , if I don't have any reference on screen? I only know the source is an old Hi8 camera (analog), but what is unclear is how much screenspace it actually used in its own AR. I can tell the material to uphold its original captured AR, but is that the correct one?
It depends on how accurate is your capture card. If it captures 52µs into 702 pixels then you're sure that you have the best accuracy and you may use pixel aspect ratio of 12/11to display the video.

19th March 2008, 18:50   #36  |  Link
jult
A Joy Forever

Join Date: Dec 2005
Location: Amsterdam, NL
Posts: 85
Quote:
 Originally Posted by facialz It depends on how accurate is your capture card. If it captures 52µs into 702 pixels then you're sure that you have the best accuracy and you may use pixel aspect ratio of 12/11 to display the video.
Why would I want 12/11? I have square pixels as my target.

I have no idea if it captures 52µs into 702 pixels. It's a Canopus ADVC300. Specs are not available.

 19th March 2008, 21:48 #37  |  Link DrP Registered User   Join Date: Jan 2003 Posts: 159 Its a Canopus. It gets the sampling / timing right.
20th March 2008, 04:41   #38  |  Link
facialz
Registered User

Join Date: Feb 2008
Posts: 17
Quote:
 Originally Posted by jult Why would I want 12/11? I have square pixels as my target.
Target pixel aspect ratio is irrelevant to the question. 12/11 was meant to be the source PAR. If you know it for sure, you may convert the video to every target you want without any distorsion.

Quote:
 Originally Posted by jult I have no idea if it captures 52µs into 702 pixels. It's a Canopus ADVC300. Specs are not available.
You may simply follow DrP's advice or -- in case you want to verify it -- follow the Chapter 10 of the Capture Guide on http://www.doom9.org/

(To be honest, there is no way to know the source PAR for sure unless you can directly test the original camera. Timing accuracy only tell you the width of the reference image. The height remains unknown. Probably it is 576, 575, 574, but it can be something else.)

 20th March 2008, 11:51 #39  |  Link 2Bdecided Registered User   Join Date: Dec 2002 Location: Yorkshire, UK Posts: 1,673 My ADVC110 seems to be accurate. I haven't tested down to the pixel, but it's certainly correct to within a few (2-3) pixels. Cheers, David.