Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th November 2011, 07:11   #21  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
UPDATE: I added the text and examples to #4 above.

Quote:
They differ in less than or about 1 pixel, it is actutally the 702<->704 issue (702 no typo).
Yes, a negligible difference. The NTSC values, however, seem completely consistent here.
vampiredom is offline   Reply With Quote
Old 27th November 2011, 09:59   #22  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
GuessPAR() function

OK, it's pretty basic but it may be helpful (and avoid the hassle of having to look up the "standard" PARs.)

** EDIT: The GuessPAR() function is now a part of PARResizer.avsi ... see this thread.

The first parameter can be either a clip or a string in the format of "640x480", or "720x576", etc.

The second parameter, ws, specifies whether the widescreen PARs (ws=true) or standard 4:3 PARs (ws=false) should be assumed (since there is no way to automatically guess this).

GuessPAR() will return 1.0 if it cannot find a matching non-square pixel standard for the given dimensions.

Examples:

Code:
# load a widescreen .avi file
AviSource("MyFile.avi")
par = GuessPAR(last, ws=true)
Subtitle(String(par))
Code:
# Print an arbitrary PAR
BlankClip()
par = GuessPAR("704x480", false)
Subtitle(String(par))

Last edited by vampiredom; 27th November 2011 at 22:53. Reason: function has been moved to PARResizer.avsi
vampiredom is offline   Reply With Quote
Old 27th November 2011, 11:08   #23  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,901
Quote:
Originally Posted by TheSkiller View Post
Yes, as stated on the wiki page you linked, those are the official Rec.601 and "common digital" PARs.
Yeah but what about the info above the table?
"Note that sources differ on PARs for common formats – for example, 576 lines (PAL) displayed at 4:3 (DAR) corresponds to either PAR of 12:11 (if 704×576, SAR = 11:9), or a PAR of 16:15 (if 720×576, SAR = 5:4)."

That's what I'm still vague on, because both of those examples give you a PAR of exactly 4:3.
It seems to me most (PAL 4:3) DVDs use a PAR of 16:15 regardless of whether the extra 8 pixels each side contain image or not, but I'm still trying to understand this properly.

As a side note, a bit more browsing through the same wiki page led me to the sight below where they say the HDMI spec specifies an exact 4:3 or 16:9 aspect ratio and refers to the way anamorphic SD video is upscaled.
If it's true maybe it's another indication that exactly 16:9 and 4:3 are more standard than the official standards these days.
http://lurkertech.com/lg/video-syste...xelaspect_hdmi

Last edited by hello_hello; 27th November 2011 at 11:10.
hello_hello is offline   Reply With Quote
Old 27th November 2011, 16:08   #24  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,016
Quote:
Originally Posted by hello_hello View Post
.....It seems to me most (PAL 4:3) DVDs use a PAR of 16:15 regardless of whether the extra 8 pixels each side contain image or not, but I'm still trying to understand this properly.
Well, one simply has to accept that anamorphic DVD's can use the Generic or ITU PAR (or a mod-16 compliant approximation of it).
My experience: The majority of those (older?) DVDs which have about 8 pixels borders left and right follow the ITU PAR. This is no proof however, as the picture could also have been scaled to accommodate overscan. Those DVD with an active picture width of 720 (no left and right borders) are likely to follow the generic PAR.
One can try to do the "circle test" to conclude on the PAR (unfortunately a reliable circle may not be readily found in the source), or one can try to 'reverse-engineer' the PAR starting from the Movie Aspect Ratio (like 2.39, 2.35, 1.85, 1.7778 etc. as indicated on the cover or found on imdb).
What the playback device eventually does with it is a totally different story. For example, my standalone plays ITU DVDs via HDMI including the black borders left and right as 4:3 or 16:9, means the active picture is in fact 2.5% too narrow, wheras my old DVD player using the SCART interface to an analog TV plays these DVDs undistorted ...
Sharc is offline   Reply With Quote
Old 28th November 2011, 09:26   #25  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,901
Quote:
Originally Posted by Sharc View Post
Well, one simply has to accept that anamorphic DVD's can use the Generic or ITU PAR (or a mod-16 compliant approximation of it).
I don't recall ever stating they couldn't.

Quote:
Originally Posted by Sharc View Post
My experience: The majority of those (older?) DVDs which have about 8 pixels borders left and right follow the ITU PAR. This is no proof however, as the picture could also have been scaled to accommodate overscan. Those DVD with an active picture width of 720 (no left and right borders) are likely to follow the generic PAR.
Well I won't argue about older DVDs, but I'd certainly agree regarding most newer DVDs, which is the point I was making originally. The PARs posted at the beginning of this thread are all well and good, but if the majority of DVDs don't actually use them.....

Quote:
Originally Posted by Sharc View Post
What the playback device eventually does with it is a totally different story. For example, my standalone plays ITU DVDs via HDMI including the black borders left and right as 4:3 or 16:9, means the active picture is in fact 2.5% too narrow, wheras my old DVD player using the SCART interface to an analog TV plays these DVDs undistorted ...
I guess unless you tend to use your older player more often, it's probably a good thing most DVDs aren't ITU.
If newer equipment seems more likely to use generic 16:9 & 4:3 aspect ratios, and newer DVDs seem far more likely to have used them also, what's the motivation for studios/DVD manufacturers to suddenly do an about-face which makes returning to the official standards for DVDs likely?
Personally I think when it comes to understanding the "official" way to resize a DVD it's nice to know... but when it comes to instructing people how to "properly" resize a DVD or determine PARs etc, it's really probably time to let it go. Or at least explain both methods.... the one which is supposed to be used, and the one which is more likely to be used.

Last edited by hello_hello; 28th November 2011 at 09:30.
hello_hello is offline   Reply With Quote
Old 28th November 2011, 11:31   #26  |  Link
Alex_ander
Registered User
 
Alex_ander's Avatar
 
Join Date: Apr 2008
Location: St. Petersburg, Russia
Posts: 337
I'd say that document-wise, there is no such a universal thing as 'ITU PAR', since there are 3 different ITU documents in
use for different cases:

1. BT.601 - for video capture and broadcasting - that's where the so-called 'ITU PAR' come from
2. H.262 (mpeg2) - is believed* to be used by DVD (digital storage)
3. H.264

* The DVD specification itself is not a widely quoted document.

#2 ITU document says that a standard mpeg2 decoder maps all the stored samples (like 720x480) to the AR (4:3, 16:9 or 2.21:1, unless it's SAR=1:1 - 'square sample') written in file header. Any other proportions can be only obtained using optional sequence_display_extension. There's also an example of usage SDE for possibly providing BT.601 proportions. But in practice (some people at videohelp looked through their collections), SDE is only used with pan&scan (of the stored samples, 540x480 are mapped to 4:3 then). This might explain why many (if not most) DVD's don't actually follow #1 document.

#3 ITU document is quite different and the first one to explicitely define standard SAR's (standard name for 'PAR' - Sample Aspect Ratio) for H264 encoded files (their codes are written in file header). There are 16 recommended values and all of them are calculated from 704 rather than 720 (no 702, no 711 and the like). For 720 and 480 'horizontal overscan' is mentioned in the table. It is actually 720/704 linear correction in direct calculations from 'resolution+AR' numbers and can be easily applied instead of referencing to any tables (making them absolutely useless). This apparently applies to SD content on BD, but leaves a doubt about about mpeg2 BD content (can it still follow #2 document or not).
Alex_ander is offline   Reply With Quote
Old 28th November 2011, 13:14   #27  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
Quote:
Originally Posted by hello_hello View Post
Well I won't argue about older DVDs, but I'd certainly agree regarding most newer DVDs, which is the point I was making originally.
I agree with you that most (maybe even almost all) newer Hollywood film DVDs, for whatever reason, are using the non-ITU method (strictly talking about PAL discs here, don't know about NTSC ones), but it does not mean any new DVD is likely to do that because it also depends a lot on where the video originates from and what kind of "video" it is.
Footage that was shot with video cameras (in contrast to film cameras which requires a film->digital transfer) is much much more likely to follow ITU (yes, even today). In other words, footage that was shot to be viewed on a TV only, not in the cinema.
If you buy a DVD of a TV soap opera or something that was shot with SD(!) video cameras then you can be almost certain that it is following ITU, even if all 720 pixels of the DVD are filled (this is due to the fully digital recording and transfer to DVD). If it was shot using HD video cameras things depend on how it was downscaled, if all 720 pixels are containing picture then it is probably using non-ITU.
Of course, still, having all 720 pixels filled or not is not a fool proof method, but it's something to consider if you're willing to try and find out which one is correct.

Last edited by TheSkiller; 28th November 2011 at 13:28.
TheSkiller is offline   Reply With Quote
Old 24th December 2017, 23:52   #28  |  Link
mnm-a
Registered User
 
Join Date: Oct 2015
Posts: 10
Quote:
Originally Posted by vampiredom View Post
To convert a square pixel image to a different PAR is easy. Divide the width by the PAR like such:

640x480 @ 10/11 PAR
640 / (10/11) = 704
704x480

The above example is rather simplistic. In many cases, when converting from square pixels, we'll want to scale the image overall. First we need to determine the scaling factor. To accomplish this, divide the source height by the target height:

Code:
SourceHeight / TargetHeight = ScalingFactor
1280x720 -> 704x480 @ 40/33 PAR
480 / 720 = 0.66666666666666666666666666666667
Sorry, AFAIU this has a mistake.
It should be

Code:
TargetHeight / SourceHeight = ScalingFactor
mnm-a is offline   Reply With Quote
Old 3rd January 2018, 01:48   #29  |  Link
therube
Registered User
 
Join Date: Aug 2013
Posts: 202
Quote:
Originally Posted by hello_hello View Post
Yoda's Resize Calculator
At least with the calculator handy it's not necessary to remember a table of PARs.
Link looks to be 404?
Videohelp hosts, Yoda's Resize Calculator 0.3.5.11.

(For reference, the thread here at doom9, Yoda's Resize Calculator.)

Last edited by therube; 3rd January 2018 at 01:52.
therube is offline   Reply With Quote
Old 6th January 2018, 03:08   #30  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,901
Quote:
Originally Posted by therube View Post
Link looks to be 404?
Videohelp hosts, Yoda's Resize Calculator 0.3.5.11.

(For reference, the thread here at doom9, Yoda's Resize Calculator.)
I think the links for the newer version in that thread are dead, so here's a new one for version 0.4.0.1.
I was never officially released, but it works fine and includes mpeg4 PARs as well as the old ITU PARs for NTSC and PAL. I'll see if I can get the VideoHelp page updated with the newer version at some stage, given Yoda has stopped development and the attachment in his post was never approved.
https://forum.doom9.org/showthread.p...51#post1825751
hello_hello is offline   Reply With Quote
Old 6th January 2018, 14:25   #31  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,993
Quote:
Originally Posted by hello_hello View Post
I think the links for the newer version in that thread are dead
No not dead, simply awaiting attention of a vigilant moderator to approve Yoda's attachment. [it might take some time]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 7th January 2018, 16:45   #32  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,901
Quote:
Originally Posted by StainlessS View Post
No not dead, simply awaiting attention of a vigilant moderator to approve Yoda's attachment. [it might take some time]
Not to worry. The VideoHelp page has been updated with the newer version now.
https://www.videohelp.com/software/Y...ize-Calculator
hello_hello is offline   Reply With Quote
Old 23rd April 2018, 23:11   #33  |  Link
Logan9778
Registered User
 
Join Date: Mar 2017
Posts: 118
Lol, here we go again.

THIS is what really helped me with BBC encodings (Doctor Who, The Young Ones, Fawlty Towers, etc.) I can't put it in enough posts.

BBC USES THEIR OWN UNIQUE SYSTEM!

Quote:
Originally Posted by Ghitulescu View Post
Good that you mentioned BBC.

BBC used a different approach.

The digital frame sizes are 788 and 1050 respectively (PAR=1), for they include also what BBC calls blanking. The extra pixels are usually painted black.

Resize then to 788/1050 then cut the black borders and you'll end with some strange number of pixels but quadratic.

Last edited by Logan9778; 23rd April 2018 at 23:15.
Logan9778 is offline   Reply With Quote
Reply

Tags
conversion, par, pixel aspect ratio, standards

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.