PDA

View Full Version : Capturing and ratio's


rmedboer82
4th January 2008, 12:39
Hello,

I do have a Medion MD2819 TV-card with a Philips SAA713x Chipset. I'm able to capture with 768x576 and 720x576 (smaller dimensions too). I'm using PAL. My purpose is too capture all available image information so I assume to capture with 768x576 would be the best. According to "Capture-Cards and spect-ratio for Dummies ;-)" by Der Karl there are only 702 active samples in a line (excluding the 9 pixels at both sides for overscan because of timing issues). However, during my capture at 768 I don't get any black bars at the right and the left side. Does this mean that the image has been scaled/stretched which consequently means loss of information? If so, how can I fix this?

I assume that capturing at 768x576 would give black bars at both sides along with the overscan image data. Then I would keep some of the black bars, if there are any, after I took as much as possible image data within the 720 pixels of each line. That way I will keep as much as possible image data (which is not visible on all the TVs because of the 702 active samples).

I 've read that the computer does have a 1:1 ratio for its pixels/samples. The DVD has some other ratio, determined by its
13,5 Mhz clock, but since they are both 4:3 image/screen ratio (a little more for the DVD since its clock is at 53,55 in stead of 52) I should only concern pixel aspect ratio, right?

Will the 720 (within it 702) pixels on a DVD be stretched afterwards/during play (I read something about a play flag in
MPEG which would contain the PAR?)?
Or is there a 1:1 correspondence with pixels on the TV and each of the 720 (and within in its 702) pixels in a line on a DVD?

Also I've read something about resizing a 768x576 image to 720x540 to keep the 4:3 ratio (http://www.tv-cards.com/messageboard/viewtopic.php?pid=20159)
but I assume it is specific for the TMPEGENC application. Its wizard only can handle 4:3 input and output. If one should select output as 4:3 & 720x576 and input as 4:3 & 768x576 it would look thinner according to that site. Manually you can set the output to 1:1 (720x576) which will be normal in case of input 768x576 & 4:3 and will have black borders in case of 720 x 540 & 4:3 input.

My question is: How should I capture? I prefer 768x576 to get all data but I don't see any black borders between the actual 720 and the 48 extra width. If I want it to playback on the computer should I resize/crop my 768x576 image? And I've read that when having a 768x576 image on the computer I should resize it to 720x576 for TV/DVD (PAL) (a circle would look squished then on the computer screen but will be stretched on the TV so it will look normal, i.e. 1:1 ratio)?

What exactly is cropping? Resizing keeping its aspect ratio or introducing black bars as well?

I've read several fora but I still do not get the picture yet. I hope someone can clear up some things for me.

DonQ
4th January 2008, 20:30
My AverTV 503 (SAA7135) allows capturing in 768x576 too. Because I need square pixels (destination: Xvid on PC screen) and my capture card seems to just take about 768 samples from "720 pixels" part of PAL line, then I record at 768x576 (usng VirtualDub and Philips reference drivers), then just crop black borders and don't resize anything.

What I don't know - does SAA713x internally capture 720 or 768 pixels. Somehow I think it captures 768 pixels (it is analog source, after all) - there are no visible upsampling artefacts present.

If I'd capture for DVD, then I'd capture at 720x576 and wouldn't crop/resize anything.

But this doesn't answer your question - because you don't see black borders at left/right. What software are you using for capturing? It is possible that this software (or card driver) sets incorrect timing and your 768 pixels correspond to visible part of PAL line (usually 704 pixels). If yes, then you need to resample your video horizontally to 768*(704/720)=751 pixels. Or better to 752 pixels, otherwise you cannot encode it.

You need to experiment with circles :) and find out, at what resolution distortion is minimal.

And walk through driver and recording software options - maybe you have some "overscan" or "remove black borders" or similar option set?

reepa
4th January 2008, 21:11
What I don't know - does SAA713x internally capture 720 or 768 pixels. Somehow I think it captures 768 pixels (it is analog source, after all) - there are no visible upsampling artefacts present.

According to this*, SAA7135 samples at 27 MHz, which means 1728 samples per line for 50 Hz video (1716 for 60 Hz) internally.

*http://www.nxp.com/acrobat_download/literature/9397/75010349.pdf

DonQ
4th January 2008, 23:08
That means 2*702 samples for visible time (52us). I need to capture at 720 then; I hope avisynth resamples better than philips :)
Thanks for information!

rmedboer82
20th January 2008, 13:34
I've been using uiVCR (doesn't allow 768, max 720) and Virtual VCR. I checked some settings, but I didn't find anything useful for this.

If I introduce black bars (on a DVD/DivX) (to keep the 4:3 ratio) then I might be possible to get all 720 information displayed right? However on the TV it will be at the expense of the height, which would be shrinked I think.

BTW: I don't get it about the calculations you two, DonQ and reepa, made. 27 * 52 = 1404, or is the refreshrate somehow involved?

Any further tips are welcome.

DonQ
22nd January 2008, 23:40
In PAL, one scanline lasts 64us (microseconds), from there visible part is about 52us (other 12us is blank and horizontal sync).
If signal is sampled at 27MHz, then for 52us there are 27x52=1404 samples taken for one line.
Often it is good to resize/resample/average over integer count of samples, this time over two samples, which gives 1404/2=702 final pixels per line.

From what I've understand from PAL capturing basic, 720 pixels horizontally means about 702 visible pixels and 18 black ones (for correcting horizontal sync and other signal issues).

Thereby I just think that if I set my capture card output to 720 pixels and it gives me black borders at left/right, then I will record in sync with cards internal capturing clock.

If you capture 720 pixels, can you see black borders at left/right?

BTW, if you will make DVD (mpeg) from your capture, 720x576 is preferred resolution for 4:3, you don't need to resize anything. DVD encoders may even not work with other resolutions.

rmedboer82
24th January 2008, 14:23
I checked the site reepa gave and SAA7134 has 27 mhz too (which means 702)

Whenever I'm in the blue main menu of controlling the settings (or when the VHS has stopped) I see a black border at right side which could be a significant size of the 18 pixels (since the left side is relatively small). But when I press play this right border dissapears almost completely and is filled with video contents. I guess 4 pixels on the left (which is probably the same as in the menu) and 2 pixels on the right which both is far from the 18 from theory.

"From what I've understand from PAL capturing basic, 720 pixels horizontally means about 702 visible pixels and 18 black ones (for correcting horizontal sync and other signal issues)."

Initially I thought there would be 720 of video/pixels and the active screen (width 702) would be centered within it. That way I would capture at the maximum size (768) to capture all of the 720 pixels (and maybe some more) to get all video info. But I've read something about the ratio's:

"From ITU-R BT.470-6 we know, that for PAL an active area of 52 µs x 576 lines results in a picture with 4:3 Aspect Ratio. A DVD has 720 pixels horizontally. From Jukka Aho's site we know that a DVD player has a sample rate of 13.5 MHz. This results in an active window width of 720 pixels / 13.5 MHz = 53.3333 µs."

Is it right that these 702 will be stretched by the dvd player (because of a slower clock rate 13.5 Mhz or stated else 53.333 µs) to 720? In that case why should 720 be used for DVD?

And why is this?

"From ITU-R BT.470-6 we know, that for PAL an active area of 52 µs x 576 lines results in a picture with 4:3 Aspect Ratio."

This is about the image/picture (not PAR/pixels) I think. But since 52 µs is equivalent to 702 I hardly can imagine it will result in a 4:3 aspect ratio. What's the idea behind this?

Thanks

DonQ
24th January 2008, 23:05
Found nice article (amongst others): http://lipas.uwasa.fi/~f76998/video/conversion/. You really make me educate myself :)

Like I suspected, DVD has 720 pixels horizontally, but 4:3 ratio is based on 702(:576) pixels anyway.
Exactly like capture cards do - both are using PAL standard and (N*)13.5MHz clock.

If you're capturing from SVHS, then you probably don't have expect 702 visible pixels - source material can have more. Recording from live TV you have to.

If you plan make DVD from your captures, then just capture at 720 pixels and do not resize anything.
If you plan make some AVI files from your captures, you need to enlarge them horizontally by factor 768/702 (and optionally crop left/right borders, if any). This makes pixels perfectly square :)