Hello guest, if you like this forum, why don't you register? https://fanrestore.com/member.php?action=register (December 14, 2021) x


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PAR, SAR, DAR... pfwoar! (or: How I Learned to Stop Worrying and Love the Rec.601)
#1
This is something that's kinda driven me insane for months now because it seems that there is no consistency from one release to another. I don't think there's really any one "right way" of doing it and that frustrates the hell out of me. But I'll document it here and if anybody knows something I don't they can maybe tell me if there's some generally accepted wisdom on this, regardless of what the releasing companies actually do in practice.

I'm hoping that this might serve not just as an extremely long-winded way of me asking a complicated question, but also as something of an "idiot's guide to aspect ratio conversions", since I spent quite a long time trying to structure it in a way that would help others to understand some of these otherwise quite baffling concepts, even a complete beginner who has absolutely no idea about any of it. Whether I succeeded in that, I don't know. But hopefully it's useful to somebody, somewhere along the line. And if you happen to have any bright ideas for how to go about solving the 486 vs 480 px problem and the unpredictable DAR problem I've described in excruciating detail below, please, please do let me know! I have literally hundreds of LaserDisc captures that I am trying to work my way through and organise, and I do not want to discover months or years later that I have been encoding them all stupidly from the start and there was a simple solution all along...

EDIT: I've finally comprehensively clarified everything I was looking to find out here and I kind of feel like an idiot now that I've realised what it was that I was missing. Essentially all of this comes down to one very fundamental concept that, in the midst of my insomnia-addled internet research frenzy, I had leapt over while trying to understand the other aspects. This realisation came from finding a resource that described how to correctly adjust from non-square to square pixel aspect ration (a.k.a. sample aspect ratio), which it describes doing before any cropping and then cropping afterwards. But there's more to the order of operations, it really just comes down to what pixel/sample aspect ratio actually is and how the numbers all work. I should probably edit this original top post to incorporate all that info but that's going to require a lot of work and I'm extremely busy so for now I'll just point you to the posts later in this thread where I discuss it...

First off here's me talking about the aforementioned method of adjusting anamorphic 720 x 486 to square pixel AR: https://fanrestore.com/thread-3813-post-...l#pid69967

Then me realising the core thing I'd been missing and explaining with numbers why it's significant and explains all the stuff I was wondering about: https://fanrestore.com/thread-3813-post-...l#pid69976

And finally, confirming all that by correlating it back to the original questions as laid out in this top post: https://fanrestore.com/thread-3813-post-...l#pid69993

-

The issue is the one of non-square pixels in standard definition video as it's stored in the digital domain.

In the most basic sense, the image on a "full screen" 4:3 NTSC DVD should be stored at 720 x 480 resolution but then reshaped during playback to the "display aspect ratio" (DAR) of 4:3. One would perhaps assume that this would mean resizing 720 x 480 to either 640 x 480 or 720 x 540. That's almost correct, except that there is also 16 pixels' worth of horizontal blanking on the sides to take into account. According to Rec.601, this should not be included in the 4:3 display aspect ratio.

Here's the crux of the problem though:

Wikipedia Wrote:Although standards-compliant video processing software should never fill all 720 pixels with active picture (only the center 704 pixels must contain the actual image, and the remaining 8 pixels on the sides of the image should constitute vertical black bars), recent digitally generated content (e.g. DVDs of recent movies) often disregards this rule. This makes it difficult to tell whether these pixels represent wider than 4x3 or 16x9 (as they would do if following Rec.601), or represent exactly 4x3 or 16x9 (as they would do if created using one of the fudged 720-referenced pixel aspect ratios).
(https://en.wikipedia.org/wiki/Overscan)

In other words, it *should* be the case that in a 720 x 480 NTSC image, only an active picture area of 704 x 480 actually contain picture that is intended to be visible and thus intended to be reshaped to 4:3 (ergo the image should be reshaped such that only that active 704 x 480 should appear as 640 x 480 to display pixels as square and achieve 4:3 display aspect ratio) but in practice, many DVDs actually ignore this guidance and instead include active picture beyond the intended active picture area and using the horizontal blanking (such that the entire 720 x 480 image is intended to be reshaped to 640 x 480). The reason for the 16-pixel horizontal blanking is essentially just to avoid too much picture bleeding off the edge of the screen into overscan, methinks. But this creates a really irritating problem, because it rarely seems to be absolutely clear whether a given disc is supposed to be 720->640 or 704->640.

What to DVD players do about it though? You'd think that would solve the mystery, if there's an agreed standard that every player uses for this rescaling. Surely if the Rec.601 guidance suggests that only the 704 x 480 active picture area is meant to be included in the 4:3 DAR, you'd expect them to reshape the image such that only that 704 x 480 active bit appears as 4:3, with the horizontal blanking falling over the edges beyond that, right?

To work out what resolution would actually achieve that, I created a blank 704 x 480 clip in AviSynth then added a differently-coloured 8px border on the left and right to make it up to 720. I then applied the same resizes to a frame from a LaserDisc to show you what difference it makes (not a specifically chosen frame, a better one would be something with a perfect circle or square in it, but that's obviously a rarity unless you have a test disc or something).


Question 1: Should horizontal blanking be included or excluded from the 4:3 display frame?

Answer I: visual method

Let's assume that the active picture area in this 720 x 480 image is indeed the 704 x 480 in the middle, such that the bit we want to remove is exactly 8 pixels off the sides before resizing (as opposed to 8 off the sides after resizing). It looks like this before doing anything with it:

[Image: DVDSAR1-720x480.png]


First off, here's the result of cropping out the 8 pixels of horizontal blanking on either side first, then reshaping to 4:3:

[Image: DVDSAR4-cropthen640x480.png]


Conversely, here's what happens if you don't crop out the horizontal blanking, including it in the 4:3 frame:

[Image: DVDSAR5-nocropthen640x480.png]


The trouble is that when I've experimented with taking some screenshots of DVDs playing in players like MPC-HC and VLC, I've often found that they get this "wrong", assuming that the entire 720 x 480 image is supposed to be displayed as 4:3. And from what I've read online, the behaviour of actual hardware DVD players is inconsistent: some of the time they'll assume that the whole 720 x 480 is meant to be displayed as 4:3, other times they'll go by Rec.601 spec and display it such that only the appropriate 704 x 480 active area is framed as 4:3. I have absolutely no evidence to back this up but pure speculation leads me to wonder if perhaps older players comply with Rec.601 spec (reshaping 704 x 480 active image to 4:3) and after a certain point when more and more DVDs started to use the entire 720 x 480 picture area rather than following Rec.601, the players also followed and started to reshape the entire 720 x 480 to 4:3 for all discs (which would result in incorrect aspect ratio for older discs that respect the Rec.601 guidance but correct framing for newer spec-ignoring 720 x 480 active picture area discs).

I don't have a DVD handy and can't currently be bothered raking one out, but just because I'm in the middle of processing one for @The Aluminum Falcon so it happens to be open in front of me, here is what happens if I apply the two different methods to an NTSC LaserDisc capture (first excluding then including the horizontal blanking in the 4:3 frame).

Here it is with the horizontal blanking excluded from the 4:3 display aspect ratio:

[Image: Brides-Of-Dracula-LD-052832-hblankexcludedbefore.png]

Another thing to note with this is that it actually varies quite a bit from one disc to another exactly how many pixels of horizontal blanking are on each side. Although in theory it should be 8 on the left and 8 on the right, in practice it frequently varies from disc to disc and even from scene to scene / shot to shot in some cases. I'll generally flick through the whole thing checking how it looks and adjust accordingly. Sometimes I'll take 6 off the left and 10 off the right, sometimes it'll be as much as 12 off the left and only 4 off the right, and so on. But I'm pretty certain it should always result in a width of 704 pixels before reshaping the image, since that's the Rec.601 guidance for how much horizontal blanking there's supposed to be. But this all assumes that it's correct to remove it before framing in 4:3, which is one of the main things I want to figure out here.

So the above is what it looks like if we exclude the horizontal blanking from the 4:3 frame. Conversely, here it is with the whole 720 x 480 image reshaped to 4:3, thus including the horizontal blanking in the 4:3 frame:

[Image: Brides-Of-Dracula-LD-052832-hblankkept.png]

Naturally, the image is more horizontally squished if the horizontal blanking is included in the 4:3 display aspect ratio, and less so if it isn't. Just to be awkward, it seems to vary from disc to disc. Some look wrong to me if I crop the horizontal blanking out (too wide), others look wrong if I leave it in (too narrow). So evidently, regardless of what's actually correct, a lot of releases aren't quite getting it right. In the words of Earl Bass, that pisses me off!


Answer II: mathematical method

There's another way to come at this, of course. All these analogue and digital standards are united by the ITU Radiocommunication Sector Recommendation BT.601 (which, mercifully, is most commonly abbreviated to just "Rec.601"). So what does that have to say about it?

Everything I've said until now is based on intentionally reshaping the image to give it square pixels before encoding it to the delivery format (e.g. H.264). This takes some of the guesswork out of things because you'll encode the file with a "sample aspect ratio" (SAR, which is effectively the same thing as "pixel aspect ratio" or PAR) of 1:1, meaning that if you encode it as 640 x 480 (which is 4:3) then by default the codec will signal to the player that it's 640 x 480, 4:3 video that is meant to be displayed at 4:3 as well.

The only trouble with this, really, is that it only works well for devices and codecs that can deal with slightly non-standardised resolutions. It isn't compliant with DVD or Blu-ray Disc specifications, so it doesn't work on a disc unless you're just burning an MKV file and playing it back as such (i.e. a normal DVD/Blu-ray player won't necessarily know what to do with it). But since Rec.601 is what essentially defined the standards that were built into the DVD specifications in the first place, we can use that to learn something about the "correct" aspect ratio as intended by Rec.601.

The correct way to encode a standard definition NTSC video file for DVD or Blu-ray Disc is to leave it either without reshaping to square pixel aspect ratio and with the horizontal blanking cropped off the sides (704 x 480), or with the horizontal blanking also left alone (720 x 480), and then signal to the player that the image is to be reshaped and displayed at 4:3 display aspect ratio (DAR). The way H.264 handles this involves parsing that instruction the opposite way round to the obvious: rather than saying "display this as 4:3" (i.e. DAR = 4:3), it instead says "the pixels of this video have been sampled at a different rate to how they're intended to be displayed during playback, so please adjust it by this ratio" (i.e. the "sample aspect ratio" a.k.a. "pixel aspect ratio" = whatever it needs to be to get the "display aspect ratio" to 4:3).

-

IMPORTANT NOTE: SAR =/= SAR!

Just to be extra confusing, "SAR" is variously used to designate either one of two very different ratios:

1. "Sample Aspect Ratio", which is the aspect ratio of the pixels as sampled and stored, and sometimes instead called "pixel aspect ratio" or PAR (probably at least in part to help differentiate it from...)

2. "Storage Aspect Ratio", which is another thing entirely. I'm not even getting into that for now, because this is complicated enough as it is. Just know I'm using it to mean "sample aspect ratio" = "pixel aspect ratio" here. I'd be calling it PAR except that x264, just to be difficult, calls it SAR.

-

Right, so let's dig into how these numbers were all worked out in the first place. This is quite a confusing concept to explain, so I will do my best to make this as clear as possible. I certainly would've benefitted from somebody explaining it to me, rather than reading about it online, which mostly consists of other people asking each other about it, getting confused, and telling each other either well-intentioned but confusing or flat out wrong things that just make it even more baffling. (Hopefully I'm not just doing that all over again here!) OK, take a deep breath, then read this to begin with:

Wikipedia Wrote:Analog-to-digital conversion

As a result of computers becoming powerful enough to serve as video editing tools, video digital-to-analog converters and analog-to-digital converters were made to overcome this incompatibility. To convert analog video lines into a series of square pixels, the industry adopted a default sampling rate at which luma values were extracted into pixels. The luma sampling rate for 480i pictures was 12 3⁄11 MHz and for 576i pictures was 14 3⁄4 MHz.

The term pixel aspect ratio was first coined when ITU-R BT.601 (commonly known as "Rec. 601") specified that standard-definition television pictures are made of lines of exactly 720 non-square pixels. ITU-R BT.601 did not define the exact pixel aspect ratio but did provide enough information to calculate the exact pixel aspect ratio based on industry practices: The standard luma sampling rate of precisely 13 1⁄2 MHz.
(https://en.wikipedia.org/wiki/Pixel_aspe...conversion)

Basically you need to take the sample rate used to capture NTSC (or PAL) and display it as square pixels and compare that against the "industry standard" sample rate for non-square pixels (as alluded to by the Rec.601 instruction to convert scanlines to digital lines that are 720 non-square pixels long) to figure out how different they are. Put in a slightly different way, by doing this, you're working out how to convert from your non-square "storage" pixel aspect ratio to your square "display" aspect ratio; comparing the shape of the pixels as stored (which you could, if you felt so inclined, call "storage aspect ratio") against the shape of the pixels as displayed (which would sensibly be "display aspect ratio"). Since the result you're getting is a ratio comparing two sample rates, it follows that the sensible thing to call that might be your "sample aspect ratio".

The trouble is, as I mentioned earlier, this terminology means you end up with two different things that abbreviate to "SAR": storage aspect ratio and sample aspect ratio. I'd prefer to call sample aspect ratio "pixel aspect ratio" to differentiate them, but x264 calls it SAR and for the purposes of explaining where it came from (a ratio of two sample rates) it's useful to tell you it's called "sample aspect ratio". Yeah, it's confusing as hell. But now you know.

Anyway, for NTSC, the sampling rate of 12 3⁄11 MHz determines how it's displayed as square pixels (so that's your display aspect ratio), whereas the 13 1⁄2 MHz determines how it's stored as non-square pixels (storage aspect ratio).

The sample rates and the ratio between them are correlated by the following equation:

sample aspect ratio (a.k.a. pixel aspect ratio) = display sample rate with square pixels / storage sample rate with non-square pixels
= 12 3⁄11 MHz / 13 1⁄2 MHz
= 10 / 11

So if you express that fraction as an actual ratio, your sample (or pixel) aspect ratio is 10:11.

Incidentally, for PAL it's...

14 3⁄4 MHz / 13 1⁄2 MHz
= 59 / 54
so PAL sample (or pixel) aspect ratio is 59:54.

Using the NTSC numbers for now, this is one way of verifying that the 704 pixel width is what's clearly *supposed* to be correct for displaying in 4:3. If we consider the correlation (ratio) between storage and display as aspect ratios instead of sample rates, you can do this:

pixel aspect ratio = display aspect ratio with square pixels / storage aspect ratio with non-square pixels

We already know PAR for NTSC is 10/11 and DAR is clearly 4/3 here (forget 16:9 for now, perhaps another time!) so rearrange it:

storage aspect ratio = display aspect ratio / pixel aspect ratio
= (4/3) / (10/11)
= (4 x 11) / (3 x 10)
= 44 / 30

We also know, however, that the vertical resolution used to sample analogue interlaced NTSC video to digital is generally 480 scanlines high, so you can work out how to convert that 44/30 figure up such that the 30 becomes 480:

conversion factor = final display height / 30 = 480 / 30 = 16
final display width = 44 x conversion factor
= 44 x 16 = 704 pixels

Which is a very long-winded but hopefully informative way of explaining that clearly, according to Rec.601, the 4:3 box displayed on a digital screen is intended to contain only 704 x 480 pixels for NTSC, *not* the full 720 x 480 pixels that are stored.

One final note on sample/pixel aspect ratio: I've seen a couple of places claiming that NTSC ostensibly has a pixel aspect ratio of 0.911 (for PAL it's 1.094), which I've not found info on yet so I assume must be based on some people with clipboards measuring CRTs or something because it certainly doesn't comply with the Rec.601 stuff I mentioned above. Since the Rec.601 is what's meant to be used for digitising analogue video, let's stick to that instead, eh?



Question 2: If the pixel aspect ratio is left non-square (and flagged accordingly in the encoded video), what will the playback device do with it?

Right. So. We now know that at least in theory, the bit that's meant to be getting reshaped to be displayed at 4:3 is the 704 x 480 "active" picture area, and not the full 720 x 480 image (unless of course it's one of those irritatingly anarchic DVDs that actually uses the entire 720 pixel width that it's possible to encode). We also know from the above mathematical explanation that the ratio which describes the conversion from how the picture is stored to how it is displayed is called either the "sample aspect ratio" (i.e. how the image was sampled from the analogue source) or "pixel aspect ratio" (i.e. the aspect ratio of the pixels as they're stored rather than how they're meant to be displayed on a square-pixel screen). And we know that this sample/pixel aspect ratio for NTSC video intended to display at 4:3 is 10:11.

Here's the trouble though:

1. The DVD format can store the video with a width of 704 pixels (cropped to just the active picture area, with the horizontal blanking removed) or 720 pixels (horizontal blanking left intact, unless of course you're ignoring the Rec.601 guidelines and putting actual picture information in those 16 extra pixels)

2. It does not appear to be a simple matter to determine whether a given software or hardware player will display a 4:3 NTSC image on the basis that its 10:11 sample/pixel aspect ratio is intended to result in the width of the 4:3 frame being filled with just the 704 pixels of Rec.601 specified active picture area, or with the entire 720 pixels of technically possible picture area

3. As previously mentioned, you could get around this entirely if you could reshaped the video appropriately to its display aspect ratio when encoding it for the delivery medium, except that this would make it completely non-compliant for DVD or Blu-ray Disc

Which leads me to wonder: how the f*** does one confidently encode standard definition video with the correct sample/pixel aspect ratio, knowing that it will be displayed correctly in the majority of players during playback?

I assume the simple but infuriating answer is "one doesn't", given that everything I've seen suggests that it seems to be more or less a lucky dip and every player makes up its own mind based on the whims of its designers.

So I guess that leaves me with a one-or-the-other choice to make: encode correctly for video that will be disc compliant but surrender to the random nature of not having a clue whether a given player will display it properly or not, or choose to take control by encoding the video at it's intended display aspect ratio (i.e. sample/pixel aspect ratio being 1:1) but break disc compliance in the process. It really seems like there's nothing that can be done about it. As I speculated earlier, it might be that older players in general will behave on the basis of only the middle 704 pixels being considered part of the 4:3 frame, whereas newer players may be more inclined to resize the entire 720 pixel width into the 4:3 frame to ensure that newer DVDs that ignore Rec.601 and use the whole width do not end up with 16 pixels of picture being lost. But that's all terribly nebulous and means that presumably correctly-encoded discs that actually do follow Rec.601 will be displayed too narrow, with 704 pixels being crammed into a smaller space than they should...

CORRECT (DVDs encoded correctly according to Rec.601):

pixel aspect ratio = display aspect ratio / storage aspect ratio
= (4/3) / (704/480)
= 1920 / 2112
= 10 / 11

INCORRECT (some more modern DVDs):

pixel aspect ratio = display aspect ratio / storage aspect ratio
= (4/3) / (720/480)
= 1920 / 2160
= 8 / 9

I could of course encode a 720 x 480 video and explicitly specify the "SAR" (meaning sample aspect ratio, NOT storage aspect ratio) as 8:9, but I don't know if that's going to be correctly interpreted by a given player or if it's even something that's possible with DVD/BD; similarly, I can continue to encode 720 x 480 with horizontal blanking included in the picture with a "SAR" of 10:11, but then I don't know if a given player will understand that what I mean by this is "only consider 704 pixels of these 720" or take it at face value and assume I mean "resize all 720 of these pixels into the width of a 4:3 frame". Bah!


Question 3: Should the 6 "extra" scanlines from analogue SD captures be included or excluded from the 4:3 display?

But now that I'm talking about LaserDisc, here's the second part of the problem as it applies to one of my main particular use-cases: LaserDisc captures that come through my capture card (a Blackmagic Design Decklink Studio) are not 720 x 480 or 704 x 480, but rather use the full NTSC-DV capture area of 720 x 486. This means that there are 6 scanlines included in the capture that would generally be outside of the more commonly seen 480 lines used for the vast majority of digital SD NTSC video ("480i"/"480p"). This is because in the analogue realm, the full visible raster is actually not 480 lines but 486 lines. The thing is, not all of those are necessarily desirable to keep, as you'll see in a moment. In the above examples, I've cropped out the top 4 lines and the bottom 2 lines to keep only 480 pixels of vertical resolution. Here's what happens if I don't:

[Image: Brides-Of-Dracula-LD-052832-486cap.png]


To illustrate what may or may not need to be cropped here, the red area in the following frame is what would get removed if I were to crop off the horizontal blanking *and* the 6 "extra" scanlines that don't fit into 480-line vertical resolution, before any reshaping:

[Image: LDCAP-edgemarked.png]

I don't think it's a good idea to resize 486 scanlines down to 480, especially when at least some of them are clearly not really meant to be included in the visible picture area (they're likely meant to fall into overscan, particularly at the top). In my experience, there's more crap on the top than on the bottom, but it isn't actually 100% consistent from disc to disc. Nonetheless, I've more or less settled on removing 4 lines from the top and 2 from the bottom, which is what I indicated in the above image.

The question here, though, is whether those 486 lines are meant to be considered part of the 4:3 display aspect ratio or not (much like I'm questioning whether the horizontal blanking should be or not).

Let's assume firstly that the horizontal blanking is meant to be excluded from the 4:3 frame, but that the whole 486-line height is meant to be included in it. That looks like this:

[Image: Brides-Of-Dracula-LD-052832-486in4x3.png]

Notice this results in a slightly unusual resolution of 648 x 486. You could crop the top and bottom if you wanted to bring the vertical resolution down to 480 lines, but you'd still have a width of 648 pixels, which is strange, really (I don't think 648 x 480 is generally understood to be correct for square-pixel 4:3, as 640 x 480 is). The horizontal blanking's already been removed so there theoretically isn't enough room left to crop down to 640 pixel width.


Now let's do it the other way. In this next one I'm assuming the horizontal blanking should still be cropped out beforehand but I'm now also assuming that only 480 of the 486 scanlines should be kept in the vertical resolution of the 4:3 frame:

[Image: Brides-Of-Dracula-LD-052832-480in4x3.png]

So... which do we reckon is more correct?
Reply
Thanks given by:
#2
That's a whole lot of words so perhaps there's value in distilling it all down to the two main things I don't yet know that I really need to understand better in order to feel like I'm not potentially encoding every single LD capture incorrectly when I bring it out of lossless AVI territory:

1. I know that both 704 x 480 and 720 x 480 are technically DVD compliant resolutions (I can't remember if that's true of Blu-ray though, I think it might only support 720 x 480 for SD NTSC if I'm remembering the specs correctly) but I don't know if I should be encoding both with SAR = 10:11 and trusting the player to understand that I actually mean that in both cases only the 704px width is meant to be included in that (i.e. crop 8px off each side into overscan before reshaping to 4:3) or using SAR = 8:9 if I go with 720 x 480

2. I have a pretty woolly understanding of why there's even any discrepancy at all between the full visible raster of 486 lines and the more standardised digital version of 480 lines for NTSC (notably there is no such discrepancy for "PAL", which captures at 576 lines and that's the standard for that format regardless)... which is probably why I don't know if those extra 6 pixels are meant to be included when framing to the 4:3 display aspect ratio or not

If anybody who already knows all about PAR/SAR/DAR/Rec.601 and has neither the time nor inclination to read all the crap I just wrote about those things happens to know the answers to the above questions then I'd be very grateful if you could find a moment to enlighten me because it's been driving me up the wall for a very long time!
Reply
Thanks given by:
#3
I imagine you've scoured the internet for info already, but here's something I came across which may help
Reply
Thanks given by: pipefan413
#4
(2021-02-24, 04:02 PM)zoidberg Wrote: I imagine you've scoured the internet for info already, but here's something I came across which may help

I have indeed and I did find that but I didn't feel like it really clarified the issue; it just sheds some additional light on the physics of how they arrived at the 704 pixel width of active picture in the first place (which I considered including but decided against since it wasn't really core to the question I was asking in the end anyway and would make the post even longer than it already was).

I actually quoted the last part in my original post and that was key to my frustration because it more or less seems to be saying "it's the Wild West out there, f*** knows". More precisely, the URL you linked is quoting the Wikipedia page for overscan, which I also quoted the same part of myself:

(2021-02-24, 09:23 AM)pipefan413 Wrote: "Although standards-compliant video processing software should never fill all 720 pixels with active picture (only the center 704 pixels must contain the actual image, and the remaining 8 pixels on the sides of the image should constitute vertical black bars), recent digitally generated content (e.g. DVDs of recent movies) often disregards this rule. This makes it difficult to tell whether these pixels represent wider than 4x3 or 16x9 (as they would do if following Rec.601), or represent exactly 4x3 or 16x9 (as they would do if created using one of the fudged 720-referenced pixel aspect ratios)."
Reply
Thanks given by:
#5
I dunno, for me it reads that content should be 704, even though it can be 720. More recent DVD releases are probably mindful of the fact that most displays now use 1:1 pixel mapping so the borders are obvious.

For me personally if I wanted to get the pixels right for a LD capture I would watch the LD itself, played in real time on a display through the composite out, then burn a DVD of the captured LD with/without borders and compare to see which is 'right'. Assuming the target is a DVD. If the aim is for digital MKVs then you can set the PAR in MKVtoolnix
Reply
Thanks given by: pipefan413
#6
(2021-02-24, 05:45 PM)zoidberg Wrote: I dunno, for me it reads that content should be 704, even though it can be 720. More recent DVD releases are probably mindful of the fact that most displays now use 1:1 pixel mapping so the borders are obvious.

For me personally if I wanted to get the pixels right for a LD capture I would watch the LD itself, played in real time on a display through the composite out, then burn a DVD of the captured LD with/without borders and compare to see which is 'right'. Assuming the target is a DVD. If the aim is for digital MKVs then you can set the PAR in MKVtoolnix

The trouble is that it is a small enough difference that it is rarely obvious which is right and which is wrong. I keep seesawing back and forth depending on the disc.

On some LD caps I've just changed them to square pixels to avoid the problem. On others I've cropped to 704 x 480 and encoded with the correct SAR (a.k.a. PAR) of 10:11. On others I've left it as 720 x 480 and encoded with SAR = 10:11 because a lot of what I've seen seems to be claiming that that's what you're supposed to do, even though clearly by the numbers the right SAR for that would actually be 8:9. I really can't make up my mind what the most valid way of doing it actually is.

And yeah, as for the 480 vs 486 pixel height thing, I basically have no idea. I know I don't want to be encoding 486 px high videos but it's a question of whether those extra 6 should be cropped out before or after framing as 4:3.
Reply
Thanks given by:
#7
Even if I undestand your reason to resize SD source (be it captured or DVD, PAL or NTSC) to square pixel, the whole "affair" is moot IMHO, for a simple reason: apart very few SD displays that would benefit from a square pixel source, hence 1:1 display, ALL THE REST (read: 99.99999%) are NOT SD "compliant", hence it will be resized anyway, so it's better to have 704/720 horizontal pixels than 640! (PAL would be 768, but I'm not sure about capture cards that would use such resolution).

So, simple answer:
- for DVD and other digital SD source, leave it "as is" (or just "shave off" those 16 horizontal pixels if/when needed)
- for analog capture, crop 6 pixels from 486 vertical, and eventually those 16 horizontal pixels if/when needed, and save it as 720/704x480/576

OR

if you really, REALLY need/want to have square pixels, just resize to 720p/1080p.

About overscan: take in account that all CRT had some overscan, from around 3% to 5%, so whichever was recorded onto pre-digital sources like laserdisc was not completely displayed onto CRTs...
Reply
Thanks given by:
#8
Man when you get your first squeeze LD, its really going to melt your brain Smile
Reply
Thanks given by:
#9
(2021-02-24, 06:57 PM)PDB Wrote: Man when you get your first squeeze LD, its really going to melt your brain Smile

And then he will start a thread 10x long... Happy

(Just kidding pipefan; still, I think you should write a book about technical thing - you have the ideas AND enough stamina to write them!) Ok
Reply
Thanks given by:
#10
(2021-02-24, 06:40 PM)spoRv Wrote: Even if I undestand your reason to resize SD source (be it captured or DVD, PAL or NTSC) to square pixel, the whole "affair" is moot IMHO, for a simple reason: apart very few SD displays that would benefit from a square pixel source, hence 1:1 display, ALL THE REST (read: 99.99999%) are NOT SD "compliant", hence it will be resized anyway, so it's better to have 704/720 horizontal pixels than 640! (PAL would be 768, but I'm not sure about capture cards that would use such resolution).

So, simple answer:
- for DVD and other digital SD source, leave it "as is" (or just "shave off" those 16 horizontal pixels if/when needed)
- for analog capture, crop 6 pixels from 486 vertical, and eventually those 16 horizontal pixels if/when needed, and save it as 720/704x480/576

OR

if you really, REALLY need/want to have square pixels, just resize to 720p/1080p.

About overscan: take in account that all CRT had some overscan, from around 3% to 5%, so whichever was recorded onto pre-digital sources like laserdisc was not completely displayed onto CRTs...

I feel like this is just going to sound rude, but I already know all this and I feel like that's evident from what I wrote above. Re. PAL: it is not 768 px wide, it's stored as 720, same as NTSC; the difference is in the conversion, it's essentially scaled to 768 for display which makes the display aspect ratio 4:3 (720 x 576 -> 768 x 576).

You're saying that for DVD I should leave it at 720 *or* crop out the horizontal blanking. Yes, obviously. That "or" was precisely my point: if you encode with the same sample aspect ratio (SAR, which is effectively identical to "pixel aspect ratio") but the actual dimensions of the stored image are not identical, then it follows that the playback device will either get one or the other incorrect, or will have to be clever enough to figure out which it's dealing with (720px with 16px blanking or 704px) and essentially not follow your instructions to use 10:11 SAR if the picture is stored at 720px (because the correct SAR for that would actually be 8:9 to reach DAR of 4:3).

I didn't go through the square pixel explanation to indicate that my intention is necessarily to actually encode with square pixels, though I have done that for the purposes of experimentation in one or two cases. It was to explain why there is any kind of uncertainty/confusion over the handling of non-square pixels in the first place, in order to try to solve that issue as definitively as possible. Maybe I could've made that more apparent.

I am also well aware of overscan but overscan is independent from aspect ratio so that doesn't help solve this either. Just to take the 486 vs 480 line thing as an example, if I just decide that 6 pixels go into overscan, that doesn't tell me whether I should include or exclude them from the *aspect ratio* of the 4:3 frame. Including or excluding them from the 4:3 DAR obviously changes the shape of the picture. I'm confident that the intention for horizontal blanking is for it to be excluded from the 4:3 frame (even though I don't know how consistently it is actually possible to achieve that in practical terms because of the existence of truly 720px wide DVDs and players that recognise the whole 720px as active picture). I can't say the same for whether or not I'm supposed to include those 6 lines of vertical resolution in the 4:3 DAR or not though: the numbers certainly work out more tidily if I crop 'em off first but I really have absolutely no idea if that's how the shape of the picture was intended to end up!

But thank you for trying to help me out, I really do appreciate you taking the time, as I always do!


(2021-02-24, 06:57 PM)PDB Wrote: Man when you get your first squeeze LD, its really going to melt your brain Smile

Hahah oh mate I've already been down that road... *palpitations*


(2021-02-24, 07:37 PM)spoRv Wrote:
(2021-02-24, 06:57 PM)PDB Wrote: Man when you get your first squeeze LD, its really going to melt your brain Smile

And then he will start a thread 10x long... Happy

(Just kidding pipefan; still, I think you should write a book about technical thing - you have the ideas AND enough stamina to write them!) Ok

Genuinely, I do enjoy breaking down these technical issues and trying to not just understand them better myself but also help others to understand them as well. I think I'm going to start forming some of this stuff into slightly more well-structured articles and throw them in a blog or something, or perhaps then them into video essays or something like that instead. I have been writing one that goes very very deep into the workings of how analogue television technology came to be the way it was and how that still affects digital stuff today, and the issues raised in this thread are one of my sticking points that I'd really like to get past but it seems to be something that's fairly difficult to pull completely reliable information on for some reason or another!
Reply
Thanks given by:


Forum Jump:


Users browsing this thread: 1 Guest(s)