View Full Version : AR again
GodofaGap
19th January 2011, 20:37
First of all, that SAR is another name for PAR. This seems to be a common mistake.
Excuse me, but in H264 what you call PAR is called SAR. SAR stand there for sample aspect ratio (for reference check the x264 setting for anamorphic video) and a sample is in principle just a more generic word for pixel.
cacepi
19th January 2011, 21:40
There's nothing exact about the "exact" numbers there. They're more wrong than the common approximations.
And let's not forget that the SAR values for MPEG-4 are only valid for cropped images:
For the examples in Table E-1, the term "without horizontal overscan" refers to display processes in which the display area matches the area of the cropped decoded pictures and the term "with horizontal overscan" refers to display processes in which some parts near the left and/or right border of the cropped decoded pictures are not visible in the display area. As an example, the entry "720x576 4:3 frame with horizontal overscan" for aspect_ratio_idc equal to 2 refers to having an area of 704x576 luma samples (which has an aspect ratio of 4:3) of the cropped decoded frame (720x576 luma samples) that is visible in the display area.
In other words, 12:11, 16:11, 40:33 and 10:11 all assume a cropping rectangle of the clean aperture only (or "active picture" or whatever you want to call it... 704x480 for NTSC, 704x576 for PAL).
Hard as it is to believe - as the concept seems loosely understood on this thread - 16:9 really does mean 16:9.
yetanotherid
20th January 2011, 04:35
How would I know how a stranger (that is probably 10000 km away from me) sees the image? His image?
Having a conversation with you is like trying to determine the PAR used on a DVD, while banging your head against the desk.
Once again, you said:
"But when people say Hey, the Non-ITU looks ok but the ITU not, s/he also must say how. How did s/he see it, rightly or wrongly?"
And once again, I'm asking... why must they say how, and how do they prove prove what's usually just an opinion as to which method looks right?
I've no idea how you'd know why a stranger 10000km away from you sees one method as correct and the other wrong, but I'm equally baffled as to what it might have to do with the question. Unless your day job has you employed as the PAR police?
People that do not care will always be confused about PAR, DAR, SAR and stuff and they will always get into conversion problems. Leave the computer for what it was designed to do, processing data, and use the things appropriately.
On dear.... not that old chestnut again??? Please define "data" because I was under the impression the PC can't process anything else.
Just in case you hadn't noticed, and your odd "PC for processing data" theory aside, in the real world people use their PCs for converting video all the time, including DVDs, so naturally there will be discussions as to how to achieve the best result, including the determination of PAR. Living in denial as to whether they should be doing so is irrelevant. It's time to accept it and move on.
Just in case you also hadn't noticed, the people posting here don't fall into the "don't care" category anyway, so your point is irrelevant in two completely different ways.
And why are you posting in a thread discussing the subject of converting DVDs with a PC if you think people shouldn't be doing it? Surely there must be more appropriate threads for you to post in, such as they best way to convert video with your toaster, or whichever appliance it is you use for the job?
Should nevertheless the user be determined to convert a DVD into a space-oriented format to be watched on a computer, I strongly suggest her/him to do some visual tests with various settings (PAR and cropping) before the real encoding step.
Just out of curiosity, have you read any of this thread, because if this thread's not about experimenting with visual tests and various settings, I'm curious as to what you think it's actually about?
The third one is difficult to be spotted because people generally interpret the images. They know that the top/bottom bars (matting) or the pillarbox sidebars are not part of the image. And because of this, they got tricked into thinking that a spaghetti western has a DAR of 2.35:1. False! The DAR cannot be anything else than 16:9 or 4:3. For 2.35:1 to be achieved, black bars are added (and for 16:9 the image would be anamorph encoded, and the bars would be thinner).
These "people" you refer to, it sounds like another gross over-generalisation to me. It might be a mistake someone new to encoding would make once, and probably not make again.
One sees this if the image has subtitles - on a proper DAR these cannot be outside of the image like it's usually the case.
Usually?? So it wouldn't be hard for you to provide an example?
Are you sure it's not a case of the video having been encoded with a PC, the subtitles placed below the image (which can be done), and your "never use a PC for converting video" phobia has you making incorrect assumptions regarding the DAR?
manono
20th January 2011, 05:21
Excuse me, but in H264 what you call PAR is called SAR. SAR stand there for sample aspect ratio (for reference check the x264 setting for anamorphic video) and a sample is in principle just a more generic word for pixel.
And the H264 people took an acronym that already had a perfectly good definition and redefined it to mean something else, thus confusing the issue. For me and many others SAR stands for Storage Aspect Ratio. Why redefine what the letters stand for when PAR already exists?
And yetanotherid, your sarcastic attitude will either stop immediately or you'll be struck. If you have something to say, say it politely. I'm removing the second of your two posts above. Don't respond in kind, Ghitulescu.
Ghitulescu
20th January 2011, 06:41
Usually?? So it wouldn't be hard for you to provide an example?
Are you sure it's not a case of the video having been encoded with a PC, the subtitles placed below the image (which can be done), and your "never use a PC for converting video" phobia has you making incorrect assumptions regarding the DAR?
I'll try to provide some images, provided they will be quickly approved.
yetanotherid
20th January 2011, 08:04
And yetanotherid, your sarcastic attitude will either stop immediately or you'll be struck. If you have something to say, say it politely. I'm removing the second of your two posts above. Don't respond in kind, Ghitulescu.
Well I've read through my post again several times, and I'm at a loss as to your definition of sarcastic.
Personally I think I showed great restraint given I'd been discussing DVD PAR in a PAR thread for two days, only to have the resident PAR expert pop in to enlighten us with his knowledge of DVD PARs not being square, explain we shouldn't be converting DVDs with a PC, and then proceed to tell me if I wanted to continue discussing PAR I should start my own thread. Pity none of it helped the OP answer his actual question, but I guess of you give me a strike next time it'll have to do while I happily spend my time doing something else.
GodofaGap
20th January 2011, 08:47
And the H264 people took an acronym that already had a perfectly good definition and redefined it to mean something else, thus confusing the issue. For me and many others SAR stands for Storage Aspect Ratio. Why redefine what the letters stand for when PAR already exists?
That may be true (although storage AR is something of questionable use), but it is rather irrelevant to the point made.
Ghitulescu
20th January 2011, 09:50
Excuse me, but in H264 what you call PAR is called SAR. SAR stand there for sample aspect ratio (for reference check the x264 setting for anamorphic video) and a sample is in principle just a more generic word for pixel.
SAR is used to obtain a usable image using the information actually stored. For instance, valid frame sizes for DVD MPEG-2 are 352x, 704x and 720x576 (for PAL). That means the actual PAL image of a single scanline was compressed to be stored on 352, 704 or 720 pixels. How many pixels has a PAL scanline? Well, none. How many samples has 1 second of music? Still none. Based on spectral analysis, frequency response of the tape based systems and using technical common sense, it was established, but this only after digitalisation came into the video world, that it makes sense to have 702 samples on a PAL scanline, and 711 on an NTSC scanline. Still no 352, 704 nor 720, but 701(some decimals here) and 711(some decimals here too). How on hell did those values appeared?
Well, any digitizer is based on binary logic, like the PC, and since 8 and 16 were already in use in computers as well as in micro electronics, it made sense to the standardizing bodies to accept those values. 712 (the most close 8multiple to 711) was not chosen, instead 704 and 720, for the same reason why 44kHz1 was chosen for CD audio. And 704 was used to digitize analog PAL signals (close to the 702 samples).
Why 352? Because it's 704/2 and Philips thought that this is the theoretically resolution of the VHS system (corrected with the kell factor). JVC took this info in the NTSC world.
A perfect playing device needs nothing more than the storage frame size and the DAR to output a perfect PAL/SECAM signal. Because it simply need to enlarge the horizontal signal (based on the line length in storage pixels) to 711/702 samples. It's exactly the same principle as used in stretching/shrinking the audio from one standard to the other (PAL <-> NTSC). And, like in music, when one senses the wrong pitch, one can sense the wrong DAR.
The signal travels the wire and reaches a display device. What does the device do? Take the signal and stretches it to fit its native resolution. And what if the image be distorted? Then the is an incompatibility between the PAR of the source and the PAR of the display (provided the DAR is the same for both, ie 4:3 signal, 4:3 display or 16:9 source, 16:9 display). Then the device takes the signal, corrects it with PAR (display PAR), then fits it in the native resolution. It should be a perfect fit, if the PAR was correctly calculated. Is the signal in another DAR? Then the DAR is transported along (WS signalling) or the correction is done internally in the playing device. On top of this, and to partially correct some issues, came SDE, usually called Pan&Scan, which takes only one portion of the stored frame to display (logical matting).
Why is there so much confusion in the PC world?
Because the signals are no longer converted into well established standards ("wire transport" is missing). And thus the PARs for both must be recalculated, generally for a display PAR of 1:1. This is why the old term of Storage aspect ratio was changed into Sample aspect ratio. Simply because one known factor, considered to be fixed, is no longer fixed in the PC world.
As I said, it was necessary to have only the frame size (actually the line width in sampling points/values) and the DAR to be able to reconstruct a perfect NTSC/PAL signal.
But in computer world, when a video has 800x500 pixels, there's no way of knowing what kind of standard is this (remember, it also lacks the fps element). Is it 4:3, or maybe 16:9, was it cropped, or maybe matted? It can't be fit in any of the TV standards without serious "patching" (cropping to 640x480 (assuming a PAR of 1) then sending it as 720x480 through the wire to the TV; or maybe adding black borders around to become 852x576 then send it as 720x576 through the wire with WS flag set).
Why do I mention analog?
Because a DVD is not born a DVD. Is born in the analog world, be it film (that has to be scanned) or Live TV (that has to be digitized). Even the digital recorders/camcorders are analog compliant. And thus these limitations has to be known.
People that process their own recordings, digitally made, like all these HD camcorders, smartphones, digital photocameras and the like have next to no problems. Such problems encounter those that care enough about quality yet they stubbornly insist in converting into a digital-only format.
My advice? Wanna backup your DVD collection? COPY/PASTE.
GodofaGap
20th January 2011, 10:33
This is why the old term of Storage aspect ratio was changed into Sample aspect ratio.
No no and no. People are using SAR the same as PAR here because it is defined H264 that way, and you are not going to weasel your way out of your uninformedness by posting a large blob of text.
Those people aren't making a mistake like you said.
Ghitulescu
20th January 2011, 10:45
Are you replying for the sake of replying? Do you read more than one line from a post?
Please look for the word H.264 (or its equivalents) in the original post.
The OT was what AR should a DVD have it when displayed on a PC monitor. In green my deductions, he said pixels so I assumed he thought the pixels are equally big on both axis. And the DVDs originates from the analog world, where standards must be obeyed. A DVD-video cannot have any other codec than MPEG-2 (and MPEG-1 for assuring VCD compatibility).
GodofaGap
20th January 2011, 10:55
Are you replying for the sake of replying? Do you read more than one line from a post?
Please look for the word H.264 (or its equivalents) in the original post.
Your comment that SAR was not used correctly did not refer to the original post of this topic. It referred to a post in a different topic that was definitely about H264.
In this post of yours that you refer to few posts above you did commit a series of errors. - http://forum.doom9.org/showthread.php?p=1058927#post1058927
First of all, that SAR is another name for PAR. This seems to be a common mistake. Even your calculations contradict you.
Now try again. And who is not reading?
Ghitulescu
20th January 2011, 11:02
You're right, but this notion was used to obtain some values, to support a certain crop/resize method.
Anyway, I'll stop here, not without mentioning that the exact values are not really important, as long as 853(decimals) or 852(decimals) or even 854(decimals) - values computed using various PAR values - must be anyway rounded to the nearest multiple of 4/8/16 as required by the encoding codec.
Dogway
20th January 2011, 11:03
My advice? Wanna backup your DVD collection? COPY/PASTE.
Rather than backup, I want to restore...
The OT was what AR should a DVD have it when displayed on a PC monitor. In green my deductions, he said pixels so I assumed he thought the pixels are equally big on both axis.
I always check my monitor pixel ratio is 1. The question was more about what kind of NAB has this source that fits into any standard, and therefore which PAR should it match to.
Ghitulescu
20th January 2011, 11:14
Then I misunderstood your question.
You want to "restore"? As opposed from "degrade" but not from "save"?
If you intend to repack the "restored"/processed movie back on DVD, you don't need to touch anything - do your restorations taking into account several limitations (interlaced, chroma upsampling bug etc.) without any resize/crop etc. Then save it back on a DVDR [DL] and be happy.
Dogway
20th January 2011, 11:21
why should I use a lower profile codec when technology provides me with an advanced industry supported one (h.264)? Excepting raw film, analog world is getting behind the digital.
You talked a lot about 704 pixels wide, but this film was 716, I want to know if the guys who made this DVD made any mistake (as through the time Ive been around here I have seen many official DVD's are wrong, and this one isn't really really official at all)
Ghitulescu
20th January 2011, 11:55
I said it before and I 'll say it once more: the DVD is the best what happened to the SD video for consumers (MiniDV for camcorders), the almost perfect combination of price, handling, quality, features and not least size.
Yet the medium and the format have both flaws. Some of these flaws are difficult to be treated correctly, usually what's done is masking.
Like it was the case in the 90ies, when a lot of "lost" movies appeared on VHS and people feared that these movies will be lost again, forever, now it happens the same with the DVD. Those movies appeared again on DVD, in a much better quality (anyway, better than could do Average Joe), depending on the source.
If a movie has the potential to attract watchers or belongs to so "cult movies" for various population groups, it will be rereleased on BD, in a better quality than Average Joe would obtain.
Unless the movie has to be immediately watched/used, there's no hurry to do this. My opinion.
Dogway
20th January 2011, 12:46
My question is not only for this source, but in general, for learning purposes (through practical examples). Digital media formats playback is a reality, I see it in Zune (Xbox360), iTunes, Steam(?), and many other online or on-demand systems.
I dont say the idea of DVD is bad, its good at its conception, but like everything it might be bad executed. That's what many threads are about; "how can I fix this source?"
BD releases depend on potential profit, not exactly on cinematographic, artistic, cult, or human values (although its sometimes linked). And I don't see this film ever released on BD.
Edit: I agree you can have your own opinions but I opened this thread to discuss an specific AR issue. I wouldn't like this to derivate into an offtopic debate.
henryho_hk
20th January 2011, 13:36
Storage Aspect Ratio = "Number of horizontal pixels" : "Number of vertical pixels"
Sample Aspect Ratio = Pixel Aspect Ratio = "Width of a pixel" : "Height of a pixel"
Signal Aspect Ratio = Picture Aspect Ratio = Display Aspect Ratio = "Width of picture displayed" : "Height of picture displayed"
................. I have a headache .................
Gavino
20th January 2011, 14:11
Sample Aspect Ratio = Pixel Aspect Ratio = "Width of a pixel" : "Height of a pixel"
Just to muddy the waters further :), let me say that the term Pixel (or Sample) Aspect Ratio is a bad name (although it's too widespread now to correct the 'misuse').
Pixels (as represented in a digital storage medium) don't have a width and height - they are point samples. The correct term should be Pixel Spacing Ratio. The distinction may seem academic, but it causes immense confusion when trying to understand what really goes on during resizing (ie resampling to a different sampling grid).
See Alvy Ray Smith's classic 1995 paper: A Pixel Is Not A Little Square (http://alvyray.com/memos/6_pixel.pdf)
henryho_hk
20th January 2011, 15:02
No, I don't agree with you. Pixel, being a sample of the picture, has a shape, and thus width and height. Point hasn't (by definition). Pixels' shape is defined by the point spacing (or sampling).
The term "Point Spacing Ratio" is a good idea. ^___^
Ghitulescu
20th January 2011, 15:56
No, I don't agree with you. Pixel, being a sample of the picture, has a shape, and thus width and height. Point hasn't (by definition). Pixels' shape is defined by the point spacing (or sampling).
The pixel is a display unit, not a recording one.
Gavino is right. During the acquisition, the luma is sampled at 13.5 MHz, that means the instant amplitude value of the signal is captured. And, like audio, during play, in analog domain, the samples are outputted at the same rate (13.5 MHz) and the resulting video amplitude "interpolates" the points/samples.
However, on a PC, one needs pixels. Otherwise the image of a Bitmap would look like Milky Way (the galaxy) :p. So, by convention, the screen was filled in.
So by CRTs. The height of the "pixel" is given by the thickness of the electronic spot. Try to adjust its diameter, like one does in an oscilloscope, and you'll see the raster.
mpucoder
20th January 2011, 16:08
"A pixel is not a little square" is another topic of debate as it depends on how the image was sampled. Digital cameras do not sample points, the sensors have definite size. ADC systems sampling at 13.5MHz (ITU601) may appear to sample a point in time as they use sample and hold circuits, but the signal has been through a low pass filter which smoothes the values, therefore spreading the sample out over a short distance in time. Vertically even analog camera scan lines have thickness.
But Ghitulescu brought up a good point that everyone seems to have ignored. The active area of NTSC is NOT 704x480, and PAL is NOT 704x576. He mentions the correct horizontal sampling of approximately 711 for NTSC and 702 for PAL. Only approximate because the number of samples in a scan line is determined by the sampling rate (13.5 MHz) and the appropriate analog standard definition for the active area. The vertical active area is also different from the digital standard, NTSC lost 5 scan lines in the move to the digital domain. These lines were part of the image shot a 4:3.
Now in the DVD world there are multiple paths to a DVD. It could come from analog television cameras or telecined movies, in which case the active area for NTSC would be 711x485. Or it could come from film or CGI and be 720x480 (ignoring the older ITU standard and using the full capability of the media). These are the two most common.
Dogway mentioned the scan lines appear to have 716 samples per line. This could come from timing errors in the source. Older analog cameras have analog adjustments for sync pulse, back porch, and blanking area that need to be calibrated periodically. Most digitizers will encode 720 samples per line to allow for timing errors (horizontal skew - the blanking area may be the correct width, but not aligned correctly with the sync pulse, moving the image left or right a few samples).
yetanotherid
20th January 2011, 16:32
why should I use a lower profile codec when technology provides me with an advanced industry supported one (h.264)? Excepting raw film, analog world is getting behind the digital.
None that I can see. Given you're "restoring" and therefore eventually re-encoding anyway, why would you keep the video in some archaic format when you can convert it one which will play on a larger number of devices, and take up far less space for a given quality? I don't see one person's obsession with not using a PC to transcode an anamorphic video to square pixels as a good enough reason, especially when as far as I'm concerned he's not offered any logical reason for not doing so.
So what if there's a decision to be made regarding the resizing? I don't see how on one hand someone can write an essay on the various ways the DAR can be fudged when recorded and displayed in the analog world, then on the other use that as the very reason for not trying to get it right when converting in the digital world. It makes no sense to me.
Personally, if I was "restoring" a DVD or any other format, my last choice for output format would be DVD again. I've not backed up a DVD to DVD format for years. Why would you?
Is there even any guarantee the software you're using to re-encode the DVD you're restoring will use the same PAR as the original source?
I agree you can have your own opinions but I opened this thread to discuss an specific AR issue. I wouldn't like this to derivate into an offtopic debate.
Good luck with that. ;)
yetanotherid
20th January 2011, 16:53
But Ghitulescu brought up a good point that everyone seems to have ignored. The active area of NTSC is NOT 704x480, and PAL is NOT 704x576. He mentions the correct horizontal sampling of approximately 711 for NTSC and 702 for PAL. Only approximate because the number of samples in a scan line is determined by the sampling rate (13.5 MHz) and the appropriate analog standard definition for the active area. The vertical active area is also different from the digital standard, NTSC lost 5 scan lines in the move to the digital domain. These lines were part of the image shot a 4:3.
I don't know if it's a case of ignoring it, or (in my case) failing to see the relevance it has to this topic.
So I'm converting a DVD to AVI or x264 etc. I crop the non-picture area, choose a pixel resizing method and encode. Sure, if for some reason I still don't think it looks right I can resize the whole image slightly to compensate, but in what way exactly should I be stressing about active picture area and number of scan lines before I do?
I'm actually interested to know, because I'd like to know where I went wrong when encoding a DVD of an old TV series recently. In reference to the active picture area, the were sections within a single episode which required virtually no cropping, some where I needed to crop 20 or more pixels from one side and only a few from another, and some where I had to crop nearly 30 pixels from each side. So I cropped by an amount which removed the non picture area from a whole episode, picked the resizing method which seemed correct (non ITU) and encoded. What else should I have done?
(And no ....because I know it's inevitable.... I'm not interesting in hearing about the overscanning when watching the video on a display I'm never going to use).
In fact it's those recent encodes which prompted me to mention I sometimes think there's more than one PAR or DAR used on a single DVD at times, because while the majority of the time I think the non-ITU resizing was correct, there's a few times when it seemed like it wasn't. But what do you do, drive yourself mad trying to chop an episode into sections and crop and resize each differently, then try to join all the bits together?
And even if I'd left the whole thing on the DVD because of a phobia of re-encoding to play the video on another device, if there were different resizing methods used in sections of the DVD, does my dragging an old CRT TV out of the shed to display them somehow fix them?
I am curious to know, because at the moment I can't find a way to see advice not to transcode a DVD to another format as anything but silly. And for the record, aside from having cropped the crud, my encodes looked identical to the way the original DVDs were being displayed when viewed side by side on my monitors (MPC-HC). I don't know if the same thing would apply to watching them on a CRT or LCD TV, but it's irrelevant to me, because I never use one.
2Bdecided
20th January 2011, 16:56
Interesting ... so those two half lines make another difference. I’ve never heard about that. Then let me do a:
post#31.replace("exact", "somewhat approximately exactish");
Do you maybe have any links or other resources with more details about that issue? Google didn’t turn up anything besides your posts here on Doom9 and I’d really like to wrap my head around this completely.I don't have any links justifying my calculations. They were from first principles, like yours.
However, scanning on an analogue CRT is (theoretically) like this...
http://www.pembers.freeserve.co.uk/World-TV-Standards/Line-Standards.html#Vertical
...giving a picture with a height of 575 lines - the half width lines turn out to have effectively half height too.
I'm not sure what point Ghitulescu is trying to make.
Cheers,
David.
2Bdecided
20th January 2011, 17:03
And this corresponds to which SMPTE or ITU-R or EBU? :rolleyes:Once we have square pixels (SMPTE 274M and 296M), progressive scanning (ditto), same colours (sRGB vs Rec.709), and same gamma, I fail to see how you can say the standards target or don't target PCs. They define a video standard. To say the authors didn't anticipate PCs at all in the late 1990s and early 2000s seems a strange claim indeed.
The sample rate of CDs is tied to analogue VCRs - but I'm damn sure that the Yellow Book and Orange book anticipate PC use, while keeping the "legacy" sample rate.
Cheers,
David.
2Bdecided
20th January 2011, 17:10
And let's not forget that the SAR values for MPEG-4 are only valid for cropped images:
For the examples in Table E-1, the term "without horizontal overscan" refers to display processes in which the display area matches the area of the cropped decoded pictures and the term "with horizontal overscan" refers to display processes in which some parts near the left and/or right border of the cropped decoded pictures are not visible in the display area. As an example, the entry "720x576 4:3 frame with horizontal overscan" for aspect_ratio_idc equal to 2 refers to having an area of 704x576 luma samples (which has an aspect ratio of 4:3) of the cropped decoded frame (720x576 luma samples) that is visible in the display area.Where's that quote from? I ask because it's clearly wrong. The 704 vs 720 difference has nothing to do with overscan. That casts doubt on the authority of the rest of it, though I happen to think the rest is correct ;)
In other words, 12:11, 16:11, 40:33 and 10:11 all assume a cropping rectangle of the clean aperture only (or "active picture" or whatever you want to call it... 704x480 for NTSC, 704x576 for PAL).I've only seen "Clean Aperture" officially defined for HD, but it's smaller than active picture - it's active picture minus the edges that might have conversion artefacts (ringing etc) - SMPTE 274M defines it as 1888x1062. FWIW, as you might expect, the concept of clean aperture is widely ignored for HD - people expect the whole HD picture to be usable.
Active picture is the part of the signal that contains, well, picture! It could be less than 704 pixels. It could (in theory) stretch outside the 720 too.
Cheers,
David.
2Bdecided
20th January 2011, 17:20
SAR is used to obtain a usable image using the information actually stored. For instance, valid frame sizes for DVD MPEG-2 are 352x, 704x and 720x576 (for PAL). That means the actual PAL image of a single scanline was compressed to be stored on 352, 704 or 720 pixels. How many pixels has a PAL scanline? Well, none. How many samples has 1 second of music? Still none. Based on spectral analysis, frequency response of the tape based systems and using technical common sense, it was established, but this only after digitalisation came into the video world, that it makes sense to have 702 samples on a PAL scanline, and 711 on an NTSC scanline. Still no 352, 704 nor 720, but 701(some decimals here) and 711(some decimals here too). How on hell did those values appeared?
Well, any digitizer is based on binary logic, like the PC, and since 8 and 16 were already in use in computers as well as in micro electronics, it made sense to the standardizing bodies to accept those values. 712 (the most close 8multiple to 711) was not chosen, instead 704 and 720, for the same reason why 44kHz1 was chosen for CD audio. And 704 was used to digitize analog PAL signals (close to the 702 samples).
Why 352? Because it's 704/2 and Philips thought that this is the theoretically resolution of the VHS system (corrected with the kell factor). JVC took this info in the NTSC world.
A perfect playing device needs nothing more than the storage frame size and the DAR to output a perfect PAL/SECAM signal. Because it simply need to enlarge the horizontal signal (based on the line length in storage pixels) to 711/702 samples. It's exactly the same principle as used in stretching/shrinking the audio from one standard to the other (PAL <-> NTSC). And, like in music, when one senses the wrong pitch, one can sense the wrong DAR.
The signal travels the wire and reaches a display device. What does the device do? Take the signal and stretches it to fit its native resolution. And what if the image be distorted? Then the is an incompatibility between the PAR of the source and the PAR of the display (provided the DAR is the same for both, ie 4:3 signal, 4:3 display or 16:9 source, 16:9 display). Then the device takes the signal, corrects it with PAR (display PAR), then fits it in the native resolution. It should be a perfect fit, if the PAR was correctly calculated. Is the signal in another DAR? Then the DAR is transported along (WS signalling) or the correction is done internally in the playing device. On top of this, and to partially correct some issues, came SDE, usually called Pan&Scan, which takes only one portion of the stored frame to display (logical matting).I think you're really confused!
First there was analogue video.
It was digitised at a sample rate above Nyquist.
The sample rate was chosen to work equally well for composite PAL and composite NTSC. Also component PAL and component NTSC. It had to be a multiple of 1.5MHz. IIRC the full explanation is in the EBU tech article on the 20th anniversay of Rec.601 if you want to reach it.
The part to "keep" (the active line length - the actual picture!) was chosen so it could be the same length for both formats.
Normal DVD players don't care about PAR or DAR or SAR or whatever when it comes to horizontal resolution - they take the samples, and push them through their DAC at 13.5MHz (or oversampled). They don't care which ones are active.
If you tell it you have a 16x9 TV, it takes the DAR and uses it to set the WSS flag.
If you tell it you have a 4x3 TV, it takes the DAR and uses it to vertically squash the content (or not).
Yet the DAC always runs at 13.5MHz.
The number of active pixels comes from the original analogue video standards, and the chosen sample rate for digitisation.
They didn't pick the number of active pixels they wanted first, and then figure out a sample rate to match.
Cheers,
David.
Brother John
20th January 2011, 18:18
@2Bdecided
Thx for the link. Might be a good start for some digging and thinking on a rainy Sunday. ;)
Where's that quote from? I ask because it's clearly wrong.
That would be the H.264 specs. In the ITU document version from 03/2010 it’s note 1 on page 374, where they describe the aspect ratio fields in the video stream.
Ghitulescu
20th January 2011, 20:25
I think you're really confused!
First there was analogue video.
It was digitised at a sample rate above Nyquist.
The sample rate was chosen to work equally well for composite PAL and composite NTSC. Also component PAL and component NTSC. It had to be a multiple of 1.5MHz. IIRC the full explanation is in the EBU tech article on the 20th anniversay of Rec.601 if you want to reach it.
The part to "keep" (the active line length - the actual picture!) was chosen so it could be the same length for both formats.
Normal DVD players don't care about PAR or DAR or SAR or whatever when it comes to horizontal resolution - they take the samples, and push them through their DAC at 13.5MHz (or oversampled). They don't care which ones are active.
If you tell it you have a 16x9 TV, it takes the DAR and uses it to set the WSS flag.
If you tell it you have a 4x3 TV, it takes the DAR and uses it to vertically squash the content (or not).
Yet the DAC always runs at 13.5MHz.
The number of active pixels comes from the original analogue video standards, and the chosen sample rate for digitisation.
They didn't pick the number of active pixels they wanted first, and then figure out a sample rate to match.
Cheers,
David.
I'm not confused at all. This is exactly what I said. But I started with the DVD first, because this was the topic, then I said why it was chosen this way.
Sorry if anyone else misunderstood my arguments. But the DVD players do care about the DAR (not the very old ones), because they have to signal the TV, Hey this is a 16:9 video, using the WS[S] flag.
Short comment: digitizing above Nyquist. This implies that you expect a value, to be able to double it :). This value was obtained using the engineering common sense, the electronic spot was a sort of round, so the "pixel" aspect ratio should have been close to 1. So why NTSC pixels are long while the PAL are wide? Because the sampling rate was identical and NTSC had less scanlines than PAL.
cacepi
20th January 2011, 21:26
Where's that quote from? I ask because it's clearly wrong. The 704 vs 720 difference has nothing to do with overscan. That casts doubt on the authority of the rest of it, though I happen to think the rest is correct ;)
In the H.264 spec, "overscan" means "anything outside the cropping rectangle." It doesn't refer to display overscan.
I've only seen "Clean Aperture" officially defined for HD, but it's smaller than active picture.
Hence the "whatever you want to call it" and dimensions for NTSC and PAL in my post.
But to properly answer, it's my Quicktime bias; all uncompressed video in Quicktime has a clean aperture, HD or not.
yetanotherid
21st January 2011, 09:01
I guess the fact that none I've my questions in post #74 were answered, it means none of the following posts directly apply to the original topic?
2Bdecided
21st January 2011, 11:21
Short comment: digitizing above Nyquist. This implies that you expect a value, to be able to double it :). This value was obtained using the engineering common sense, the electronic spot was a sort of round, so the "pixel" aspect ratio should have been close to 1.I'm not trying to be an arse (honest!) but that's not really right either.
The original analogue black-and-white standards tried to define a bandwidth which gave equal vertical and horizontal resolution. System A was the first with interlacing, and arguably allocated the wrong bandwidth because the effects of interlacing on vertical resolution weren't fully appreciated. All the subsequent standards pretty much agree on the bandwidth needed (there's are only small ~1MHz difference in luma bandwidth, for a given number of lines, the world over). (Ignoring 819-line broadcasts!).
When digital sampling came along, the sample rate was chosen based on the analogue bandwidths - which had been chose decades before. It had nothing to do with getting "close" to square pixels or round spots.
Since all the signals at the time were interlaced, having exactly square pixels wouldn't have given equal horizontal and vertical resolution (in the strict sense of the word) anyway!
So why NTSC pixels are long while the PAL are wide? Because the sampling rate was identical and NTSC had less scanlines than PAL.Yes, can't argue with that ;) Except for 16x9 :)
Cheers,
David.
2Bdecided
21st January 2011, 11:24
In the H.264 spec, "overscan" means "anything outside the cropping rectangle." It doesn't refer to display overscan.Wow - they had great fun giving widely used old words brand new (and contradictory!) meanings in that spec, didn't they?
Even so, the idea that 704x576 and 704x480 are the pixels that map to the correct standard DAR is a very fine one which doesn't break the old ITU standards at all (well, by less than a pixel, so who cares?). Better than the whole 720/704 confusion that the world adopted in practice.
Cheers,
David.
2Bdecided
21st January 2011, 11:40
I'm actually interested to know, because I'd like to know where I went wrong when encoding a DVD of an old TV series recently. In reference to the active picture area, the were sections within a single episode which required virtually no cropping, some where I needed to crop 20 or more pixels from one side and only a few from another, and some where I had to crop nearly 30 pixels from each side. So I cropped by an amount which removed the non picture area from a whole episode, picked the resizing method which seemed correct (non ITU) and encoded. What else should I have done?It sounds like the different cameras weren't set up very well! What's common over here is that the length of the active picture is correct (52us, 702 pixels), but it's location WRT horizontal sync shifts around a little from camera to camera. It almost always falls entirely within the 720 capture window (assuming that's placed correctly - without access to the analogue video signal and a video scope to start measuring things WRT to the analogue horizontal sync pulse, it's not possible to know for sure!)
Such cameras really should be ITU compliant (actually ITU-R BT.470 or SMPTE 170M compliant, digitised in a ITU-R Rec. BT.601 compliant way - I think ITU compliant will do for shorthand!). Given what sounds like very poor engineering maintenance, maybe those had drifted way off. Fixing it is like a video restoration task - way beyond a simple "what is the correct PAR?".
Like you, I'd be tempted to crop off all the black - but then I'd be left with some totally non-standard size, and I don't like that.
And even if I'd left the whole thing on the DVD because of a phobia of re-encoding to play the video on another device, if there were different resizing methods used in sections of the DVD, does my dragging an old CRT TV out of the shed to display them somehow fix them?No, of course not. If the PAR changes from camera to camera, then that DVD is wrong because the original production was wrong, because of shoddy engineering standards. Nothing will automatically fix it now.
However, I think it's more likely that the PAR is consistent between cameras, but the blanking is inconsistent. You'd have to find someone with intimate knowledge of analogue cameras 20 years ago to be sure though.
There's a more general question about what to do with crud that would be lost in the overscan of a CRT, but is clearly visible on a PC. Crop, blank, or leave? It's up to you - they're your encodes.
Cheers,
David.
Ghitulescu
21st January 2011, 12:03
I'm not trying to be an arse (honest!) but that's not really right either.
The original analogue black-and-white standards tried to define a bandwidth which gave equal vertical and horizontal resolution. System A was the first with interlacing, and arguably allocated the wrong bandwidth because the effects of interlacing on vertical resolution weren't fully appreciated. All the subsequent standards pretty much agree on the bandwidth needed (there's are only small ~1MHz difference in luma bandwidth, for a given number of lines, the world over). (Ignoring 819-line broadcasts!).
When digital sampling came along, the sample rate was chosen based on the analogue bandwidths - which had been chose decades before. It had nothing to do with getting "close" to square pixels or round spots.
Since all the signals at the time were interlaced, having exactly square pixels wouldn't have given equal horizontal and vertical resolution (in the strict sense of the word) anyway!
You're not an arse :) Your arguments and info are really sound and documented, unlike other people that are happy to cite wiki only. Not that wiki is wrong, but it may be.
But the need for equal H and V resolutions was required by the scanning spot (and the reproduction spot). VHS and various other sources do not have equal resolutions (optical, pixels, samples, you name it) yet few people can see the difference. Was not even in the first mechanical TV systems, it is not in some HDTV flavours (like HDV).
This way resulted the bandwidth, not vice-versa (ie the bandwidth generated the resolution and the PAR and the DAR). In the "ancient" times of the TV, the bandwidth was so limited, that interlacing was invented to keep it at the minimum while still preserving the PAR/DAR/timings/etc. Should it be the bandwidth the "first born" and all other parameters made dependent thereon, it would have been no problem to let the scanning spot sweep longer the scanlines for wider "pixels" (slower changes, lower frequencies, more distant sampling intervals, you name it), like is the case with the VHS/Video8. Nobody would have noticed it, like with the VHS case.
mpucoder
21st January 2011, 16:29
WRT to post 74 - the info about the true geometry of NTSC was meant more for informative purposes. If someone is going to argue about the real PAR then start with the real geometry (the AR is well known).
I agree with 2Bdecided about the DVD in question - badly made. There are other ways the aperture could shift besides the cameras, though. Analog cameras not only need their timing properly adjusted, but, in order to be transitioned (with what used to be called an SEG, but more and more just called a switcher) the signals must be synchronized to each other. There are 2 ways to do that, either by genlocking the cameras to a master clock, or using TBC/framesync after the camera. Getting the timing right is very tricky, and subject to change day to day or, in the case of genlocked cameras, simply moving a camera can change its timing (the capacitance of the cable can be affected by bending it). If this were the case the shifts would occur at camera changes and you would be able to determine which camera was off.
If, on the other hand, the shifts are unrelated to which camera and don't change from shot to shot, but from sections that are seamingly random, the problem lies elsewhere. My best guess would be different equipment used to telecine different segments, possibly with some processing - every analog processor also has to account for its propagation delay. Some equipment introduces very small delays that go uncorrected to save cost since the delay is barely noticable.
Such are the headaches of analog video (there are even worse, such as color shifts in live remote broadcasts caused by environmental factors, that's why there was a vectorscope in the receiver room)
For anyone trying to view the full sized images in the first post - I had to remove the links to imageshack after one of their advertisers attempted to lure me into downloading a fake virus scanner (av8scan scam)
mpucoder
21st January 2011, 16:39
I had another thought - different parts of the production could have been shot on different days, or even in different studios, which could account for large sections having different apertures.
yetanotherid
21st January 2011, 17:30
I had another thought - different parts of the production could have been shot on different days, or even in different studios, which could account for large sections having different apertures.
I've no doubt that was the case. The opening credits would have required a particular amount of cropping, the stuff shot live in the studio generally another, the exterior shots required a different amount of cropping and not of of them by the same amount, and when the amount cropped was similar sometimes the picture was placed to the left or right rather than in the centre etc....
Those DVDs were of course an extreme example, but it's hardly something which is uncommon. In the case of those DVDs I did crop off all the crud, picked a mod16 width after cropping (an average for all episodes) and resized them all to the same width. As they were 4:3 content I also cropped enough from the top and bottom to end up with a perfect 4:3 display aspect ratio. To me that was best way to transfer the video from DVD-land and end up with nice, clean copies.
What I'm still not sure about though, is the OP started this thread to try to work out the best way to resize and crop his DVDs when encoding, but so far none of the bickering over old analogue standards seems to have any direct relevance to the original topic. While I guess it's nice to discuss it (even though hypocritically one of the participants told me earlier I should start a new thread if I wanted to have a PAR discussion) how does any of it have any real practicality when it comes to deciding how to make an encode of a DVD?
2Bdecided
21st January 2011, 18:21
What I'm still not sure about though, is the OP started this thread to try to work out the best way to resize and crop his DVDs when encoding, but so far none of the bickering over old analogue standards seems to have any direct relevance to the original topic. While I guess it's nice to discuss it (even though hypocritically one of the participants told me earlier I should start a new thread if I wanted to have a PAR discussion) how does any of it have any real practicality when it comes to deciding how to make an encode of a DVD?Because if it was properly made in the first place you'd know what the PAR was! ;)
Cheers,
David.
mpucoder
21st January 2011, 18:29
I see two sides to this, the perfectionist, and the practical. Practical works for me.
To be practical, pick a method that looks good to you, your brain will adjust to any anomolies. You may have to correct some really bad DVDs, but hopefully they are rare.
To the perfectionists - you can spend a lifetime trying to get it perfect, and then someone like me will point out a flaw. One big one to consider is viewing angle - to be perfect one must view the image dead center both vertically and horizontally. This doesn't happen in the cinema for anyone (they would block the projection) yet no one complains (well, maybe the people in the wall aisle do, or the front row). Sitting off-center introduces perspective that creates a trapezoid (trapezium to the British) image, yet the brain compensates.
yetanotherid
22nd January 2011, 09:52
Because if it was properly made in the first place you'd know what the PAR was! ;)
Which logically means it's only relevant if there's a way to determine whether the DVD was properly made?
Okay, so I just grabbed a PAL DVD. It's 16:9, no black bars, but needs a row of pixels top and bottom removed (half lines of "crud"). Even though it probably doesn't need cropping at all at the sides, I'd crop a couple of pixels from both to make the sides nice and sharp. Can I determine the correct PAR from any of that?
Sharc
22nd January 2011, 10:39
Which logically means it's only relevant if there's a way to determine whether the DVD was properly made?
Okay, so I just grabbed a PAL DVD. It's 16:9, no black bars, but needs a row of pixels top and bottom removed (half lines of "crud"). Even though it probably doesn't need cropping at all at the sides, I'd crop a couple of pixels from both to make the sides nice and sharp. Can I determine the correct PAR from any of that?
Not sure if I understood your question fully, but by just cropping something off you don't change the PAR (i.e. Pixel Aspect Ratio). The PAR (Pixel Aspect Ratio) is only changed with resizing. When one applies cropping plus resizing one can calculate the "New PAR" like:
New_PAR = Original_PAR x (resized_height x cropped_width) : (cropped_height x resized_width)
Unfortunately only the studio could tell you what "Original PAR" they applied when they encoded the DVD. Otherwise you can only guess using the circles/squares method, or you may want to start from the Movie Aspect Ratio (like 2.35:1) which you find on the DVD cover or from a movie database, crop the black borders (if any) exactly off and try to calculate (spreadsheet) which of the standard PARs (generic, Mpeg-4, ITU) gets closest to the active width/active height ratio.... Good luck.
Dogway
22nd January 2011, 11:05
Unfortunately only the studio could tell you what "Original PAR" they applied when they encoded the DVD. Otherwise you can only guess using the circles/squares method, or you may want to start from the Movie Aspect Ratio (like 2.35:1) which you find on the DVD cover or from a movie database, cropp the black borders (if any) exactly off and try to calculate (spreadsheet) which of the standard PARs (generic, Mpeg-4, ITU) gets closest to the active width/active height ratio....
Would it be safe to assume they didn't crop out any of the original active picture and I only need to crop the blanking and apply the DAR informed on the Movie Database (or any film generic AR, 1.85,2.35,1.77...)
This doesn't seem a very orthodox procedure as for a 1:1 DVD conversion, but maybe for a good workaround DVD restoration(?)
Sharc
22nd January 2011, 11:41
Would it be safe to assume they didn't crop out any of the original active picture and just crop the blanking and apply the DAR informed on the Movie Database (or any film generic AR, 1.85,2.35,1.77...)
No, I wouldn't take it as granted. We don't know how they cropped. I just mentioned the Movie Aspect Ratio as one method how to come to a conclusion on the "most likely" applied PAR. At least I had cases where it became reasonably obvious whether ITU or Generic has been applied. The method can also help to confirm the conclusion from the "circles" tests. The errors are small anyway, so the problem is luckily a bit academic.
SeeMoreDigital
22nd January 2011, 12:55
To the perfectionists - you can spend a lifetime trying to get it perfect, and then someone like me will point out a flaw.Here's another option for the perfectionists to pursue.
Find some still images from the "square pixel" Blu-ray version of the movie to work-out the movies aspect ratio. And use them to determine the level of aspect ratio signalling required for your anamorphic encodes.
Dogway
22nd January 2011, 13:25
If only I had any 1080 MGM lion screenshot... :rolleyes:
yetanotherid
22nd January 2011, 15:58
Not sure if I understood your question fully, but by just cropping something off you don't change the PAR (i.e. Pixel Aspect Ratio).
Yeah.... my question/example though related to the earlier statement by another poster....
"because if it was properly made in the first place you'd know what the PAR was"
I'm trying to establish if there's really any way to know whether a DVD was in fact made properly. i.e. If there's "x" amount of active picture area then PAR "y" must have been used. That sort of thing.
Ghitulescu
22nd January 2011, 17:47
I'm trying to establish if there's really any way to know whether a DVD was in fact made properly. i.e. If there's "x" amount of active picture area then PAR "y" must have been used. That sort of thing.
Yes, phone the mastering engineer and ask him this question. He'll be glad to tell you what source has been used and how this was digitzed.
netmask
22nd January 2011, 22:25
Of course there is another variable to consider just to muddy the waters a tad..... a bit off topic but a possibility :)
most feature movies were shot using celluloid ie optical film and generally they only use one camera. Same with modern productions using digital camera's - just one camera and many set ups. There are exceptions with block buster movie's to cover one off effects but in the main unlike TV production the philosophy of using one camera is to maintain artistic integrity and correct lighting from one point of view. The moment you have 2 camera's shooting simultaneously the lighting has to be compromised and also makes it difficult for folk like me, the sound recordist to move the microphone around the action without casting multiple shadows. So returning more to the thread you need to establish "how" the movie was shot before worrying too much about aspect ratios. Also look up the work of Kuberick and what he did to aspect ratio right at the source putting masques in the camera and fiddling with the final negative...
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.