VideoHelp Forum
+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 63
Thread
  1. Have been encoding some 4:3 DVD content in Handbrake.

    After cropping the black bars and crud off the sides of several episodes, aspect ratios of some discs come out at 1.326 with PAR 8/9 whereas others are 1.364, 1.354, 1.348 with PAR 10/11.

    Some questions:
    • After encoding, should I be resizing everything back to 4:3 via MKVToolNix?
    • How is it possible that some aspect ratios are larger than 1.33/4:3?
    • Why do the PARs change?
    Quote Quote  
  2. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    1. Yes. You should resize to square pixels @640*480 (true display size) or some multiples of these e.g 720*5402. Simple cropping will never give you 4:3. Even your original dvd @ 720*480 was not 4:3
    3. The PAR depends on whether the full original picture width is adopted ie 720 or the true visible picture width ie 704. This 720 /9*8 = 640 whereas 704/11*10 = 640
    Quote Quote  
  3. Thanks so much for the answers!

    That's surprising that the original DVD is not exactly 4:3 either but makes sense after what I've been seeing. So it's not an error for the image to come out to 1.364 after cropping?

    If my videos have already been cropped and encoded and the final picture has a non-standard DAR like 1.326 or 1.347, am I correct in assuming that resizing back to 4:3 would actually be distorting the image? Should I just leave as is at this point?
    Quote Quote  
  4. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Well there will be slight distortion.

    There would also be slight distortion were you not to crop anything since the 4:3 applies to the full width on most dvds these days and not the active picture.
    Quote Quote  
  5. Member Skiller's Avatar
    Join Date
    Oct 2013
    Location
    Germany
    Search PM
    Originally Posted by Firestorm View Post
    If my videos have already been cropped and encoded and the final picture has a non-standard DAR like 1.326 or 1.347, am I correct in assuming that resizing back to 4:3 would actually be distorting the image?
    Yes, it does.

    Before encoding you have two choices: accept the resulting distortion, or (that's what I like to do) overcrop a bit to a frame size that results in exactly 4:3 after resizing.

    It is simple: any frame size that equals the used PAR results in exactly 4:3 after resizing.

    For example, source frame is 720x576. Crop to 682x558 (=12/11) and the result is exactly 4:3 after applying 12/11 PAR.


    Overcropping may seem inappropriate from a modern, digital point of view, but remember that there would have been much more cropped off when viewed on a TV and the content is created with this in mind, so there is no real drawback in this.
    Quote Quote  
  6. @D883, my main goal is to have the picture shape be accurate. If after cropping it comes out to 1.326, 1.364 etc. but this is correct then I'm happy.

    @Skiller, I understand your calculation to keep things exactly 4:3 post-encoding. I think I would prefer to keep as much of the original picture as possible but it's nice to know.
    Quote Quote  
  7. Handbrake assumes the full frame is 4:3 DAR -- this follows the DVD spec. Many DVDs made from analog video tapes capture according to the ITU spec which puts the 4:3 image in a 704x480 (704x576 PAL) portion of the 720x480 frame. But when those are made into DVDs the full 720x480 frame is used. This gives a ~2 percent AR error. You'll never notice the error. The professionals that make the DVDs don't care. So why should you?

    The peculiar frame sizes that Handbrake gives you after cropping has to do with a lot of factors. But again, it's not worth worrying about -- as long as your playback device supports the frame size. Handbrake maintains the correct sample aspect ratio and most playback devices will scale appropriately.
    Quote Quote  
  8. I would do exact cropping and then, at muxing, specify the DAR (display aspect ratio) to 4:3 (or 1.33) to have an exact display output
    Quote Quote  
  9. Originally Posted by Firestorm View Post
    Have been encoding some 4:3 DVD content in Handbrake.

    After cropping the black bars and crud off the sides of several episodes, aspect ratios of some discs come out at 1.326 with PAR 8/9 whereas others are 1.364, 1.354, 1.348 with PAR 10/11.

    Some questions:
    • After encoding, should I be resizing everything back to 4:3 via MKVToolNix?
    • How is it possible that some aspect ratios are larger than 1.33/4:3?
    • Why do the PARs change?
    Cropping on it's own doesn't change the pixel aspect ratio (the shape of the pixels), only resizing can do that, so if you don't resize the PAR shouldn't change, however.....

    I don't use Handbrake, but 4:3 NTSC DVDs can have either an 8:9 or 10:11 PAR (there's no info in the DVD video to tell you which though), and one indication of which PAR might be correct is the amount of black on each side of the picture.
    I have a vague recollection of Handbrake using an 8:9 PAR before cropping, but once a certain amount was cropped from the sides it switched to 10:11. That could be a memory my brain simply invented, or maybe it's what HandBrake does, which wouldn't necessarily be a bad thing. How are you determining the PAR of the encoded video? I'm not saying you're wrong, but are you sure it's not always the same?

    If you want consistency, can you still specify a custom PAR? If you can, I'd use 10:11 for all 4:3 NTSC DVDs and if you always crop the same amount, the display aspect ratio should always be the same.

    Cropping from the sides obviously reduces the DAR and cropping from the top and bottom increases it, so if there's a bit of height cropping involved that's probably a factor too. If the videos are episodes of a TV show though, and especially if they're on the same disc, they should share a common PAR, even if some require more cropping than others.
    Last edited by hello_hello; 14th Aug 2022 at 15:03.
    Quote Quote  
  10. @ProWo, I was doing exactly what you described but then got worried that forcing the picture back to 4:3 after cropping would give me a distorted image, however minor.

    @hello_hello, thank you for the great info! You're absolutely right about the PARs and I should have explained better.

    When I load up all of my own NTSC DVDs in Handbrake with anamorphic=automatic, the PAR comes up as 8/9 and yes minor cropping alone doesn't change this.

    As a test, I then loaded up in MediaInfo some NTSC videos others have encoded and these show a PAR of 10/11 so I thought I did something wrong. In Handbrake, I can set anamorphic=custom and manually increase the PAR of my own discs to 10/11 if you think I should?

    I thought DARs larger than 1.33 was an error as how can a 4:3 NTSC video come out larger than 4:3? I have seen many at 1.354, even as large as 1.364.

    Side question, after cropping/encoding and a final DAR under or over 4:3, would resizing back to 4:3 in MKVToolNix be distorting the video? I was leaning toward just leaving the final DAR encoded as is.
    Last edited by Firestorm; 14th Aug 2022 at 17:59.
    Quote Quote  
  11. Originally Posted by Firestorm View Post
    As a test, I then loaded up in MediaInfo some NTSC videos others have encoded and these show a PAR of 10/11 so I thought I did something wrong. In Handbrake, I can set anamorphic=custom and manually increase the PAR of my own discs to 10/11 if you think I should?
    I didn't think the MediaInfo GUI displayed PARs, just a DAR, but in my humble opinion pretty much all 4:3 DVDs have a 15:11 DAR.
    15:11 is effectively the mpeg4 equivalent of 4:3, and for a 4:3 NTSC DVD that means it has a 10:11 PAR.

    Likewise 20:11 is effectively the mpeg4 equivalent of 16:9, but 16:9 DVDs tend to be 16:9 rather than 20:11.

    The mpeg4 PARs are the digital equivalent of the ITU PARs, which come from the specification for digitising analog video, and while not exactly the same, the mpeg4 PARs are close enough to the ITU PARs not to matter and the numbers are simpler and easier to remember.

    Confused yet? Here's the list of PARs:
    https://forum.doom9.org/showthread.php?p=1058927#post1058927

    Originally Posted by Firestorm View Post
    I thought DARs larger than 1.33 was an error as how can a 4:3 NTSC video come out larger than 4:3? I have seen many at 1.354, even as large as 1.364.
    The idea would be for 704x480 to give you 4:3, and the extra 16 pixels of width would be black to crop away, or if it's not all black you could look at it as bonus picture. Due to over-scanning, it'd be beyond the edges of a 4:3 CRT TV anyway, which is why you don't see the crud while watching DVDs on a CRT TV, or even while watching DVDs on a 16:9 display when it's in 4:3 mode, as it would overscan too and the TV would hide the crud behind the borders it adds to the sides.

    The 15:11 DAR applies to both PAL and NTSC DVDs, but of course they have a different PAR in order to achieve 15:11, however without cropping and for an NTSC DVD:

    720 * (10/11) / 480 = 1.36363636
    or
    15 / 11 = 1.36363636

    Originally Posted by Firestorm View Post
    Side question, after cropping/encoding and a final DAR under or over 4:3, would resizing back to 4:3 in MKVToolNix be distorting the video? I was leaning toward just leaving the final DAR encoded as is.
    Yes unless it's 4:3, resizing back to 4:3 must distort the picture.

    Given we all have 16:9 or wider displays these days, I'm somewhat OCD about 4:3 being my DAR minimum, and if cropping from the width reduces the DAR to less than 4:3, I'll crop from the height until it's at least 4:3 again, but that's just me.
    Fortunately starting at 1.363636 reduces the likelihood and/or the amount of height cropping required, which works for me given I'm pretty sure almost all 4:3 DVDs are 15:11 anyway, but that's just my opinion....

    If you use Avisynth at all, have a play with the CropResize script in my signature. It'll do the math for you and show what's coming in and going out.

    As an example, applying a cropping of 8,4,-12,-4 to an NTSC DVD while assuming an 8:9 sample/pixel aspect ratio.
    CropResize(0,0, 8,4,-12,-4, NoResize=true, InSAR=8.0/9.0, Info=true)

    Image
    [Attachment 66341 - Click to enlarge]


    Same again with a 10:11 sample/pixel aspect ratio
    CropResize(0,0, 8,4,-12,-4, NoResize=true, InSAR=10.0/11.0, Info=true)

    Image
    [Attachment 66342 - Click to enlarge]


    If you're not into Avisynth, you could play around with this instead.
    https://www.videohelp.com/software/Yodas-Resize-Calculator
    You specify the source type and for PAL and NTSC DVDs you can choose your preferred PAR flavour, add whatever cropping you're using and it'll tell you what the output DAR will be. You can ignore the resizing and any aspect error that might be shown given you're not resizing, so all you need to worry about is the Matroska Aspect Ratio tag at the bottom, which is just the output DAR and should always be exact.

    Here's the same cropping as for the examples above, while assuming a 10:11 PAR. As you can see, the calculated DAR matches the Output DAR in the 2nd screenshot.

    Image
    [Attachment 66344 - Click to enlarge]
    Last edited by hello_hello; 14th Aug 2022 at 21:21.
    Quote Quote  
  12. I didn't think the MediaInfo GUI displayed PARs
    It does, but you have to select "Debug" --> "Advanced Mode" and it's then listed as a decimal value under the video stream.

    I'm somewhat OCD about 4:3 being my DAR minimum, and if cropping from the width reduces the DAR to less than 4:3, I'll crop from the height until it's at least 4:3 again, but that's just me.
    Funny how we have different forms of OCD! I'm more worried about preserving the whole available picture and never considered having a minimum DAR. But yes starting with the MPEG-4 spec makes it very unlikely you'd crop to below 1.33.

    If you're not into Avisynth, you could play around with this instead.
    https://www.videohelp.com/software/Yodas-Resize-Calculator
    I haven't used Avisynth before but I just downloaded the Yoda resizer and am giving it a go and can see what you mean.

    Confused yet? Here's the list of PARs:
    https://forum.doom9.org/showthread.php?p=1058927#post1058927
    Not confused at all, your explanations are really very helpful. This was a fantastic link and I can see how 10/11 is the safest PAR for NTSC DVDs.

    I still can't figure out why my Handbrake anamorphic=auto settings are always 8/9 generic PAR. I ran a test on one of my NTSC DVDs; both uncropped with one at auto 8/9 and one at custom 10/11. Even the custom 10/11 does not change the output DAR. They both came out DAR 1.33. I then ran the same test though Staxrip and it came out correctly at 10/11 with DAR 1.364.

    I don't know why I can't get Handbrake to come out at MPEG-4 15/11 DAR? I feel like my entire encoded DVD collection has the wrong picture shape now as I used Handbrake and I never realized. Panicking slightly…
    Last edited by Firestorm; 17th Aug 2022 at 06:03.
    Quote Quote  
  13. Originally Posted by Firestorm View Post
    I still can't figure out why my Handbrake anamorphic=auto settings are always 8/9 generic PAR (ie., ignoring ITU). I ran a test on one of my NTSC DVDs; both uncropped with one at auto 8/9 and one at custom 10/11. Even the custom 10/11 does not change the output DAR. They both came out DAR 1.33. I then ran the same test though Staxrip and it came out correctly at 10/11 with DAR 1.364.
    I don't know why that'd happen, but I haven't used Handbrake in a long time. It does create a fairly detailed log file doesn't it? Maybe looking through that might give you an idea what's happening.

    Originally Posted by Firestorm View Post
    I feel like my entire encoded DVD collection has the wrong picture shape now as I used Handbrake and I never realized. Panicking slightly…
    The difference is only about 2.2% so it's not huge...
    (15/11) / (4/3) = 1.0227
    and aside from the fact you can only look at the picture and decide for yourself which looks right, it isn't always easy because your brain adjusts and if it sees something that experience has taught it is round, it'll look round even when it isn't.
    For this one I drew circles over the picture (I still have the pics as I was debating the DAR in another forum) but if you switch between the screenshots, the circles can appear to change shape even though they're perfectly round each time.
    It's an example of a 16:9 DVD having a 20:11 DAR, but it's not typical these days.

    https://i.postimg.cc/59QQSm1r/generic.jpg
    https://i.postimg.cc/CK6djR2Y/mpeg4.jpg
    https://i.postimg.cc/mDG2yMSx/1-1024x576-00000.png
    https://i.postimg.cc/9X7sjKVB/1-1048x576-00000.png
    https://i.postimg.cc/2yrQM1rM/2-1024x576-00000.png
    https://i.postimg.cc/qvh3ms2g/2-1048x576-00000.png

    If you look at either of these for a short while, when you switch to the other one your brain will probably decide it's the wrong one, even if it's not.
    https://i.postimg.cc/y8zm5NV7/16-9.jpg
    https://i.postimg.cc/cLMRNNHw/20-11.jpg

    And there's nothing to say the DVD aspect ratio is correct. Every so often I've come across a section of video that's obviously wrong.
    https://forum.doom9.org/showthread.php?p=1941181
    Or sometimes I suspect it's wrong but have no way of proving it to my brain.

    HDMI players follow the HDMI spec, which says exactly 4:3 or 16:9, so even the original DVDs mightn't display correctly.
    There's some more reading here if you're bored. https://lurkertech.com/lg/video-systems/#pixelaspect

    For h264 video at least, you can change the PAR without re-encoding. I sometimes use an old version of ffmpeg dedicated to that sort of thing, although I think the functionality is included in the standard ffmpeg these days. For the old version I linked to the command line might look like this:

    ffmpeg -i input.mkv -y -vcodec copy -an -sn -vbsf h264_changesps=colormatrix=6/colorprim=2/transfer=2/fps=24000:1001/sar=10:11 D:\output.mkv

    From memory you have to then remux the output with MKVToolNix as ffmpeg only changes the video stream SAR, not the container aspect ratio, and there's no telling which one a player will look for or use.

    If the current version of ffmpeg includes the same functionality it may change both. I think it can also do the same for h265 video too.
    Last edited by hello_hello; 15th Aug 2022 at 04:33.
    Quote Quote  
  14. No matter how you spin it, the fact is that content produced for 4:3 displays should be displayed in 4:3. So the only criterion should be DAR. PAR has no meaning here.
    Quote Quote  
  15. [QUOTE=hello_hello;2665026]
    Originally Posted by Firestorm View Post
    I still can't figure out why my Handbrake anamorphic=auto settings are always 8/9 generic PAR (ie., ignoring ITU).
    Because Handbrake follows the MPEG 2 spec when dealing with MPEG 2 video. The DVD spec refers to the MPEG 2 spec regarding aspect ratios. The MPEG 2 spec is very clear: only three Display Aspect ratios (4:3, 16:9 and 2.21:1) and one Sample Aspect Ratio (1:1) can be flagged. In the case of the DARs the entire frame comprises the DAR. From the ISO 13818-2 doc:

    Image
    [Attachment 66354 - Click to enlarge]


    The problem is that most (?) DVDs made from old analog tapes are captured according to the ITU spec (with a 720x480 or 720x576 frame), then just encoded for DVD without compensating for the difference between the two specs.
    Quote Quote  
  16. Originally Posted by jagabo
    Because Handbrake follows the MPEG 2 spec when dealing with MPEG 2 video.
    That's really great info and I never considered the original mpeg2 aspect ratio flag may be in play here in Handbrake's settings.

    I'm no expert, but now it looks like no matter what custom PAR you choose, Handbrake will try to preserve the original 4:3 mpeg2 DAR regardless of source material.

    Now I can't tell whether Handbrake is actually doing the correct thing, whereas forcing 10/11 PAR 1.364 DAR in a program like Staxrip is actually distorting the picture?

    Originally Posted by hello_hello
    Maybe looking through that might give you an idea what's happening.
    Thank you. I wasn't expecting you to know the answer given it seems to be Handbrake-specific but this is a really great tip. Will check the log next time I run something through it.

    Originally Posted by hello_hello
    your brain adjusts and if it sees something that experience has taught it is round, it'll look round even when it isn't.
    Absolutely, and the test you've provided is a great example of confirmation bias; subconsciously discarding evidence which contradicts one's beliefs. Also the stronger the belief, the greater the urge to ignore evidence.

    Originally Posted by hello_hello
    The difference is only about 2.2% so it's not huge...
    I appreciate you trying to make me feel better but this is still going to drive my OCD through the roof haha. I have to get to the bottom of it. Do you have any thoughts on the mpeg-2 info Jagabo provided above?
    Last edited by Firestorm; 22nd Aug 2022 at 21:52.
    Quote Quote  
  17. Originally Posted by Firestorm View Post
    Now I can't tell whether Handbrake is actually doing the correct thing, whereas forcing 10/11 PAR 1.364 DAR in a program like Staxrip is actually distorting the picture?
    For years GUIs have usually had something in preferences that lets you configure them to default to either an ITU or generic DAR/PAR for DVDs. I'm certain StaxRip had such an option in it's preferences and possibly still does. MeGUI has that option, although it still uses the "almost correct" ITU PARs from the table I linked to. These days if a GUI has that option it's possibly using the mpeg4 PARs, but it's all or nothing because there's no way for the GUI to know for an individual DVD.

    I'm surprised Handbrake forces a PAR for DVDs as my assumption would be if someone sets a custom PAR it's because that's the PAR they want to use.

    Originally Posted by Firestorm View Post
    I appreciate you trying to make me feel better but this is still going to drive my OCD through the roof haha. I have to get to the bottom of it. Do you have any thoughts on the mpeg-2 info Jagaboo provided above?
    jagabo knows what he's talking about.

    I think the problem started with the fact video was once analog, but it had no pixels, just scanlines, and the ITU spec for converting scanlines to digital doesn't mention PAR, so it has to be inferred. From the lukers guide I linked to earlier:

    However, being pesky video engineers, the authors of ITU-R BT.601-4 clear forgot to mention exactly what the pixel aspect ratios of those pixels was, exactly. They did, however, specify a very precise luma sampling frequency of 13.5 MHz (not 13.5M MHz).
    So, this gives us an incontrovertible way to answer the question of "how non-square are non-square pixels?" If 480i square pixels are sampled at 12 3/11 MHz, and 480i non-square pixels are sampled at 13.5 MHz, that must mean that each non-square pixel has aspect ratio:
    12 3/11 MHz / 13.5 MHz = 10 / 11


    I assume jagabo's referring to the digitised version being transferred to DVD without compensating for the fact that for 720x480 to have an exact 4:3 DAR, the PAR must be 8:9.

    For 16:9 DVDs it doesn't seem to be much of an issue, probably because they don't tend to originate from analog, but the example I posted above appears to be from an analog source and it's hard to argue it's not 20:11. I'm sure I've come across a few 16:9 DVDs that were 20:11, and some of those were shot on film, but I have been able to compare quite a few 16:9 DVDs with their 1080p counterparts and that told me a generic PAR is correct most of the time.

    I haven't worked with the same number of 4:3 DVDs, plus I live in PAL-land so my experience is more with PAL 4:3, which reminds me of the BBC spec for digital SD, and I'm pretty sure it says (I'm too lazy to try to find it again) that 16:9 should be a 1050x576 frame resized to 720x576, and 4:3 should be a 786x576 frame resized to 720x576, which means it's not exactly mpeg4, but very close. Whether that necessarily translates to DVD I don't know, but the few BBC DVDs I do have indicate it does.

    I've pretty much settled on using a 15:11 DAR for 4:3 and a 16:9 DAR for 16:9, unless I see something that makes me question it, because you can drive yourself nuts worrying about this sort of thing, and even if you're willing to drive yourself nuts it's not always possible to know for sure either way.

    If you can find a straight-on shot of something that should be round... a car wheel or a clock-face etc, you can do what I did above and take a screenshot and draw circles over it with an image editor. I've even done something similar with a straight-on shot of a 4:3 CRT screen or a 16:9 LCD screen when my DAR OCD has become too annoying (I recall a few instances of the stargate not being round on some Stargate SG1 DVDs, but neither 20:11 or 16:9 seemed to be correct).

    Another method, which is prone to confirmation bias though, is to open a DVD in MPC-HC. It'll display as either exactly 4:3 or 16:9. If you tap the 6 key on the numeric keypad once it'll stretch the width, which co-incidently is the difference between 4:3 and 15:11. It's not exact (probably 2%) but it's a simple way to switch between a generic and mpeg4 aspect ratio while watching the video. The 5 key always resets it, the 4 key reduces the width, and the other keys do other stuff, sometimes in combination with holding down the Ctrl key (I think), which moves the video left or right etc rather than stretch it.
    Quote Quote  
  18. For more on this subject you may also want to take a look here (focus is on 4:3 PAL though):
    https://forum.videohelp.com/threads/404626-How-do-i-upscale-PAL#post2646932
    Enjoy

    ... and the possible ~2% AR error will continue to create a lot of confusion and noise, I think
    Last edited by Sharc; 16th Aug 2022 at 07:29.
    Quote Quote  
  19. Originally Posted by hello_hello
    Another method, which is prone to confirmation bias though, is to open a DVD in MPC-HC
    This is really clever thanks for sharing. Wonder if I can load up my encoded 8/9 PAR NTSC videos into this and test both DARs.

    Originally Posted by hello_hello
    For years GUIs have usually had something in preferences that lets you configure them to default to either an ITU or generic DAR/PAR for DVDs. I'm certain StaxRip had such an option in it's preferences and possibly still does.
    You're right Staxrip does allow you to set a PAR standard in preferences but Handbrake doesn't. Before 2022, I hadn't used Handbrake for years so I can't recall whether it ever did. I have also noticed though that the modulus settings have been removed where they used to be in previous versions. Maybe just coincidence. My best guess is Handbrake has just committed to applying the MPEG-2 standard only.

    Can you confirm my understanding of things I've learned so far?

    Most NTSC video is mastered from analogue source at 10/11 PAR. However, when this video is transferred to the DVD format, it must be stored in the MPEG-2 DAR standard of 1.33. When encoding from DVD to modern video codecs, the MPEG-4 PAR ratio tries to restore the video to its original analogue DAR?
    Last edited by Firestorm; 22nd Aug 2022 at 21:55.
    Quote Quote  
  20. Member Skiller's Avatar
    Join Date
    Oct 2013
    Location
    Germany
    Search PM
    Originally Posted by Firestorm View Post
    However, when this video is transferred to the DVD format, it must be stored in the MPEG-2 DAR standard of 1.33.
    I would not say "must" (most often it is ignored) and I certainly would not do a resize to archive that, but a simple cropping from 720 to 704 would get you there and is therefore not a bad idea, in my opinion (I do that myself). You can encode DVD-compliant MPEG2 at 704 width and meet both specifications there – it does not have to be encoded at 720 which brings ambiguity.
    Quote Quote  
  21. Originally Posted by Firestorm View Post
    Most NTSC video is mastered from analogue source at 15/11 PAR....
    Maybe I misread your statement, but I would rather say
    Most 4:3 NTSC 720x480 video which is mastered from analog source has a PAR of ~10:11 (or more precisely 38800:42651 acc. ITU-R) and should be played back at a DAR of 15:11 for an undistorted square and circle.
    (These have usually black pillars left and right of total ~16 pixels width (left+right))
    Attachment Examle1.mkv (with green pillars)

    or likewise:
    4:3 NTSC 702 (or 704)x480 video which is mastered from analog source has a PAR of ~10:11 (or more precisely 38800:42651 acc. ITU-R) and should be played back at a DAR of 4:3 for an undistorted square and circle.
    Attachment Example2.mkv

    Because DVD are mpeg2 and follow the specs shown in post #15 which does not support non-square PAR signalling, the full frames (i.e. including the green pillars) of Example1 will be displayed at 4:3 (1.3333...) and the active (useful) picture will be horizontally slightly squeezed (~2%). Therefore cropping of the side pillars and encoding at 704x480 4:3 is recommended in such case (Example2).
    (Blast from the past: Legacy DVD players with analog connection to analog (CRT) TV used to stretch frames like Example 1 usually correctly at DAR 15:11 though)
    Image Attached Files
    Last edited by Sharc; 18th Aug 2022 at 04:43.
    Quote Quote  
  22. Originally Posted by Firestorm View Post
    [Most NTSC video is mastered from analogue source at 15/11 DAR. However, when this video is transferred to the DVD format, it must be stored in the MPEG-2 DAR standard of 1.33. When encoding from DVD to modern video codecs, the MPEG-4 PAR ratio tries to restore the video to its original analogue DAR?
    Using an mpeg4 PAR for encoding would restore the video back to it's original analog DAR, assuming it's not correct on the DVD, which it possibly isn't for analog.

    It's still a mess though, because the Bluray spec says Bluray compliant SD video must have an mpeg4 PAR, but the HDMI spec says exactly 4:3 or 16:9, and I'm pretty sure that's the DAR players adhere to over HDMI, so the problem hasn't gone away.

    If you're playing video via a Bluray player's USB input, you should be able to do whatever you like in respect to the PAR, at least in a perfect world. There's two Bluray players in this house and one of them doesn't obey aspect ratios in MKVs or MP4s, so I always crop and resize to square pixel dimensions, but obviously I still have to pick the PAR to base the resizing on, so I'm not really sure why I'm mentioning it. Oh that's right.... I have some old DVD encodes with very non-standard PARs (because they were resized a little) and the Bluray player that pays attention to that sort of thing still resizes them properly.

    I haven't had a lot of sleep over the last few nights so I'm tired and possibly starting to ramble. I can't really tell.

    Originally Posted by Firestorm View Post
    I have also noticed though that the modulus settings have been removed where they used to be in previous versions.
    I wonder why the modulus option was removed. Odd.....
    Quote Quote  
  23. Originally Posted by hello_hello View Post
    It's still a mess though, because the Bluray spec says Bluray compliant SD video must have an mpeg4 PAR, but the HDMI spec says exactly 4:3 or 16:9, and I'm pretty sure that's the DAR players adhere to over HDMI, so the problem hasn't gone away.
    Yes. This ambiguity becomes also obvious when we analyze the 2 examples of post #21 with MediaInfo in Debug->Advanced mode (similar goes for MPC-HC):

    Example1.mkv:
    Sampled_Width : 720
    Sampled_Height : 480
    Pixel aspect ratio : 0.909
    Display aspect ratio : 1.364
    Display aspect ratio : 4:3
    Example2.mkv:
    Sampled_Width : 704
    Sampled_Height : 480
    Pixel aspect ratio : 0.909
    Display aspect ratio : 1.333
    Display aspect ratio : 4:3
    So when one doesn't know what is correct one has to do the circle or square (or other known shape) test and scale (crop, resize, add borders, zoom) the video accordingly. If the video lacks any objects which can serve as an aspect ratio reference and we are still undecided ...... why worry much about a possible ~2% error?
    Quote Quote  
  24. Originally Posted by Firestorm View Post
    This is really clever thanks for sharing. Wonder if I can load up my encoded 8/9 PAR NTSC videos into this and test both DARs.
    You can. I'm pretty sure the width is stretched by the same percentage regardless of the resolution or the shape of the pixels. 2% or maybe 2.5%, so it'll still work even if you resized to square pixel dimensions based on an 8:9 PAR for the DVD.

    Or you can do it the other way. Tap the 4 key once and it'll reduce the width by the same percentage, so if you used a 10:11 PAR for the encode that'll make it (roughly) display as though it was encoded with an 8:9 PAR.

    If you stretch it more... tap the 6 key three or four times instead of just once.... and watch the video that way for a bit while your brain adjusts.... 8:9 and 10:11 can both look wrong when you go back to one of those DARs, although sometimes when I'm having a hard time trying to decide which one is correct, I deliberately stretch the video too much as a kind of reset for my brain, but I don't know how effective that really is. I probably just like to believe it helps.
    Last edited by hello_hello; 18th Aug 2022 at 07:37.
    Quote Quote  
  25. Originally Posted by Sharc
    why worry much about a possible ~2% error?
    Because I have crippling OCD haha. I noticed in your MediaInfo extracts the the PAR is 10/11 for both but different DARs. Is this correct for each?

    Originally Posted by hello_hello
    I deliberately stretch the video too much as a kind of reset for my brain, but I don't know how effective that really is.
    Oh this method definitely works and for lots of things I'm sure. I've done the same thing when cropping as it gives your brain a chance to see the extreme (reset as you said) and then come back and be able to zero in on fine detail again.

    Another side question. If we've established that most NTSC video is transferred to DVD from 15/11 analogue source making 10/11 PAR 15/11 DAR usually the safest choice, what other source could DVD video come from which would cause 8/9 PAR 1.33 DAR to actually be correct? Film?
    Quote Quote  
  26. Originally Posted by Firestorm View Post
    I noticed in your MediaInfo extracts the the PAR is 10/11 for both but different DARs. Is this correct for each?
    Yes. The examples simulate an analog video which was captured at the standard sampling rate of 13.5MHz which results in a PAR of 10/11 for 4:3 NTSC, with an active picture width of 704 pixels.
    In Example1 the encoded 704x480 video was just padded (sometimes called "overscanned") to 720 width using green pillars to make them visible on a black (TV) monitor background. Padding does not change the PAR. In real world captures these green pillars are normally black. One sees these black pillars on many (most) "4:3" DVDs as well.

    In Example2 the green pillars were cropped. Cropping does not change the PAR.

    When you play Example1 with a player which respects the PAR signalling (10/11 in this case), the full frame DAR will become 1.364 and the square and circle are perfect.
    When the player forces the playback DAR to 4:3 the square and circle are ~2% horizontally squeezed. You can easily verify this with a pixel ruler.

    Example2 (704x480, pillars cropped) is always played back correctly (no ambiguity, undistorted, the square is an exact square, and the circle is a perfect circle rather than an ellipse), independent of the player respecting the PAR signalling or just forcing a 4:3 playback.

    You can easily verify all this with MPC-HC or VirtualDub2 (which has some standard PAR options when you right click into the picture).

    Keep in mind that mpeg2 DVD does not specify the PAR, but only the DAR (like 4:3, see table in post#15). Hence, for Example1 (encoded as mpeg2 for DVD) the square and circle would be slightly (~2%) horizontally squeezed when the player forces the full frame to 4:3.

    Added:
    You could of course also take Example2 (704x480, PAR 10/11) and resize it horizontally to 720x480. This will then change the PAR to 8/9.
    It will also be unambiguous, means PAR 8/9 or forced 4:3 playback agnostic. Square and circle are perfect. Example3.mkv

    MediaInfo:
    Sampled_Width : 720
    Sampled_Height : 480
    Pixel aspect ratio : 0.889
    Display aspect ratio : 1.333
    Display aspect ratio : 4:3
    Image Attached Files
    Last edited by Sharc; 19th Aug 2022 at 06:34.
    Quote Quote  
  27. Originally Posted by Firestorm View Post
    Originally Posted by Sharc
    why worry much about a possible ~2% error?
    Because I have crippling OCD haha.
    Why not just point your OCD to following the DVD spec?
    Quote Quote  
  28. Originally Posted by Firestorm View Post
    Another side question. If we've established that most NTSC video is transferred to DVD from 15/11 analogue source making 10/11 PAR 15/11 DAR usually the safest choice, what other source could DVD video come from which would cause 8/9 PAR 1.33 DAR to actually be correct? Film?
    I don't think there's a definitive answer to that one, and I don't know enough about the transfer process to be certain, but during the 90's and early 00's it was common for film to be transferred to video for editing if it was only intended to be broadcast free to air, especially if CGI or effects had to be added, because it was cheaper and because HD didn't exist back then. Whether that means the same aspect error was likely to be introduced I'm not sure, but I can't think of any 4:3 DVDs where I didn't decide to go with 15:11, although that doesn't mean I was always right, I guess.
    Thinking about it, the few 16:9 DVDs for which I remember deciding on 20:11 were from that period (there's only four I can recall for certain at the moment), but an indication a DVD is likely to be 15:11 or 20:11 is if there's a large amount of black on the sides, although that's not a hard and fast rule either.

    Or the short answer would be... I don't know.
    Quote Quote  
  29. Originally Posted by jagabo
    Why not just point your OCD to following the DVD spec?
    Keen to know what are your arguments for doing so?

    I guess we have to always assume that there are DVDs with ITU PAR and DVDs with generic PAR available.

    Therefore, my rule of thumb now is based on the presence of vertical black bars. If there are bars on the side of the frame in the area of inactive pixels (suggesting analogue source), I would use MPEG-4/ITU PAR. If the full 720 frame is used, I would use generic PAR.
    Last edited by Firestorm; 22nd Aug 2022 at 04:20.
    Quote Quote  
  30. Originally Posted by Firestorm View Post
    Originally Posted by jagabo
    Why not just point your OCD to following the DVD spec?
    Keen to know what are your arguments for doing so?
    You've admitted that you can't really see the difference. So rather than obsessively trying to figure out title-by-title what SAR to use, just obsessively follow the DVD specification -- where the SAR for 720x480 4:3 NTSC DVD is always 8:9 (unless a sequence_display_extension specifies otherwise).
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!