Log in

View Full Version : DAR, PAR, ideal capturing framesizes?


migf1
17th March 2004, 17:59
Hi everybody, this is my 1st post to the English forum of Doom9.

I apologize if the following questions have been asked/answered before, but I've read so much stuff about what I'm going to ask, that chances are I have already read possibly pointed resources. The problem is that the more I read the more confused I get :-( And I think this happens because there's not a logical sequence to the reading I've done so far and/or to the fact that I was unable to find answers to very specific questions I have.

(I have already read the Capture FAQ)

I've asked for pretty much the same info at the DVDRhelp forum yesterday, but got no replies yet. Browsing through that forum, I realized that I should have posted the question here from the very beginning (since more than one guys at DVDRhelp suggested -on other topics- that Doom9 is more appropriate for technical questions). So, here I am!

My main objective is to find out:

which are the IDEAL framesizes for capturing standard, aerial broadcast, 4:3 TV, analog PAL_BG signal (via a composite RCA cable, connected to the GeForce4 Titanum Vi) in order to achieve the maximum possible final quality (retaining BOTH the DAR and the PAR of the source, if possible), when converting to a) VCD mpeg1 b) SVCD mpeg2 ca) Full DVD mpeg2 cb) Half DVD mpeg2

First let me state what I THINK I have understood so far from my reading (please, by all means, feel free to correct me), and then let me put my separate, specific sub-questions right after each one of the statements.

Known facts (?) and related Questions (!)

1. DAR (Display Aspect ratio) only exists in the digital world, SAR (Sample Aspect Ratio)is somehow derived from the analog world, but it equals to PAR (Pixel Aspect ratio) which co-exists with DAR in the digital world.

Question: Can MPEG files have different PARs? If so, is their PAR encoded somewhere in their header? (I know intented DAR is)


2. The standard PAL_BG analog signal corresponds to a digitized video stream with PAR=59/54(=1.0924)and DAR=4/3=(1.3333). But its PAR is converted to 1:1 by the capture-card's digitization process, before it gets saved as an AVI file to the hard disk.

Question: I know AVI's PAR is always 1:1. But what's (S)VCD/DVD MPEG's PAR?


3. (S)VCD/DVD compliant MPEG files store their intended DAR in a special flag into their header. Also, since they are intended to get played back on a TV set, the DVD player should produce from those MPEGS an analog TV-in signal that corresponds to a 1.0924 PAR (59/54) video.

Question: The playback horizontal framesize, which is calculated according to the DAR stored into the mpeg's header, what PAR does it base its calculations on? Does this PAR (whichever it is) reflects the mpeg's true PAR (which the player actually reads from the mpeg), or does it consists just a fixed constant value, which the player just knows about?


4. Full D1 PAL equals to a 768x756 square-pels framesize OR to a 720x576 non-square pels (59/54)framesize.

Question:Where does the above leave the 704x576 framesize? Is this framesize square or non-square? If non-squaer, is its PAR equal to 59/54? And if so, how is it possible to have two DIFFERENT framesizes (720x576 and 704x576) with the SAME DAR AND THE SAME PAR? And if somehow it is possible, when should we use the one and when the other?


5. Half D1 PAL equals to a 384x576 square pels framesize OR to a 352x576 non-square pels (59/54) framesize.

Question: Putting aside the square pels framesize, the above statement directly implies that non-square Full D1 should equal to 704x576 (and not the official 720x576). Unless PAR is not the same for all those 3 framesizes, I'm either crazy or stupid (or what?). But even if their PAR is different, why on earth is it different?

--------------------

Ok, I have already started developing a nasty headache (not for the first time of course, nor for the last I'm sure). I'll stop here for now, bu putting just one more question:

When capturing analog video with the above described details, should I assume/calculate square-pels framesizes on the capturing program's settings or non-square ones (keep in mind that my GeForce4 Ti doeas NOT allow me to capture at 768x576, it maxes out at 720x576).

Thank you very much for your patience (if you've reached this point, that is) and I certainly hope at least one kind soul will put some light onto all this mess.

Best regards,

Arachnotron
17th March 2004, 19:49
hey migf1

Some questions :)

I'll try to point you to some sites (don't have the time to answer more elaborate, but maybe someone else has):)

http://www.uwasa.fi/~f76998/video/conversion/
and
http://www.arachnotron.nl/videocap/site/capture_area2.html

Hints:

DAR does exist in the analogue world. For PAL, a frame of 52 µs / 576 lines has a DAR of 4:3 (µs = microsecond = 1/1000000 second)

The PAL videosignal lasts 64 µs per line, of which 52 µs is video
52 µs equals 702 DVD pixels, NOT 704 or 720. This equals 768x576 square pixel. Some cards cap more than 52 µs, some less but if more but this gives you some extra black pixels. You cannot change that. This window is set, and the card distributes this info over whatever pixels you set as horixzontal resolution. so, depending on what resolution you set you will get a different PAR each time

- Your Gforce probably has a Phillips chip, which probably captures either 52.15 µs or 53.333 µs. See the second link on how to find out exactly.
This would equal 704 or 720 DVD pixels.

Suppose it is 52.15. In that case, cap 704x576, and add 16 black pixels to get 720x576 (or let your MPG2 encoder do it for you) and the AR of the DVD is correct.

- DVD and devices like that play back the pixels at a certain interval. A DVD player is fixed at 13.5 MHz for full size, 9 MHz for SVCD, 6.75 MHz for VCD etc. etc.
So because a VCD pixel is played back at half the speed of a DVD pixel, the length of a videoline resulting from 352 VCD pixels is the same as from 704 DVD pixels. Of course, the VCD line will contain a lot less detail.

Computer pixels are square (not entirely correct, but we'll let that pass), so software DVD players silently resize MPG2 files before playback.

Sorry for the chaotic answer :D

trevlac
17th March 2004, 22:28
PAR is a bad bad thing. Forget about PAR SAR and DAR for a moment.

Think of it this way:

When an analog signal is sampled, pixels are created out of the samples. A faster sampling rate means more pixels for the exact same frame width. Yes. 352 pixels can cover the same width as 704 pixels. Different standards use different sample rates (either going from analog to digital or from d to a. DVD supports 13.5 pixels per microsecond and 6.75 pixels per microsecond. SVCD is 9. VCD is 6.75.

To go along with the sample rate, the standard also states how long the sample line is. DVD supports both a 53.333 (13.5 x 53.333 = 720) and 52.148 (13.5 x 52.148 = 704) sample line. SVCD is 53.333. VCD is 52.148.

So... if you have a standard, you must have a certain nubmer of pixels to be fit across a frame width. The player then knows how long of a scan line to make, and what to make it from. PC players must adjust for PC displays, since they don't really create the analog out like a settop player would.

Some quirks ... when you capture (especially if you have a choice of frame sizes), your device/card almost certainly does not capture at a standard sample rate. This is probably because the card took a non standard line lenght and gave you a 'standard' number of pixels. So when your playback device plays, it with streatch these pixels across the standard line lenght and effectively skew the picture.

What to do? Change the sample rate to a standard and pad/crop to get the right amount of pixels. In english? Figure out the sample line length of your card and resize to standard rate x line length and then pad/crop (ie 13.5 x 50.96 = 688. Add 8 on the sides for 704 DVD)

Arachnotron gave you the links you should read. Especially his site.

PS: Moving from RCA to s-video is a much bigger improvement than accounting for any picture skew.

migf1
20th March 2004, 00:56
Guys, thank you both so much for caring to answer my post (especially trevlac who did it twice: once at DVDRhelp.com and again here).

I don't claim I fully understood the whole thing (English is not my native language) but you have certainly helped me to see things in the right perspective.

I took all the steps Arachnotron suggests on his webpage (excellent resource!) and I figured out that my cards caps at 53.33 microseconds (chipset: Philips SAA 7108E, UIT compliant).

Now, if I understood you guys correctly, this is a standard DVD playback rate so I don't have to do any resizing/cropping/padding at all if I cap at 720x576... right?

One more thing: I think Lordsmurf points out on his website (section: Understanding your source) that a digitized TV aerial analog signal doesn't exceed 352x576. If so, I could safely cap at this framesize (instead of 720x576, thus saving time and space). Actually I gave it a try (I recorded the Australian F1 Grand Prix, 15 days ago) and encoded it with TMPGenc at CQ (Qual=85, min=2000, max=4000) and I wasn't disapointed at all! If I recall it corectly, more than 2.30 hours were fit in one DVD-R). Have I captured & encoded all the info the PAl analog broadcast provided originally?

Best regards,

PS. Trevlac thanks for the tip, but my TV set doesn't provide S-Video Out (only SCART [RGB])

trevlac
20th March 2004, 04:17
Originally posted by migf1
Now, if I understood you guys correctly, this is a standard DVD playback rate so I don't have to do any resizing/cropping/padding at all if I cap at 720x576... right?

If you cap a 53.333 line, 720 is perfect for DVD. If you want 352, you can cap at 360 and crop to 352. There is some evidence that a cap at 720 and a post cap resize to 360, with a crop to 352 may improve your picture. You have to test.


One more thing: I think Lordsmurf points out on his website (section: Understanding your source) that a digitized TV aerial analog signal doesn't exceed 352x576. If so, I could safely cap at this framesize (instead of 720x576, thus saving time and space). Actually I gave it a try (I recorded the Australian F1 Grand Prix, 15 days ago) and encoded it with TMPGenc at CQ (Qual=85, min=2000, max=4000) and I wasn't disapointed at all! If I recall it corectly, more than 2.30 hours were fit in one DVD-R). Have I captured & encoded all the info the PAl analog broadcast provided originally?

He's wrong. ;) A PAL broadcast signal contains more detail than can fit into a 352x576 frame. But a few things get in the way of it making a difference. The program material has to contain the xtra detail. It may not, even though the spec allows it. Your card may also filter out the xtra detail. Finally, the RCA connections probably limit the amount of detail. Bottom line? If 352 looks as good as 720, then cap at 360 and crop to 352.


....

Hopefully Arachno chimes in to make sure I didn't miss anything. :D

Arachnotron
20th March 2004, 13:35
@migf1

I just have a few remarks, Trev explained things more clearly the I could (as I kinda guessed he would) :)

I believe Greece uses SECAM B and G for TV broadcast?
So, timing is identical to PAL. Video bandwidth is 5 MHZ. (thats in the specs for SECAM B and G)
If all that bandwidth is used by the studio, theoretically you would need at least 5 x 53.333 x 2 = 533 pixels to do justice to the amount of detail possible in this signal.
Of course not all the potential for detail might be used, but on the other hand a few pixels more may bring better playback on imperfect players/TV's.

So If you really want to get it all, go full DVD size. :).

As to the TV only having SCART: Scart can carry composite, S-vid and RGB (and sound) both in and out. If it really does depends on how the device is wired, there are many ways to do this. SCART refers just to a set of wiring possibilities and the connector itself, but does not say anything about which signals are actually available.

But I think Trev was referring to capping tape. There, a s-video if available (sadly, not on most VHS VCR's, you need a s-VHS machine for that) will give a big boost in quality.
(the same goes for other external sources: if available, use s-vid instead of composite. Generally it gives better quality. But as always, do test just to be sure. Occasionally a device will produce a bad s-video signal)

[edit]capping at higher resolutions also will capture more noise. This can confuse the issue a bit. You may need to do some filtering before you really can compare the difference.

migf1
25th March 2004, 13:14
Too many things to do, to little time!

I apologize for my delayed post but things got a little wild at work these past days, so I didn't really have the needed time to play around with my video editing hobby.

Thanks again guys for the precious knowledge you are sharing. It's pretty clear to me now that with my card (and providing that the analog source is the TV and the final standard is DVD), the safe side would be to either capture at 720x576 (best) or at 360x576 and then crop to 352x576 (second best).

@Arachnotron: in Greece we used to use SECAM many years ago. We now use PAL B and G for TV broadcast.

@Trevlac: actually, in my testing, capping at 352x576 doesn't look at the final product as good as capping at 720x576 (it looks more blurred). What I tried to say in the previous post was that it wasn't as bad as I was expecting it to be. Actually, it looked quite good (especially taking into account the fact that I almost halfed down the encoding time and that more than 2:30 hours of video were fit into just one DVDR).

@Both: thanks again for the s-video tip and the info that SCART can carry all 3 types of video (composite, s-video and RGB). I will certainly give it a try, bying a wire converter (one of those wires with a SCART edge on one side and an s-video one on the other side).

Best regards,