Log in

View Full Version : Need help with using capture guide


chinnei
26th December 2003, 22:52
Hi, newb here.
I want to first say thanks to whoever was involved in writing the capture guide that's posted here in doomm9. I've just gotten into this capturing as a hobby and the guide really help me out alot.
I do have couple points from guide that I couldn't understand well and, in posting this, trying to get some more clarification.

Well, my capture card is based on Philips SAA7133/7134 chip, and from following the guide, I am trying to capture NTSC in lossless using picvideo mjpeg with virrtual vcr and later convert it to a divx file.
From the guide,
In case your capture card is ITU compliant the resizing process becomes more difficult. The ITU-R BT.601-5 standard gives us a result of approx. 711 (active, horizontal) pixels for the right resolution, which gives us a PAR of 72/79 (note that 648/711 = 72/79 and 648/486 = 640/480). It's outside the scope of this guide to explain this in detail here. It follows that if you captured at 704x480 or 640x480 you can resize directly to a 4:3 format (like 640x480).
If capture of 704x480 or 640x480 can be directly rezied to 4:3 format, what would be the difference between does two capture? I can understand that 640X480 can be resized directly since it is a ratio of 4X3, but how can a 704X480 can be directly resized? I guess what I am trying to ask is, between above two resolutions, which one should I use?


My second quesiton is, in using virtual vcr, is there any drawbacks in using custom resolutions than using one from the preset values? For example, if I were to use a resolution of 704X480 and since this is not one of the preset values, could I just enter this in a custom resolution? Also, what would be the framerate for the custom resolution? (I am guessing 29.970?)

Well, guess that's it for now, thanks in advance.

North2Polaris
27th December 2003, 16:16
Originally posted by chinnei
I guess what I am trying to ask is, between above two resolutions, which one should I use?
The best answer to your first question is that there are several threads where possible answers to this question are being discussed. For example:

http://forum.doom9.org/showthread.php?s=&threadid=67287

You might also find proposed revisons to the guide by trevlac of interest:

http://trevlac.us/preface.htm

My second quesiton is, in using virtual vcr, is there any drawbacks in using custom resolutions than using one from the preset values?
Using the table on trevlac's page, the capture width of your SAA7113 capture card/driver combination might be 53.333 (there are ways to test this); which means that in NTSC terms, you might do well to capture at 720x480, if your system can handle it, and crop and resize from there, especially if your target format is DVD (720x480, 704x480, or 352x480).

I have not had any problems using Virtual VCR with custom capture resolutions that are supported by my capture card/driver combination.

trevlac
27th December 2003, 18:45
Originally posted by chinnei

If capture of 704x480 or 640x480 can be directly rezied to 4:3 format, what would be the difference between does two capture? I can understand that 640X480 can be resized directly since it is a ratio of 4X3, but how can a 704X480 can be directly resized? I guess what I am trying to ask is, between above two resolutions, which one should I use?

There are 2 issues here.
1) does your card/driver capture the whole picture or not, and does it stretch the picture.
2) what's a good size get all of the resolution

1) Capturing the whole picture is a function of the driver you use. You can test for this. If you can choose custome sizes, it is most likely that your card/driver does not cap the entire picture and it streatches/shrinks to the size you ask. If you don't want to test for your driver, 640x480 is a nice safe size.

2) You are unlikely to have more resolution in an analog source than 640x480. So this again is a nice size.


My second quesiton is, in using virtual vcr, is there any drawbacks in using custom resolutions than using one from the preset values? For example, if I were to use a resolution of 704X480 and since this is not one of the preset values, could I just enter this in a custom resolution? Also, what would be the framerate for the custom resolution? (I am guessing 29.970?)

You may be limited by your driver or codec as to what custom sizes you can use. If you determine that your card/driver really caps say 52microseconds of the active line, a custom size is nice because you can cap at that and just pad/crop to the standard. If you really know your card/driver, a custom size may allow you to find a sweet spot of resolution and small size.

The framerate should be 29.97.

If you want to get it perfect...you have to test your card/driver and get to know the issues. However, these issues are really not that big of a deal. Getting the brightness/contrast/hue, etc correct probably effects the image quality more. :)

chinnei
28th December 2003, 06:24
trevlac,
1) Capturing the whole picture is a function of the driver you use. You can test for this.
By "test", you mean this?

dvdtest (http://www.arachnotron.nl/videocap/site/capture_area2.html)

I did the above test and came out with the value of 52.83µs, but I really don't know what to conclude from that number. I am assuming that my capture card has incorrect aspect ratio?

Here are some of the capture images btw,

640X480 (http://us.f1f.yahoofs.com/bc/3faef05c_14544/bc/My+Documents/640X480.bmp?bf_wm7_AYxrAVj4S)
704X480 (http://us.f1f.yahoofs.com/bc/3faef05c_14544/bc/My+Documents/704X480.bmp?bf_wm7_Ak9pwuvCj)
720X480 (http://us.f1f.yahoofs.com/bc/3faef05c_14544/bc/My+Documents/720X480.bmp?bf_wm7_ANpuZNJ0L)
dvd test (http://us.f1f.yahoofs.com/bc/3faef05c_14544/bc/My+Documents/dvdtest.bmp?bf_wm7_AYb1IpeSb)

(I don't think my dvd test is 100% accurate because I only could use composite in for my dvd player)

From the looks of it, 640X480 is the way to go, right?

Again thanks for the help guys, and please keep'em coming.

Arachnotron
28th December 2003, 13:43
I did the above test and came out with the value of 52.83µs, but I really don't know what to conclude from that number. I am assuming that my capture card has incorrect aspect ratio?

I haven't gotten around to that part :)

Philips chips operate at 13.5 MHz. Often the cap windows are optimized to get 'nice numbers' for DVD pixels. From this number I suspect your card has a capture window equalling 712 DVD pixels or 52.74 µs NTSC (the test has a possible error of about 1 DVD pixel)

If your target is square pixel, the easiest would be to cap at 648x480 if your card let's you do that.
If you want exacly 640x480, just crop 8 pixels from this cap
If your target is DVD, cap at 712x480 and pad to 720x480

Try the test again at 712x480; you probably get exactly the same number of DVD pixels per cap pixels.

I'll explain why later (or perhaps Trevlac will oblige :) )

North2Polaris
28th December 2003, 15:39
Originally posted by Arachnotron
If your target is square pixel, the easiest would be to cap at 648x480 if your card let's you do that.
@Arachnotron

Are there advantages to letting the card cap at 712x480 (assuming that this is the capture window for this card/driver combination) and scale to 648x480 (if permitted), as opposed to capturing at 712x480 and resizing to 648x480 in VirtualDub or AviSynth?

Arachnotron
28th December 2003, 16:10
Are there advantages to letting the card cap at 712x480 (assuming that this is the capture window for this card/driver combination) and scale to 648x480 (if permitted), as opposed to capturing at 712x480 and resizing to 648x480 in VirtualDub or AviSynth?

Without testing this (always do that!) I would think capping directly at target resolution is preferable here.

The difference between 712 and 648 is to small to get any advantage in noise filtering or any other filtering (if there is even any detail to be had above 640 in the original signal)

Also I think that just like color conversions, resizing steps should be kept to a minimum. You will always have cumulative rounding errors and the like. Going from raw 27 MHz to 648 pixels directly should be more precize than a 2 step 27 MHz- 712 pixels - 648 pixels.
(It is my personal opinion, but that is being debated, that these chips cap at 27 MHz, and generate the target pixels in one step involving scaling, combfiltering and pixel generation. Even if this were not true, the basic argument about minimizing resizing remains the same)

If you have a big step, like going from 712 to VCD it is a different story. There, providing your filters with all the info 712 pixels can provide does give you an advantage.

Exactly where the trade off changes I cannot say. S-VCD should be interesting.

But again, do try it out.

North2Polaris
28th December 2003, 17:39
@Arachnotron
@Trevlac

Suppose the card/driver combination does not support 648x480. What happens to the aspect ratio if you let the card/driver combination capture at 640x480? This is a standard option in capture software.

In Trevlac's proposed revisions to the guide:

http://trevlac.us/preface.htm

To summarize: Card/Driver combinations capture a constant part of the analog picture/signal. If the driver offers more than one frame size option, then the constant frame size is simply resized to the requested frame size. This means, if you don't ask for the 'native' size for the card/driver, and don't resize after capture, the picture will be distorted.

This implies that a direct NTSC 640x480 capture will be "distorted", unless 640x480 is the "native" size of the the card/driver, correct?

Is it reasonable to assume that makers of capture cards have not found a way to account for the aspect ratio issues associated with the NTSC active image area of 711x486?

Or are direct NTSC 640x480 captures distorted, using many of the capture cards that are out there?

chinnei
28th December 2003, 18:04
Arachnotron,
If your target is DVD, cap at 712x480 and pad to 720x480
Alright, I am probably asking for something simple here, but could you explain to me how do I pad to 720X480? (or if you can direct me to the right place?).

And how much of an advantage would this have as to capturing it directly to 720x480?

Arachnotron
28th December 2003, 19:54
@North2Polaris

This implies that a direct NTSC 640x480 capture will be "distorted", unless 640x480 is the "native" size of the the card/driver, correct?

Is it reasonable to assume that makers of capture cards have not found a way to account for the aspect ratio issues associated with the NTSC active image area of 711x486?

Or are direct NTSC 640x480 captures distorted, using many of the capture cards that are out there?

Many 640x480 probably will be, others wont. But those again will be distorted if you cap 720x480 for DVD. The problem is that with so many digital formats out there, you can only optimize for one of them, and the rest will have to be constructed later through resizing/cropping/padding

The choice made here is not such a bad one. At least you can cap 712x480 and end up with perfect DVD sized pixels.

If you choose exactly 52.66 µs active area, you end up with odd numbers of pixels which no real world capture card (and codec!!) will allow you to capture.

The ideal card would be one which would change the capture area on the fly depending on the resolution used AND tell you about it. My main gripe with card manufacturers is that this stuff is never properly documented.

Suppose the card/driver combination does not support 648x480. What happens to the aspect ratio if you let the card/driver combination capture at 640x480? This is a standard option in capture software.

Your aspect ratio will be wrong. You have video for 648 pixels, but put it in only 640. Your video will apear horizontally squeezed.
(But depending on the subject you may never notice it. Who knows if your monitor is exactly 4:3? I'm a nitpicker about these things :D )

@chinnei:

Your card captures only about 52.66 µs worth of horizontal video line. That is enough for 712 DVD pixels. If you put the same area in 720 DVD pixels you end up streching the picture horizontally when you play it back on a DVd player. So capping at 720x480 is a bad idea. :)

With padding I mead adding black pixels on the sides to make up for the difference between 712 and 720. How you do that depends on the program. You could add 4 black pixels on either side.

Both VDUB and Avisynth will let you do stuff like that. Look in the capture guide and the avisynth manuals for info on how to do that. Or search the forum.

Or, if you use TMPGENC, you could say that it should center it but not resize, and the bars would be added automagically. (the default of the DVD wizard is stretching whatever you put in to 720 pixels, a bad idea)

I cannot give you any receipies for it, since I am not using my own computer right now. (and am struggeling with the %#$@## clipboard under KDE :( )

North2Polaris
28th December 2003, 20:23
@Arachnotron

Is there any evidence that any of the more commonly used capture card/driver combinations scale to 648 and then crop 8 pixels to get to 640? This would seem to be a possible solution.:rolleyes:

Arachnotron
28th December 2003, 21:01
So far I haven't seen any evidence of such a beast.

But how would the driver know what you are trying to do? This would only work if the driver new both the target resolution AND the target sampling rate . Or rather, the target medium.

Basically, I want a driver where I can set:
- capture resolution
- capture sampling rate
- Horizontal delay

But it will be a long, long wait.......