PDA

View Full Version : DVD and Aspect Ratio


yingx2
12th November 2003, 09:05
I just bought a DVD burner a week ago. Lately I've been trying to make proper DVD conversions and problems have occured. I capture at 704x480 with MJPEG codec, let CCE or TMPGEnc produce a DVD-compliant MPEG2 stream, and later use TMPG DVD Author for authoring and burning.

The problem is, when I watch the disc I created with a standalone DVD player, the picture looks a little bit horizontally stretched. I found this by comparing the size and the location of the TV station logo.

The logo became "fatter"(very very sightly) so a little part of it was forced to be printed onto the overscan area after the DVD convertion. I can correct this problem using the following script:

avisource("704x480_interlaced.avi")
lanczosresize(688, 480)
addborders(16,0,0,0)
(I can also capture at 688x480 and add borders to make it 704x480)

Either way, the aspect ratio would look correct(I still believe it would not be perfect ).
But this "solution" is pretty strange to me.
Is this a ITU related problem? Am I doing it right? What is the legitimate method to create a DVD with the correct AR in my case?
Thanks for any help in advance.

jggimi
12th November 2003, 15:43
DVDs are always anamorphic, in that the pixels are never square. But typical analog captures use square pixels for display on PC.

For example, PAL DVD video streams are 720x576, right? That is a ratio of 1.25:1. The Display Aspect Ratio, or DAR, as described in the IFO will either be 4:3 (1.33:1) or 16:9 (1.85:1).

I don't burn DVDs, but bb has a fairly nice "DV to DVD" guide in the DV forum. DV on PC is usually an AVI codec, with square pixels, so his guide may be applicable to your issue. It has a section on setting aspect ratios in CCE, which might help. In addtion, there is Doom9's AVI -> DVD-R guide, which may also be of service.

Kika
12th November 2003, 15:51
If the Checkbox DVD compliant is activated, CCE always produces 720x480 (720x576), even if the source has an other Size. Uncheck this Options if you are using 704x480.

For example, PAL DVD video streams are 720x576, right?

No, PAL DVD-Streams (MPEG2) are:
352x576
704x576
720x576
(for NTSC set all 576 to 480)

Wilbert
12th November 2003, 15:54
DVDs are always anamorphic, (...)
Or fullscreen. I guess he encoded to anamorphic. You have to select the option fullscreen (4:3) in TMPGEnc for your target.

If you want to encode it as anamorphic, you have to change your script as follows:

avisource("704x480_interlaced.avi")
SeparateFields()
lanczosresize(688, 240)
Weave()
addborders(16,0,0,0)

jggimi
12th November 2003, 16:00
@Wilbert:...Or fullscreen....Just to clarify my point. The capture likely used square pixels, and even fullscreen DVD (DAR 4:3) uses anamorphic pixels.

@Kika:

I know there are multiple resolutions in the standard, but all of them use anamorphic pixels.

@Everyone:

I should have made my statements clearer.

Wilbert
12th November 2003, 17:15
even fullscreen DVD (DAR 4:3) uses anamorphic pixels.
Sorry, I don't understand what you mean by anamorphic pixels. Or do you mean not square?

jggimi
12th November 2003, 17:18
That's exactly what I mean. PC analog captures are typically square pixels, for display on PCs.

erratic
12th November 2003, 17:30
Originally posted by yingx2
addborders(16,0,0,0)
(I can also capture at 688x480 and add borders to make it 704x480)I think that should be AddBorders(16,0,16,0).
And yes, you can capture 688x480 and use the same AddBorders command without resizing. That's what I would do if I had a card like yours. I assume you have a capture card (Hauppauge?) with a Brooktree/Conexant chip. The aspect ratio should be correct (if you're not using the BTWinCap driver).

Kika
12th November 2003, 17:46
Capturing and encoding in 704x480 is OK. But like i wrote: On 704x480 you have to deactivate DVD compliant in CCE. If not, CCE stretches the Picture to 720x480.

In TMPGEnc you have to use the correct Settings:

Video arrange Methode: Center
Source aspect ratio: 4:3 Display or 4:3 525 line (NTSC 704x480)
Aspect ratio: 4:3
Size: 704x480 or 720x480, both will work (if you'r using Center)

Arachnotron
12th November 2003, 17:58
DVD pixels are exactly 1/13.5 = 0.074 microseconds long on playback for both NTSC and PAL.

The trick is to capture at / resize to such a resolution that the final pixels also represent this number, and add black pixels at both size until you hit either 704 or 720.

Unfortunatly, the exact capture area is not the same for all capture devices and never written on the box :mad:

for NTSC, cap at/resize to:

712 for a BT878 based card with BTWincap drivers
688 for BT878 with conexant reference based drivers like Hauppauge WDM 5 or Iulabs universal
688 for CX23881 based Hauppauge cards
704 for most saa713x based cards

etc. etc.

see these two threads for more info on determining it for yourself:
http://forum.doom9.org/showthread.php?s=&threadid=32604
http://forum.doom9.org/showthread.php?s=&threadid=64635

trevlac
13th November 2003, 04:34
@yingx2

To clarify:

You are probably doing the right thing (depends on your chip/driver). Capture cards generally do not capture 720/704 even if you ask for 720/704. They capture numbers like 712/688 and stretch or shrink to 720/704.

Strange isn't it? :) The exact behavior is dependant upon the driver.

In addition, they do not capture the picture center, but they don't look to be way off here.


If you have a BT8x8 based card, you may be interested in a little JavaScript calculator I created to help me see exactly what is going on with various drivers. I added some explinations to what I was using.

http://trevlac.us/BT8x8calc.htm

PS: Arachnotron clued me into the details of this issue. Comments on DAR, PAR, SAR are related, but not really the root of the problem. If you get the cap right, everyting else flows to DVD quite well.

r6d2
13th November 2003, 05:10
Originally posted by jggimi
@Everyone:

I should have made my statements clearer.
Sorry to butt in, but I'm in the everyone category ;)

Just so nobody gets confused about this, pixels are not square for NTSC and PAL (even the term pixel does not apply correctly to analog TV).

But being so doesn't mean the source is anamorphic. Anamorphic means that the pixels are to be interpreted as being even less square than what the format specifies.

In fact, you can have anamorphic encodes with source square pixels too.

Arachnotron
13th November 2003, 11:15
@trevlac

Nice calculator!
I just have a small comment: when I first copied btool + bt8x8.dll on my machine it didn't work (XP). Only when I installed the complete TV application (BTTV ore something like that, you probably know which one) it did, so maybe it needs something else too.

yingx2
13th November 2003, 12:07
Thanks for all the replies. I really appreciate that. Actually I've read lots of threads about this AR issue today, and I'm getting clear and confused at the same time.

I'd like to provide more information for my situation:
I didn't check the DVD compliant option in CCE becuase my authoring program doesn't seem to like it. And I encoded the source as fullscreen 4:3 (not 16:9) in CCE. My card is a bt8x8-based one, and I use the driver that came with the product(not the BTWinCap driver).

@Arachnotron
I hope I understand you correctly.

You're saying that the active area length of my capturing is 688, so if I encode my 704x480 avi directly to MPEG-2 without resizing and adding borders, I will get a DVD with a horizontally stretched picture, right?(I think this makes sense.)

Still, I have some questions. I made 2 MPEG-2 files out of a 688x480 avi, one is 704x480( addborders(8,0,8,0) ), the other is 720x480( addborders(16,0,16,0) ). Both should be of correct AR according to your explanation. So I created a DVD with these 2 tracks in it and watched it on my computer using PowerDVD 5. However, 704x480 and 720x480 looked pretty different. I guess this makes sense since the borders in the 720x480 track are larger, so the actuall image is squeesed more( people look thiner). But when I played it with a standalone player, they looked exactly identical, which I don't understand. (There were two TV logos locating at the very upper left and right corner respectively in the source, so if anything went wrong I could easily tell ). I think I'm totally lost. Any help?

@ trevlac
Thanks for the great tool, but it didn't work here. (err message "Can't open driver! Please run 'bInstall.exe' first...")
Anything else I can do to tell my active picture size?

Kika
13th November 2003, 12:17
But when I played it with a standalone player, they looked exactly identical, which I don't understand.

But that's how the Player/TV should act. 720x480 is exactly the same than 704x480, it includes 16 Pixels of Overscan.
If the Source- and the Target-AR is correct, both resolutions do show you exactly the same Picture on your TV.

The Motion Area is defined as 704x480, no matter if you use 720 or 704, if all is correct, the visible Picture has to be 704.

yingx2
13th November 2003, 12:35
@kika
In other words, overscan doesn't exist on a computer monitor, so PowerDVD cannot keep the correct aspect ratio in my case even when "keep aspect ratio" is checked, am I right?

trevlac
13th November 2003, 14:41
@Arachnotron
Thanks for taking a look at the calc. I was going to ask you to see if it made sense. I made an update to give the apps for a correct install. << Oh what I'd give for a clean machine to test on.>>


@yingx2

Sorry for the bad install. I updated the page. Apparently you need to run the whole driver install "bInstall" to get btTool to work. Can you give it another try and let me know? I'll also add advice on getting to sizes other than 720.

Overscan should not effect aspect ratio. What PowerDVD does is probably a long story in itself. :)

@Kika

You have the right idea, but you are mixing some information.
The active picture area on an analog NTSC TV is 711 "pixels". On PAL it is 702. 704 is not the case for either.

The visible picture area depends upon the TV. This "Overscan" generally chops off 5% more on each side.

Bottom line: Going from a 720(or 704) pixel line to analog NTSC overlays the edges with analog signal timing information (pads with black for 704) and gives you 711 (702 for PAL). Of this 711 you are likely to see 711 - 10% = 640 pixels.

As far as the exact numbers, I'd bet different dvd players do this differently. I believe my shinco shifts the picture going from 720 to 711. Arachnotron described what his player does in one of the post links he gave.

Kika
13th November 2003, 14:53
@trevlac

I talked about the DVD-Motion Area, not the Size of NTSC or PAL Broadcast.

Broadcast:
NTSC: 711x486
PAL: 701.96x576

And you are right. Any Device will handle it a little different. TVs, VCRs, DVD-Players, Capture-Cards - they all do have their own Ideas about Motion- and Active Pixel Areas. :rolleyes:

yingx2
13th November 2003, 15:48
Thank you trevlac. It's working now.

The result is:
"You captured a width of 688 TV pixels. This was shrunk to 640 pixels. Your picture starts 17 pixels in from the begining of a 720 pixel line. To get to a centered 720, resize to 688 and add 17 pixels on the left and 15 on the right."

Does it mean that, when making DVDs, I should always capture at 688x480 and add a 16x480 black area on each side of the picture( for compression efficiency)? What about half D1 resolution? Resize to 344x480 first?

Anyway, I think the Capture FAQ sticky post should include your caculator page link:)

Arachnotron
13th November 2003, 16:18
As far as the exact numbers, I'd bet different dvd players do this differently.

In in fact tested two dvd players, a sony and a pioneer.

They both didn't display all the pixels, but differed in which ones were cropped, they put the center at a slightly different place and didn't display some lines at either top or bottom.

But, since the pixels they did display kept the same width (1/13.5 microseconds wide; both players were using a 27 MHz crystal.) and any cropped line was replaced by either a digital signal line (WSS) or a black line this doesn't influence the aspect ratio since the total number of lines stayed the same.

In the end, where the center originally was is not such an issue since mostly the area actually containing usable picture in a capture will be smaller then the theoretical maximum active area.

Simply try to keep whatever part of a capture contains actual picture centered both horizontally and vertically and your ok.

http://www.iki.fi/znark/video/conversion/

is a nice page about this kind of stuff

Arachnotron
13th November 2003, 16:27
@ trevlac:

You captured a width of 712 TV pixels

A small point perhaps, butI would call this either DVD pixels or ITU-R BT.601 pixels. , since most TV's don't have pixels.

Arachnotron
13th November 2003, 16:51
@Yingx2

Sorry, I missed your question. (This discussion is getting a bit hectic.)
As far as I can see noboddy answered it yet.

However, 704x480 and 720x480 looked pretty different

You should encode 704x480 to an 704x480 MPEG2, the other to an 720x480 MPEG2.

My guess is you converted both to an 720x480 MPEG, thus stretching the 704x480 one.

erratic
13th November 2003, 18:54
Arachnotron,

Yingx2 wrote that both 704x480 (8+688+8) and 720x480 (16+688+16) look the same on his tv but different when played with PowerDVD 5. I think that's because PowerDVD resizes both 704 and 720 to square pixel 4:3 or full screen for playback on a monitor. If I'm not mistaken 4:3 NTSC is 711x480 (DVD pixels) so neither 720 nor 704 will have the perfect aspect ratio when resized to a square pixel resolution or full screen. Before resizing, 720 should be cropped to 711, and 704 should be padded to 711.

PAL 704 and 720 should be cropped to 702x576 and then resized to a square pixel resolution or full screen.

Conclusion: software DVD players aren't perfect (yet).
Correct me if I'm wrong.

trevlac
13th November 2003, 19:46
@Kika

I don't dispute what you are generally saying. I just have a different understanding depending on the words. If one was to have a 720/704x? DVD pixel picture and you played it on an analog TV, the picture would be passed thru a series of "frames" that would pad/crop. The AR would not change. The process would be:

- DVD player Converts digital to analog. An analog TV picture has the dimensions you pointed out. 711 & 702 are the widths. For NTSC, I believe this is covered in SMTPE-170M. I have seen this process called "digital overscan".

- A TV displays generally only 90% of the 711/702

- The motion area is generally considered the center 80%. This comes into play when the image is being shot or menus are being authored. It is not considered safe to put action outside because it may not be seen.

- The title safe area is the center 60% of the original. Same reasons as motion, but more strict for reading text.



@yingx2

For your driver (iuLabs ?), a good option would be to cap at 688 and add 17 to the left and 15 to the right. It would be interesting to see what the calculator says for 688 on your driver. For 1/2 D1, I'd cap at 688, process the file with filters, add 9 to the left, 7 to the right, giving you 704, then resize to 352. For 480, same as 352, but pad to 720 and resize to 480. 640 is a different story...

I am trying to add suggestions to the calculator based upon your desired size.

By the way...I made the calculator to explain a topic, not to really do much work. If you could tell me what is not clear, that would be great.

Would this clearify things? Generally you should cap at the highest resolution in the correct aspect ratio so you do not have to resize. This is the same as the capture width the calc gives you. You should then process/filter the file because this would give your filters the most info. Next add/crop to get to a compliant full resolution. Finally, resize from 704 to 352 or 720 to 480 if you are doing 1/2D1 or SVCD.

A final note: Always try to understand why when you follow advice. Maybe I'm just a crack-pot making it up. :D


@Arachnotron

"DVD pixels" Brilliant! 601/53.333/non-square/(1/13.5) all seem to cause too much confusion.

Arachnotron
13th November 2003, 22:37
@erratic

Sorry, I misunderstood the question :o


Conclusion: software DVD players aren't perfect (yet).
Correct me if I'm wrong.


No, dead right. A quick google learns that powerDVD has had it's share of AR related problems (and patches)

Keeping AR correct on TV is soo much simpler!

Kika
14th November 2003, 10:05
@trevlac

I know what you mean. We are talking about the same things using different words. Sometimes i'm a bit clumsy in use of Terms because my english is terrible. ;)

trevlac
14th November 2003, 12:23
Originally posted by Kika
@trevlac

I know what you mean. We are talking about the same things using different words. Sometimes i'm a bit clumsy in use of Terms because my english is terrible. ;)

I coud tell you knew the exact problem. My German is so bad I can't even begin to read "Capture-Karten und aspect ratio fuer Dummies". I wish I could read it. :( :(