pixel aspect ratio

Randy Brown wrote on 7/12/2003, 5:29 PM
Yes, I did do a search for "pixel aspect ratio" but couldn't find the answers for these 2 questions, please help:
1) I just scanned 47 pictures at 655 X 480 (or at least ? X 480) as suggested by most V4 users. The top and bottom are cut off slightly; if I zoom in with pan/crop the top and bottom are there again. Could it just be my external TV monitor?
2) They all imported into V4 as square pixel as opposed to NTSC (even though NTSC is selected for "pixel aspect ratio" in properties) do I need to select each of their properties dialog and change them to NTSC or will they automatically render as NTSC?
TIA,
Randy

Comments

jetdv wrote on 7/12/2003, 5:42 PM
Scan pictures at whatever size they are. Don't worry about ??? x ???. Once the picture is added to the timeline, open Pan/Crop, right-click the image, and choose "Match Output Aspect".

Read the newsletter on creating slide show in Vegas Tips, Tricks, and Scripts
Randy Brown wrote on 7/12/2003, 7:18 PM
Thanks jet,
The "photograher" was terrible, so I thought if I cropped in the scanning software that it would scan a better resolution...no?
I did choose "match output aspect" after reading your post to some other ignorant user but the top and bottom are still cut off on my external monitor.
Thanks again jet,
Randy
Chienworks wrote on 7/12/2003, 7:51 PM
Ahhhh, "external monitor". Look closely and you'll probably see that the sides are cut off too. This is due to overscan on the monitor. The image is larger than the viewable area of the screen, usually by about 10% or so. This is done deliberately so that you don't see the edges of the image. You need to keep the important parts of the image inside the safe area of the screen. In other words, you need to have lots of unimportant space around the subject in the picture.
Randy Brown wrote on 7/12/2003, 8:33 PM
Hey Kelly,
>>"Look closely and you'll probably see that the sides are cut off too"<<
That's just it buddy, the sides are not cut off.
Is 655 X 480 indeed the optimum size?
Thanks again Kelly,
Randy
Family_Voices wrote on 7/12/2003, 8:45 PM
Over-scan is what I understand as well. I wrote up about over-scan on another thread today* but I was hoping that with modern tolerances and such that they had moved from near 10% back to hopefully 3%. 10% of 480 is 48 rows of the picture leaving only 442 to be seen more or less. Not good. Viewed on a computer monitor or projected with an LC projector there will hopefully be settings where all of the image can be seen. When you consider that the 10% applies in both direcitons about 20% of the pixels are missing beyond the borders of the television screen's bezel. (I wanted to write overscan as the other responder did but my spell checker flags it and erring to caution I hyphenated the term.)

I was dealt with pixel aspect ratio today in that same response.* For 4:3 material and DV that the pixels are not square but are squashed so that they are narrower then they are high. The 4:3 screen aspect ratio of both 8mm film movies and NTSC television is matched by the VGA format, 640x480 (as we used to write it). The DV spec provides for more pixel width than that: DV pixel width is 720. So the pixel width (to bring things back to 4:3) must be squashed by the codec that sends out the video for a television set by the ratio of 640/720 = 64/72 = 8/9 which is the repeating decimal .888...

Best regards,
Ralph
July 12, 2003

Bonus section (for those who like to read, footnotes will be down here too):

*Both of these responses that I mention are in the thread "RE: When DV is inside a PC…". I also discussed letterboxing there and mentioned using a morphed image.

An image can be morphed so that the image is squished horizontally if viewed on 4:3 for example (or when being captured on a 4:3 image array chip). The idea is that when the distortion is removed one wants to get 16:9 (and 480 pixels high) if viewing on a wide aspect screen of that form factor. This means that the pixels have to be stretched a little. For 480 pixels high 16:9 achieved with square pixels would need (16/9)*480 or 853.33... pixels horizontally. Accordingly the stretch required is 853.33../720 (as 720 is the actual pixels present). This is 1.185.. (another repeating decimal but three digits in the repeating unit).

1.185 is actually a little wider stretch then .888 is going the other way, I said the opposite on the other thread. To see that this is correct take the reciprocal of one number and compare it to the other. A more elegant way to compare two decimal numbers, one of which are larger than 1 and some of which is smaller, is to take the logarithm of both numbers (this may need to be using base 10 logarithms, I need to think this through more to understand why that would be the case but it would deal with 1 being the swing value). After doing this compare the result ignoring the sign. The base 10 log of .888 is a larger number (ignoring the sign) so it is “nearer” to 1 and less distorted then the stretch represented by the ratio 1.185 (both ratios are taken from the first sentence of this paragraph).

If I crunched one of these numbers wrong I will be in error this time but I tried to get it right. On the other thread I just eyeballed the numbers but didn’t actually carry out the calculation.
riredale wrote on 7/13/2003, 1:48 AM
Ralph:

I just came across this thread after responding to your other thread. The correct DV aspect ratio for NTSC is .9091. The number you calculated is incorrect because you assumed a 4:3 aspect ratio, which DV is not. It's more like 4.1:3.
mikkie wrote on 7/13/2003, 11:09 AM
"The "photograher" was terrible, so I thought if I cropped in the scanning software that it would scan a better resolution...no? "

FWIW, usually like to crop off extra stuff, like print borders when scanning, but use it as a rough cut - usually don't like to rely on anything in the scanner driver dialog, preferring P/Shop or similar to do any real work...

"Is 655 X 480 indeed the optimum size?"

In my opinion No...
Your final video will be shown or output at 720 x 480 - correct? Then start out with 720 x 480 (or larger if you want some room to play with pan/crop). If you use a smaller size photo, it will either letterbox or stretch depending on how you set things up.

So import a 720 x 480, right click on the image clip, select properties, set the aspect ratio to DV spec on the second tab. OR Right click on the image clip and deselect maintain aspect. OR Perhaps render with Stretch to fill Frame selected....

In any case, your picture is so-called square pixel, right?, as image editing software doesn't know pixel aspect from... Because it's square on the timeline, Vegas isn't sure how it should look in the preview window - the first 2 methods above should tell it you want it converted to DV spec... After render when output to TV or played by wmplayer, should get your original 720 wide display, just as the DV footage is displayed at 720 wide (in the case of the TV, whether you can see it or not)
SonyDennis wrote on 7/14/2003, 3:29 PM
Don't scan at 720x480 and then apply DV pixel aspect ratio; you'll squash your picture. Like JetDV recommends, scan at whatever size you want, at a high enough resolution so once you zoom in as much as you plan to, you're still not "blowing up" pixels (digital zooming) but rather are always scaling down. Watch the size field to not go below 480 lines. Always right-click in the Pan/Crop image and choose "Match Output Aspect". Always render using "Best" quality (set in project properties) so the best image downscaler is used.

655x480 is the answer to the question "what size still image should I bring in that will exactly fit over an NTSC video image without any pan/crop?"

///d@
mikkie wrote on 7/14/2003, 5:37 PM
"Don't scan at 720x480 and then apply DV pixel aspect ratio; you'll squash your picture. "

Sorry, but I do have a big prob. with that based on tests I've run, though I don't want to beat this to death, or be a pain in the a__. If anyone wants to run this test themselves, or explain why it works or doesn't or whatever, welcome to it.

Take a picture at 720 x 480, I import it into the timeline in a proj set to the ntsc dv template. Leaving everything alone, I render a few seconds of that still as a DV avi. That avi file is 720 x 480 as expected, can take a still of it in something like power dvd and the still is 720 x 480. The actual picture portion is letterboxed, as well as distorted compared to the original still, it's shrunken in height.

Now, take that same still on the timeline, right click on the still, de-select maintain aspect, and the picture fills the frame in the preview window. Render a DV spec avi, take a copy of that as a still, you've got a picture at 720 x 480, as expected, and the picture is no longer letterboxed nor distorted. You get the same results if you select the so-called pixel aspect ratio to dv spec.

All one has to do is compare the results...

Now take a pic that's the stated 655x480 and import it into the timeline. Should fit the preview just fine as is. Render the still as a DV spec avi as before. Take a still from the DV file in power dvd or whatever. Compare the stills. You'll see that they are not the same, the DV captured version is distorted.

How can you compensate? You can use P/Shop or similar to resize your 720 x 480 original to 654 x 480 (which is what you get when you save a still from the preview window of a dv project), being careful to once again *De-select* maintain aspect in your image editing app. You're now doing the same thing, in your image editor that you could do in Vegas. Again, give it a try - don't take my word for any of this.

When you have a set frame size, add whatever aspect into the mix, everything you do should match that aspect all the way thru, or allow matching on render. Take a 720 x 480 clip, render it to NTSC SVCD at 480 x 480. If you don't *de-select* maintain aspect, you'll get a distorted and letterboxed video when played by something that understands the SVCD 480 width, and to expand it out to 720. You're just "conforming" your data... Take something widescreen, set the proj to 720 x 480, de-select maintain aspect, render an anamorphic video - something most are familiar with, that dvd players & software expand to original size upon reading the 16:9 flag. Get used to the idea that it's what you render that's important, and the preview is an approximation that may not be correct. I mean, I'd not want to be the one to explain why your subject looks fat in the video - saying it looked good in preview windows just doesn't work!

Want to do a pan over a still, And keep the original aspect... Just about have to change the pixel aspect if going in a DV proj. Take a large image and open it in something that can superimpose a grid, like Corel or Ill or whatever. Check your grid after a pan when you keep it at square pixels in a DV proj.

OK, there it is, have beat this to death, a few have tried it and agreed... Pixel aspect can be overthought. Believe your eyes.

A final thought occured, so I'm adding it in here... IF you use the do not letterbox square on the render as dialog, results are not always predictable, so do a test render first. I discovered this trying to emulate the cropping function in TMPGEnc for mpg2 compression. I had hoped to take a cropped widescreen avi, not letterboxed, and encode to mpg2 letterboxed. Results were varied and kind of flakey, so please check out anything rendered when you use this.
Chienworks wrote on 7/14/2003, 7:14 PM
mikkie: you're doing too much work.

Place a 655x480 1:1 pixel aspect ratio picture on the timeline and it fills the frame. As you say, it should fit the preview just fine as is, and it does. What more do you want?

All the things you've done to show it doesn't fit (which, by the way, it did fit before you did those things) was to alter the pixel aspect ratio in ways that didn't need to be done. Same with the 720x480 clip that you forced to fit by deselecting the maintain aspect ratio, which was an unnecessary step. What you are doing in both cases is altering the aspect ratio in one of the transformations and not in the other going back to the original format. If you want to make your test accurate, you have to make sure you undo everything that you've done.

The pixel aspect ratio for DV 720x480 is 0.9091. That means that the pixels are only 0.9091 times as wide as they are high. Multiply 720 by this this ratio and you get 654.552, or 655 if you round it off. This means that the image shape is 655/480 times as wide as it is tall. Since still images generally deal with square pixels (1:1 ratio), your still image needs to be 655/480 times as wide as it is tall too. Vegas will stretch the 655x480 image out to fill 720x480, but then displays this frame slightly narrower so that the image ends up being the original width.

When you make a still image from this video in PowerDVD it naively produces a dump of the DV file at 720x480, but ... and here's the problem ... other software assumes that since it's a still image that it has a pixel aspect ratio of 1:1 instead of 0.9091 so the image is displayed as 720x480 times as wide as it is tall. You can easily demonstrate this fault by doing the same thing with a frame of a video you've taken with your camcorder or from a commercial DVD. You'll see the same stretching with these as you will with the still you were working with. The error is how PowerDVD incorrectly saves the image.

In Vegas, drop a 655x480 still onto the timeline and it fills the frame. Save a snapshot of that frame from Vegas' preview window (set to full instead of auto) and you'll get a 655x480 image, the same as the original.
Randy Brown wrote on 7/15/2003, 9:43 AM
Thanks to everyone for you efforts (and patience). It's a bit of a pain trying to come up with perfect 655 X 480 pics anyway so I think I'll just take the advice to scan at whatever default size the scanner likes and crop and zoom in pan/crop. One more question though please ( I don't think it was addressed): When I bring in these scans, they show to be square under properies/pixel aspect ratio; do I need to change this to NTSC DV (if going to DVD or tape)?
Thanks again,
Randy
jetdv wrote on 7/15/2003, 9:59 AM
Randy,

You are putting WAY too much thought into this.

Step 1: Scan a picture (use the scanning software to eliminate any borders you don't want and scan at a reasonable DPI for how far inward you want to zoom - I usually just scan everything at 300 dpi for simplicity's sake)

Step 2: Add the picture to the timeline

Step 3: Open the Pan/Crop box

Step 4: Right-Click the image and choose "Match Output Aspect"

Step 5: Adjust the Pan/Zoom for the picture(s)

Don't worry about anything else. This will just work!

Alternately for steps 3 and 4, you can run the "MatchAspect.js" script found at http://www.ayizwe.net/VegasScripts/
Randy Brown wrote on 7/15/2003, 10:18 AM
But that's too easy jet, I'd feel guilty about being paid for it : )
Thanks again,
Randy
mikkie wrote on 7/15/2003, 11:00 AM
Hi Kelly!

I had posted: "If anyone wants to run this test themselves, or explain why it works or doesn't or whatever, welcome to it." So I really do appreciate your reply. Personally I believe that SonicDennis is wrong, and take some slight offense at that because his position with SOFO might give others a bad impression at a time when SOFO loyalists should be concerned with Adobe and all. I also apologize for any appearance of arrogance - I've wrestled with this actually, wondering how to correct something, someone without appearing arrogant yet not just leaving it go either. And of course don't want to repeat this past Sunday's Dilbert...

Presents a problem where I don't want to say or imply I know more then a SOFO rep, as I don't. Why should one listen to me versus one of them? Because they are human, & make mistakes. When VV4 was young I emailed a prob I found, along with the cure, as a courtesy in case it was of interest. SOFO sent back an irrelevant reply, sending me a file with the cure I'd sent them. Not saying that I was the source for that file - that part's irrelevant - but proves they didn't read the email, got sloppy. It happens... Besides, didn't say believe me anyway - said try it out.


Now I do respectfully disagree with your posting, Kelly. I really don't, can't reproduce any errors taking stills with PowerDVD 4 XP. I can't believe that millions of folks are wrong, and they would be by accepting software that doesn't work, and I'm talking players besides PowerDVD, which I used simply because so many have it, and it's low ($12 oem) cost online. Maybe it's because when you tried it you didn't set PowedDVD to capture the window size, or perhaps one of the other settings were off - please check. From anyone else I would be quipping about The Emperor With No Clothes, changing one's view to match what one believes has to be.

"Vegas will stretch the 655x480 image out to fill 720x480, but then displays this frame slightly narrower so that the image ends up being the original width."

Have you seen this Kelly? Really, not being facetious at all, but genuinely asking because I haven't seen it. It really would be much easier if someone did prove me wrong, 'cause then I could stop any crusade on my part to stem what I today still consider an inaccuracy being repeated in the same way as many an urban legend.

What I do see, is that Vegas takes a still with square pixels and converts it to the DV spec on render. Doing so, it behaves the same way as if you wanted to create an anamorphic mpg2, or if you want to create an SVCD - I'll use the latter as it's perhaps more commonly done by readers in this forum. Vegas will letterbox the rendered video unless something is changed in the project settings. It's been noted in another thread this morning that some like to check the *do not letterbox* square on the render as dialog when creating SVCDs. Others like to uncheck maintain aspect, and it is possible to change the aspect for the clip when the drop down settings match the desired final file aspect. Vegas really doesn't differentiate in it's behavior just because you dropped in a still, as long as the picture isn't larger then the frame - maybe that's where the confusion comes?

And I haven't seen SonicDennis or anyone else posting that you have to crop a square pixel avi file prior to importing it into a DV project. If that were the case, suspect it [Vegas] would have been abandoned long ago as a toy. Instead, the avi is imported whole, is it not? Why would Vegas behave differently with a still? What if I opened a non-DV proj, created an mjpg avi from a still... how would I import that into a DV project, and how would I set things? Why should that be any different then a still?

"In Vegas, drop a 655x480 still onto the timeline and it fills the frame. Save a snapshot of that frame from Vegas' preview window (set to full instead of auto) and you'll get a 655x480 image, the same as the original. "

Actually I get a 654 width, but why quibble? And this kind of proves the point I want to make, that to Vegas that is just a simple window. It's nothing magical. Vegas will indeed assume a picture has square pixels, as will everything else. Import a cropped still, and Vegas will still use square pixels, right? Render the file to DV however, and it will convert the still to the DV pixel aspect - has to or the picture will be non-spec in the middle of the DV avi. Convert the picture, and you'll distort it, period. Distort the picture in the project, put it back on playback - entire principle behind DV, SVCD, WideScreen DVD. If you don't squish it in Vegas, what can possibly happen on playback when it's expanded from ~655 to 720? There doesn't seem to be an alternative.

So, if the final picture is to be displayed at 720 x 480, if you start with something that size, it'll look right at 720 x 480. When one tapes DV, much simplified it takes a 720 x 480 picture - has to or else there would be no data over 655 pixels wide when played back on your tv or whatever, or, everything would be stretched and folks would have stuck to Hi-8. To save room, the footprint on tape is reduced using this aspect. I mean, it's the reason CVCD was ~352 (or 355?), and SVCD is 480. Nothing magic. Proper playback requires spreading things back out.

How can you spread out a picture cropped to 655 width, without distorting it? Enlarge the whole thing, crop off 48 pixels from the height, but wait a minute, that wouldn't look the same as the original, and how is the player going to know to do that? Maybe it's noted with flags, but is there time during playback to accomplish this 30 times a second? Could it be done with Vegas? Sure, but Vegas would need to have a special feature built in for handling picture files. What if you wanted something non-standard though, or maybe as with the pan/crop stuff using a really big picture? Wouldn't work, as you'd be cutting out some editing possibilities, and that's not what Vegas is about. And it would still be cropping my original, and I didn't want it cropped!.

Any ol' way, I do apologize if I've gone overboard here trying to figure out ways to explain this, hoping something will click for you Kelly. The basic principles I've tried to present might be summed up as: you should be able to take a picture of a box using a DV camera, and it should have the same proportions when played back on a TV, or your PC for that matter. You can do the same thing with a still. It should look the same wherever it's displayed, the proportions at least, whether a cell phone or big screen. THAT is what matters most, NOT what it looks like in Vegas! Forget what it looks like in Vegas better yet! If you don't trust PowerDVD, test whatever means you do trust.

If this is actually of no interest of course, if you don't do any work with stills in DV, then of course my apologies and please disregard. Again, my purpose is rather altruistic in this instance - My stuff works - so I'm only presenting an opposing viewpoint, one I firmly believe is correct, in the spirit of any experimentation where I'm setting out my methods, results, and the conclusions drawn from those results. Anyone reading this thread can then decide for themselves, which I consider far superior to blindly following an instance where SD misspoke, and getting P/O'd at him (& sofo) when their proj didn't turn out, simply because he wears a badge of sorts.

best
Chienworks wrote on 7/15/2003, 11:41 AM
mikkie: Have i seen this? Yes i have. a 655 (or 654 or 654.545454...) x 480 still will have the proper proportions when played back on my television. A 720x480 still forced to fit within the frame will look squashed horizontally when played back on my television.

I think the problem you may be seeing is that some players, apparently PowerDVD and Windows Media Player included, don't properly display the correct pixel aspect ratio when playing back on a computer monitor but simply display the pixels 1:1 instead. DV material that looks properly (about) 4:3 on my TV screen looks more like 3:2 on my monitor when played in Media Player. This is the fault of Media Player, not of the video.

"So, if the final picture is to be displayed at 720 x 480" That's the problem ... it's not supposed to be displayed at 720x480. Standard NTSC frame size is 1.363636... times as wide as it is tall. This is close to 4:3 but not quite. If the frame is 480 pixels high then it needs to be 654.545454... pixels wide to meet this size. DV frames are 720 wide and displayed with a 0.909090... pixel aspect ratio so that they will be shown narrower than 720 wide and fit precisely in the NTSC frame size. Still images use a 1.0 pixel aspect ratio and therefore need to be 654.545454... x480 since they aren't stretched or squished at all. However, when a still image is incorporated into DV, it is stretched to 720x480 AND has it's pixel aspect ratio set to 0.909090... so that it will match the rest of the DV frames.

If you start with a 720x480 picture and tell Vegas not to alter it when rendering, then you'll have a 720x480 frame in the video, which gets displayed as 654.545454... on playback (in a proper player, anyway) and this does distort it. The only way to get the 720x480 picture to play back properly is to start with a 654.545454...x480 pixel picture and stretch it out to 720 in your photo editing application (which distorts it) and setting the pixel aspect ratio to 0.909090... before using it in Vegas (which is what Vegas does anyway with the 654.545454x480 image when rendering). So, you can either do the distortion yourself or let Vegas do it. The image will be "un"distorted on playback, so if you choose not to distort it first, then the undistortion will end up distorting it instead of correcting it.

Now, if your complaint is that you don't like the picture being resampled from 654.545454... to 720 by Vegas, then you have a completely valid (but completely different) point. I wouldn't worry about it too much though since the DV frames are (or at least should be) resampled from 720 back to 654.545454... on playback. And yes, this does happen on the fly, 29.97 frames per second, all the time when playing video, so it's not any harder to do that when the video being played back consists of still frames instead.
mikkie wrote on 7/16/2003, 2:17 PM
Just a quick note more or less... Don't want to beat this to death any further then I have already.

Yesterday I decided to incorporate this in a larger project I'm playing with as time permits. Can't say when it will ultimately be online, but I'll try and perhaps get this end up sooner, before everything else (which focuses more on digital imaging) is complete, for whatever that's worth.

Regarding our discussion, what I've done so far is started collecting some data, bookmarks, test files, ect. that I'll weave into the overall scheme. Charting the tests or demonstrations to perform & document, I will include photos of multiple PC monitors and TVs showing the same content in a way that makes accurate, side by side comparrisons possible. Who knows, maybe I'll find out my eyes are/were wrong, perhaps not... I really am persuing this objectively.

My larger project does contain reference to specific software, but is intended to be software agnostic overall. Add that my current views on the topic might cause some dissent in this forum, and I think I'll post it's existance elsewhere initially, so that any quibbling about specific language can happen before, not later - If my findings contradict whatever, I don't want to spend days argueing semantics, rather then answering any relevant questions. If you're intersted, post a final reply to this thread before it slides away to die, and I'll let you know how to check it out before anounced.

Thanks
mike