View Full Version : Aspect ratio
Floatingshed
10th September 2010, 10:53
I have a DVD that I'm backing up to mp4 (264 & aac).
It is 720x576 PAL and is 16:9 content, so it is anamorphic.
Should I leave it that size and shape or resize it to the correct AR, which I guess is something like 720x404?
This is for PC playback.
I know we don't talk about what is best here but is either option viable or is one bad practice and if so why?
Thanks.
Keiyakusha
10th September 2010, 10:58
In this case you should do what you like more.
By resizing to something like 720x404 you will have less vertical resolution so ask yourself if you really want that. Also check both variants on playback. If you see no difference, maybe you can end up with smaller filesize (less bitrate) by choosing 720x404
yetanotherid
12th September 2010, 16:03
Given that x264 anamorphic encodes are generally of a similar size to their xvid/divx resized counterparts, I mostly encode with anamorphic x264 video these days.... now I'm moving away from AVIs. If it's a DVD I just keep the AC3 audio rather than convert it but I much prefer to use the MKV container. If you're stuck with MP4 you might have to convert to AAC.
I know we don't talk about what is best here but in this case that's probably okay as there's no doubt you'll always lose more sharpness when resizing down (to say 720x404 as per your example) than you will with an anamorphic encode. A good anamorphic encode should lose very little or even no noticeable quality.
By the way, for a square pixel encode a width of 704 is generally more correct (for want of a better term) than 720 as 704 will generally give you the original aspect ratio with less cropping or skewing of the aspect ratio. (width and height should ideally be multiples of 16 so your 404 height has to be modified up or down to the next multiple of 16). It's easy to mess up the aspect ratio if you're setting the cropping and resizing yourself.
Which conversion program are you using? In my experience most don't skew the original DVD aspect ratio much when encoding anamorphic video but they often do when resizing as per your example. All the x264 encoders I've tried either make you crop the top and bottom of the picture to maintain aspect ratio.... which I dislike.... or they just resize the picture height to the nearest multiple of 16 which I dislike even more. Anamorphic encoding should allow the whole image to be resized to a mod16 height if necessary and the pixel aspect ratio then set to give a display aspect ratio that's identical to the original. At least in theory.....
stax76
12th September 2010, 16:17
@Floatingshed
In this case it's good practice assuming you signal to the encoder and not the muxer. Feel free to ask if you don't understand the difference.
Hagbard23
13th September 2010, 15:33
Should I leave it that size and shape or resize it to the correct AR, which I guess is something like 720x404?
This is for PC playback.
Resize it to 1:1 AspectRatio.
Anamorphic Encodings for PC just cause confusion - keep in mind, that you can upsize Anamorphic Encodings (there is not only the option of downsizing it...), if you care about loss of resolution. For example - Upsize it to 1024x576 (just a quick example).
stax76
13th September 2010, 15:38
Please elaborate
GodofaGap
13th September 2010, 15:57
Resize it to 1:1 AspectRatio.
Anamorphic Encodings for PC just cause confusion
This was true maybe 5 or more years ago when AR signalling was not supported by encoders and/or players. Nowadays, it shouldn't cause any problems, and definitely won't for private use.
Ghitulescu
13th September 2010, 16:50
This depends largely on the characteristics of the intended players.
That this won't allegedly pose problems for private use (I understand this as directed to non-professional players, id est something like VLC) is an issue somehow contradicted by "not so old" posts about the display behaviour of some software players (MPC-HC, VLC etc.) - a simple search would yield relevant threads. And even now, towards the end of 2010, there are still media players (those boxes with an HDD inside and video connectors) that do not always respect the DAR/PAR info, at least not on all outputs (analog vs. HDMI/DVI).
Hagbard23
13th September 2010, 17:47
Folks, remember that Quantization Matrices are roughly designed for Progressive 1:1(=square) Input, not for anamorphic (=rectangle) Input. There are several CQM's which give you the opportunity to change quality, but there are only a few (very few) Matrices, which are optimized for Anamorphic Encoding. So -unless you create your own CQM-(violation of Scene Rulez) quality is badly affected.This plays definitively a great role in MPEG4 ASP Business.
How the things are with AVC/H.264 i do not know exactly, but i can imagine, that noone of the developers spent a thought on anamorphic coding. They have enough in mind with the "normal" stuff...
Third: Anamorphic Encoding by itself is not intended for the use on LCD's/1:1 PAR's - As a matter of fact anamorphic encoding is surely underdeveloped over the years, and once a 16:9 XviD is passing my way, it looks like an exotic from the last century. TV sends in 16:9 <FORMAT> but not 16:9 anamorphic - here in Europe this is (not DVD's, due to specs) veeeeery seldom. One Reason for BluRay and new Containers was the Enforcement of anamorphic coding in the DVD Spec's. It was NOT possible to encode DVD's with 1:1PAR. So actually this (anamorphic) is what we want to abolish...
Last but not least: i do not believe, that any AVI-Synth filter of value is intended for the use with anamorphic (denoisers, sharpeners etc. etc. etc.) - it may work quite well, but i wouldn't sign that...in fact i would expect problems...
After that, the Hardware-Support plays a role - and i don't wanna start speaking of that cause its annoying.
What is -exactly- the reason not to encode 1:1? Keeping the Original original??? Hey folks, you are >encoding< the original, so where should we start discussing? In the Stone Age?
C'mon - everybody knows, that 1:1 Encoding is far more user friendly. What was the last Anamorphic MPEG4 Video, you have seen? Can you actually remember it?
This was true maybe 5 or more years ago
stax76
13th September 2010, 18:04
Thanks for explaining, it's a little bit out of my scope since I want file sizes be small.
GodofaGap
13th September 2010, 18:31
Folks, remember that Quantization Matrices are roughly designed for Progressive 1:1(=square) Input, not for anamorphic (=rectangle) Input. There are several CQM's which give you the opportunity to change quality, but there are only a few (very few) Matrices, which are optimized for Anamorphic Encoding.
Complete nonsense.
Third: Anamorphic Encoding by itself is not intended for the use on LCD's/1:1 PAR's - As a matter of fact anamorphic encoding is surely underdeveloped over the years, and once a 16:9 XviD is passing my way, it looks like an exotic from the last century. TV sends in 16:9 <FORMAT> but not 16:9 anamorphic - here in Europe this is (not DVD's, due to specs) veeeeery seldom. One Reason for BluRay and new Containers was the Enforcement of anamorphic coding in the DVD Spec's. It was NOT possible to encode DVD's with 1:1PAR. So actually this (anamorphic) is what we want to abolish...
Nonsense. Digital TV at standard resolutions IS send as anamorphic and Bluray was not intended to get rid of anamoprhic encoding. The point is that he already has an anamorphic source. He is not creating one.
Last but not least: i do not believe, that any AVI-Synth filter of value is intended for the use with anamorphic (denoisers, sharpeners etc. etc. etc.) - it may work quite well, but i wouldn't sign that...in fact i would expect problems...
Also nonsense.
Hagbard23
13th September 2010, 18:53
can you explain a little more than a short "nonsense" ?
It seems nonsense to me to write 3 times "nonsense", what do you think? Critics are welcome..
GodofaGap
13th September 2010, 19:08
Well you can first start explaining how a filter or CQM is affected by an image being anamorphic or not, or how you would design it such that it only works with 1:1 sources. I can't really explain this anymore than I can explain that pink elephants don't hide in my backyard.
In your second point (digital TV broadcast in Europe) you are simply wrong.
yetanotherid
16th September 2010, 06:35
What is -exactly- the reason not to encode 1:1? Keeping the Original original??? Hey folks, you are >encoding< the original, so where should we start discussing? In the Stone Age?
Take for instance a hypothetical example of a video which has pixels of a 2:1 aspect ratio. The pixel count may be 600x400 (I'm making up easy to work with numbers) but the display aspect ratio will be 1200x400.
Assuming no other editing or cropping etc, you'd encode using the same 600x400 resolution with the same pixel aspect ratio and in a perfect world your encode would match the original pixel for pixel.
What you're asking is why not first resize the image to 1200x400 and then encode it using square pixels, doubling the number of horizontal pixels which have to be encoded but in the end producing an output which still can't be of a higher resolution than the original.
Of course there's other factors which come into play such as whether the image has to be resized after it's cropped and it's argued that once you resize the benefits of anamorphic encoding may be negated, but me..... when encoding anamorphic DVDs I tend to try to crop to the nearest mod16 resolution so no resizing needs to be done, although some encoders are happy to let you encode to non-mod16 dimensions if you want to.
C'mon - everybody knows, that 1:1 Encoding is far more user friendly. What was the last Anamorphic MPEG4 Video, you have seen? Can you actually remember it?
Far more user friendly when?
The OP is backing up a DVD for playback on his PC where anamorphic video shouldn't be a problem and can easily be fixed if it is. "User friendly" not so long ago meant shrinking DVDs to a size that'd fit on a single layer disc, but I converted to AVI anyway. I only wish I'd skipped that "user friendly" step and started with anamorphic MKVs.
If someone showed me that sizing up and using square pixels gave better results I'd do it that way, but I'm not convinced myself and many X264 GUIs won't even let you do it.
PS. For those who say anamorphic encodes cause problems with software players..... I've come across numerous videos which haven't been encoded to the correct aspect ratio, many using square pixels in an image which wasn't resized correctly..... but fortunately almost anything will go into the MKV container so I open the video using MKVToolnix, set the display resolution to what it should be, remux it into an MKV file and in a couple of minutes I have a video that'll display correctly in both VLC and MPC.
Oh...... and it's a great method for fixing the DVDs which were sadly encoded using the UTI resize method. I've always suspected that 9 times out of ten at least, DVDs don't use the UTI resize method. Now, after having converted quite a few BluRay videos to standard definition and comparing them to my non-UTI DVD encodes, I'm certain of it.
yetanotherid
16th September 2010, 06:51
keep in mind, that you can upsize Anamorphic Encodings (there is not only the option of downsizing it...), if you care about loss of resolution. For example - Upsize it to 1024x576 (just a quick example).
Trouble is, many GUIs won't let you do it or at best you might have to calculate the up-sized dimensions yourself, after cropping, which doesn't make for a user-friendly experience.....
Hagbard23
16th September 2010, 08:13
Thanks for replying - i will think about it a couple of days...i regret, if my thoughts in the last posts were somewhat "incorrect".
Sorry for that..
Ghitulescu
16th September 2010, 08:38
While some/most assertions of Hagbard23 are let's say inaccurate, he nevertheless pointed to an issue I'd like to comment: PAR of 1:1 and HDTV.
It appears that HDTV cannot be stopped. Except for 1440x1080i, all other resolutions have a PAR of 1:1. There is no need to change the PAR from 1:1 if one foresees the future. Both the TV and the PC would use a PAR of 1:1. Why not profit from this unification?
Hagbard23
16th September 2010, 10:13
So here a little data about Quantization matrices:
Here we have one for Progressive Scanorder and 1:1 PAR and on the right side one for Interlaced Scanorder and 1:1 PAR:
http://www.edv-tipp.de/gif_images/dvd/scan.gif
Here an example for Prg.Scan & 1:1 PAR - it is a typical QM - MPEG uses a similar one and almost all CQM's look the same (but with different weighting):
http://www.edv-tipp.de/gif_images/dvd/kika1.gif
Here an example of a different optimized Matrix by Didee:
http://forum.doom9.org/showthread.php?postid=504958#post504958
The HVS Optimization is a try to get it optimized for anamorphic and non 1:1 content. It has larger coefficients for horizontal scanning and lower ones for vertical scanning.
So there is a higher compression for the horizontal axis. As far as i can remember, this has something to do with the frequencies used for vertical and horizontal but honestly speaking: This is out of my Scope...
http://www.edv-tipp.de/gif_images/dvd/dct.gif
That are just examples how CQMs might be affected by aspect ratio...it is no prove of truth for my older posts - i just thought it may be interesting. I am sure, there should be a connection between CQM's and aspect-ratio - at least for the human eye, but i don't have eaten wisdom with spoons - i am not sure about the whole problem.
Nonsense. Digital TV at standard resolutions IS send as anamorphic and Bluray was not intended to get rid of anamoprhic encoding. The point is that he already has an anamorphic source. He is not creating one.
Okay - i made the mistake, that nearly all TV Broadcast sends anamorphic - and it is 4:3. Here in Germany (and i can only speak for Cable-Broadcast, not SAT or HDTV) TV sends all in 4:3 Anamorphic Standard. Even if there is a Channel which sends a 16:10 or 16:9 Picture, this picture is not 16:9 anamorphic - it is simply 4:3 PAR with a Picture-AR of 16:9. So: it is NOT sent as 16:9 anamorphic. In Fact it is sent 4:3 Anamorphic. I never in my life pressed the "16:9" Key on my TV-Remote, except for DVD Playback via PC.
There are several movies in 2,35:1 which you can watch on TV Channels ... i Never have had one movie or one channel in which i had to switch to 16:9 anamorphic to get the right picture. That was what i tried to explain.
GodofaGap
16th September 2010, 10:36
The HVS Optimization is a try to get it optimized for anamorphic and non 1:1 content.
I don't really see where this is said in the linked thread.
It has larger coefficients for horizontal scanning and lower ones for vertical scanning.
So there is a higher compression for the horizontal axis.
I don't see how this is related to anamorphic when you consider that CQMs operate on a macroblock basis. You can make some assumptions that with your CQM that humans are more sensitive to detail in one direction or the other, but then this would be true for all pictures and not just anamorphic ones.
I think there is a reason why the whole CQM topic died out. In the end they only made things worse, or at best resulted in a shift on quants.
Hagbard23
16th September 2010, 10:46
I think there is a reason why the whole CQM topic died out. In the end they only made things worse, or at best resulted in a shift on quants.
In Fact - you have no idea of it.
stax76
16th September 2010, 11:38
Be nice to each other...
GodofaGap
16th September 2010, 11:45
Okay - i made the mistake, that nearly all TV Broadcast sends anamorphic - and it is 4:3. Here in Germany (and i can only speak for Cable-Broadcast, not SAT or HDTV) TV sends all in 4:3 Anamorphic Standard. Even if there is a Channel which sends a 16:10 or 16:9 Picture, this picture is not 16:9 anamorphic - it is simply 4:3 PAR with a Picture-AR of 16:9. So: it is NOT sent as 16:9 anamorphic. In Fact it is sent 4:3 Anamorphic. I never in my life pressed the "16:9" Key on my TV-Remote, except for DVD Playback via PC.
Well if we are going to throw insults I'm going to say you are rather clueless about PAR related to SD television.
Hagbard23
16th September 2010, 12:13
Well if we are going to throw insults I'm going to say you are rather clueless about PAR related to SD television.
Yeah - this is an insult as a matter of fact - and in contrary to myself, you are rather clueless of how you would reason this or your other ("Nonsense" "Nonsense" "Nonsense") Insults.
In Fact you disrespect other opinions without having constructive reasons. You only tell something about Pink Elephants - and this tells me a lot of your way of thinking.
Sorry - i was nice to everybody - its not me who is throwing insults.
You have absolutely no clue about QM's - i mean i am not a "Pro" but i know a littlebit of what i am talking about and i described, what i know about this.
Sorry for being offtopic - @mod: delete it, if you think it is absolute wrong in this thread - i would understand this.
Guest
16th September 2010, 12:31
Be nice to each other... Ditto. And stay on topic!
2Bdecided
16th September 2010, 14:11
Oh...... and it's a great method for fixing the DVDs which were sadly encoded using the UTI resize method. I've always suspected that 9 times out of ten at least, DVDs don't use the UTI resize method. Now, after having converted quite a few BluRay videos to standard definition and comparing them to my non-UTI DVD encodes, I'm certain of it.Do you mean ITU instead of UTI?
If so, I agree - lots of professional equipment seems to ignore ITU standard (i.e. that approximately 704 = width of defined aspect ratio), and assumes 720 = width of defined aspect ratio instead.
All DVD SD video is anamorphic. If you upscale to square pixels, it's inefficient; if you downscale to square pixels, you lose resolution. If you encode anamorphic maybe something somewhere will get confused.
Do you know, there's a fairly common decoder chip with gets confused with 1:1 PAR MPEG-2? MPEG-2 lets you flag DARs of 16x9 or 4x3, or 1:1. Most people implement this as 1:1 being the PAR (i.e. square pixel), but this decoder chip thinks that 1:1 is the DAR - any square pixel content (whether it's a 4x3 image, 16x9 image, or whatever) gets displayed as a square(!!!) in the middle of the screen!
Now, you'd think that all the MPEG-2 stuff would have had all the bugs worked out by now, wouldn't you?!
So you never know what will happen. You just have to encode for what you know works now, try to avoid any decisions you might regret, and hope that the shiny new HDTV you buy next year likes all your files!
Cheers,
David.
GodofaGap
16th September 2010, 14:39
In Fact you disrespect other opinions without having constructive reasons. You only tell something about Pink Elephants - and this tells me a lot of your way of thinking.
It is not always possible to bring up constructive reasons for something that simply is not true. Since there are few topics so purposely discussed to death as CQMs for XviD on this forum, I'm sure it wouldn't be too hard for you to come up with a statement that says that one is designed only for 1:1, accompanied with an explanation why.
That is why I made the pink elephant comparison. If you are going to claim there are pink elephants in my backyard, don't expect me to put up a webcam there and live stream it over the internet. I'm just going say you are talking nonsense.
You have absolutely no clue about QM's - i mean i am not a "Pro" but i know a littlebit of what i am talking about and i described, what i know about this.
If you can say of what you described actually related to PAR, we could have a discussion. I've done this whole CQM thing 5 or so years ago. Trust me, it leads nowhere.
mpucoder
16th September 2010, 16:06
lots of professional equipment seems to ignore ITU standard (i.e. that approximately 704 = width of defined aspect ratio), and assumes 720 = width of defined aspect ratio instead.
That is true for PAL, for NTSC the active area is approximately 711x486
Most people implement this as 1:1 being the PAR (i.e. square pixel)
And they are correct, the value of 1 in MPEG-2 aspect_ratio_information means "SAR 1,0 (Square Sample)" (ISO/IEC 13818-2 table 6-3)
SeeMoreDigital
16th September 2010, 20:42
... lots of professional equipment seems to ignore ITU standard (i.e. that approximately 704 = width of defined aspect ratio), and assumes 720 = width of defined aspect ratio instead.
Indeed...
When I first mentioned this (years ago), loads of people argued against me :eek:
Sharc
16th September 2010, 21:36
Surprisingly, my SONY (promotors of the blu-ray standard) BD player does not correctly stretch the standardized 16:11 SAR of 720x576 -- or (704+16 borders) x576 -- encoded material, but plays it slightly distorted as 64:45 ....
Motenai Yoda
16th September 2010, 23:19
Surprisingly, my SONY (promotors of the blu-ray standard) BD player does not correctly stretch the standardized 16:11 SAR of 720x576 -- or (704+16 borders) x576 -- encoded material, but plays it slightly distorted as 64:45 ....
64:45 is precise, the no-itu sar or par to reduce (or extend) the active image to 16/9.
(720/576)/(16/9) = (576/9) / (720/16) = 64/45
also for many years dvd can be processed without following the itu's standards, so most dvds should be played and resampled with the generics sar/par. (2.5% of ar error isn't notable for the most).
2Bdecided
17th September 2010, 11:45
When I first mentioned this (years ago), loads of people argued against me :eek:Well, it's still wrong - and it's still impossible to play it back properly (i.e. without 2% error) on standard analogue TVs and DVD players alongside properly (ITU) sampled footage without messing with the TV's geometry for each source.
But you were certainly right to say that it's common practice.
Cheers,
David.
SeeMoreDigital
17th September 2010, 22:01
Well, it's still wrong - and it's still impossible to play it back properly (i.e. without 2% error) on standard analogue TVs and DVD players alongside properly (ITU) sampled footage without messing with the TV's geometry for each source.Not necessarily...
When I first mentioned the issue we did not have many "square pixel" sources to compare (non-square) "anamorphic DVD" pixel sources to... but now we do!
Indeed, you can now buy Blu-ray disc movies which come pre-packaged with their (lower def) DVD equivalents... Just compare the two disc's and you'll see the anamorphic DVD image does not follow the ITU spec!
Sharc
18th September 2010, 08:58
Not necessarily...
.....Indeed, you can now buy Blu-ray disc movies which come pre-packaged with their (lower def) DVD equivalents... Just compare the two disc's and you'll see the anamorphic DVD image does not follow the ITU spec!
In this case, the practice deviates again from the standard, because blu-ray specifies a sar of 16:11 (mpeg4 approximation of the ITU 512:351) for 720x576 16:9 PAL material.
Ghitulescu
18th September 2010, 10:17
Indeed, you can now buy Blu-ray disc movies which come pre-packaged with their (lower def) DVD equivalents... Just compare the two disc's and you'll see the anamorphic DVD image does not follow the ITU spec!
How to compare?
To explain a bit: we have a DVD that has 720x576 (480) pixels. These have to be output in PAL/NTSC form, which is not pixels but frequency (each chip has its own way of fitting the pixels into a frequency curve). Then the PAL/NTSC signal is separated into Y and C, each follows its own processing path until they reach the RGB electron guns. The deflection takes care of placing the image on the screen (overscan). The amplitude is set in factory, but can be modified by user (old) or serviceman (new).
So in the end there's no many possibility for the average Joe to spot the subtle difference.
The digital way is also occult. For analog signals there always be an overscan, how it places the visible image on screen still depends on the chip[maker].
IMHO, there's too much trouble for something that is beyond our control and it's not really important. Should have been important, I'm sure the industry would have done something by now.
yetanotherid
19th September 2010, 02:42
Do you mean ITU instead of UTI?
LOL! Yes I did. What did I say........? :-)
I found one last night..... encoded the BluRay of Amadeus, The Director's Cut to standard definition XviD/AVI and compared it with my old DVD encode. No doubt about it, that DVD used the ITU resize method and I missed it, but I'm still finding nine times out of ten they don't.
It's always amazes me when I see video encoded using the ITU resize method, and then obviously encoded using a GUI which happily resizes to the nearest mod16 after cropping, how between the two of them the video is obviously squished down... or stretched width-ways.... yet the person who encoded the DVD was apparently oblivious to it.
I still don't understand why AutoGK is the only XviD/DivX encoder which can intelligently resize and crop a video. Until I learn more about using AVISynth I've at least managed to modify some of AutoGKs scripts to run with MeGUI so it'll resize and crop a video without distorting the aspect ratio (non-anamporhic x264 encoding).
Sharc
19th September 2010, 10:24
LOL! Yes I did. What did I say........? :-)
....I still don't understand why AutoGK is the only XviD/DivX encoder which can intelligently resize and crop a video.....
What about StaxRip, HDConvertToX ....
stax76
19th September 2010, 12:18
I still don't understand why AutoGK is the only XviD/DivX encoder which can intelligently resize and crop a video
You can try StaxRip's resize and crop features:
http://thumbnails23.imagebam.com/9836/1d2c4198356290.jpg (http://www.imagebam.com/image/1d2c4198356290)
Trouble is, many GUIs won't let you do it or at best you might have to calculate the up-sized dimensions yourself
In StaxRip by default the resize slider has the maximum width of the source file as range but there is option to define the range, I've never tried to upscale but feature request and improvements can always be discussed.
http://thumbnails23.imagebam.com/9836/1d2c4198356290.jpg (http://www.imagebam.com/image/1d2c4198356290)
yetanotherid
19th September 2010, 13:44
To be honest StaxRip did my head in when I tried it a while back. It's probably just me but it's options didn't seem all that intuitive and I didn't have the motivation to mess around too much at the time. Last time I tried it I discovered the x264 preset or template I was trying to use seemed to include an automatic cropping of 8 pixels from each side of the video and I didn't understand why....
I can't say it's not a good program as I haven't given it the time to learn it properly, but I will admit I did give it a spin a year or two ago and I seem to remember the older version being more user friendly.... at least for someone new to the program.
Both HDConvertToX and StaxRip do have a useful function which displays the aspect ratio error, so using them it is possible to do what AutoGK does automatically but it can involve a bit of messing around trying different cropping and resizing till you get it right.
What AutoGK does is crop the video as necessary then resizes it to the set width.... sort of.... the way I remember it AutoGK resizes to the height required in order to achieve at least the specified width. Then it crops the sides a little more if necessary to give the exact width.
For example you might set the width to 720. The closest mod16 height might be 304. However without distorting the aspect ratio that might give you a resolution of (for example) 728x304. So AutoGK chops another 4 pixels off each side where you won't notice them gone anyway, the top and bottom haven't been cropped unnecessarily and the aspect ratio is the same as the original.
No other GUI I've ever used does it this way. Is there a way to get Staxrip to do something similar? All other GUIs I've tried either over-crop to achieve mod16 or they resize the video to the nearest mod16 dimensions after cropping, often distorting the aspect ratio to some degree. Personally I think the way AutoGK does it is more clever.
AutoGK also has a 4:3 option which once again intelligently crops a video to give a 4:3 display aspect ratio. No more 4:3 video that's not quite 4:3 so doesn't quite fill a 4:3 monitor properly. I really miss that function.
Of course all the above involves square pixel encoding, not anamorphic. I'm yet to ponder whether it's necessary for anamorphic encoding.... although thinking about it.... if I crop a DVD to a non-mod16 height I guess I'd expect a GUI to resize it up to the next mod16 height and then set the pixel aspect ratio so the resulting display aspect ratio isn't a distorted version of the original.... rather than just over-crop or resize to the nearest mod16.
I'll confess I've not done enough anamorphic encoding of that nature to see if many conversion programs work as I'd expect them to, but if it's not that simple I'd be curious to know why it can't be. The majority of anamorphic encodes I've done I just cropped to mod16 dimensions so I didn't have to think about aspect ratio distortions.
stax76
19th September 2010, 14:08
There are guides and screencasts in the Help menu explaining the basics. I've great doubts using resize filters for non HD sources unless you target some device.
yetanotherid
19th September 2010, 14:30
I've great doubts using resize filters for non HD sources unless you target some device.
I'm probably being dumb, but I'm not sure what you mean there.
stax76
19th September 2010, 14:53
I mean that you probably could do well without any resizing.
yetanotherid
20th September 2010, 08:03
I mean that you probably could do well without any resizing.
But if you crop to a non-mod16 resolution isn't resizing inevitable, even if it's just resizing to the nearest mod16 resolution and living with any aspect ratio error? And even if you're converting a non-HD source such as a DVD, unless you're doing an anamorphic recode isn't it impossible to avoid resizing?
I'm not trying to give anyone a hard time here.... just on the off-chance it appears that way.... I have the utmost respect for anyone producing any software, especially for free.... I'm just trying to learn more as I go.
To be honest, until I switched to x264 I wouldn't use any other program except AutoGK. I tried quite a few others but dispute it's age and the fact that some features could be added/altered to make it even better, AutoGK has always been my benchmark because it makes it very hard to get things such as aspect ratio wrong.... in fact it virtually won't let you... and it's so easy to use. I just wish it supported x264.
Even as recently as a few weeks ago I converted the BluRay of "Prince Of Persia, The Sands Of Time" to standard definition. I was messing about with some other programs at the same time so I also converted it to the same 720xsomething resolution using MeGUI and HDConvertToX. When comparing the results it was obvious the MeGUI and HDConvertToX x264 encodes encodes looked virtually identical, but the AutoGK XviD encode looked noticeably sharper than both of them. No matter what I tried in respect to changing resize methods or adding and removing filters I couldn't get either of the other programs to match the AutoGK output for quality. I've still no idea why, although I'd be keen to work it out.
Anyway.... I'll definitely be spending more time with StaxRip soon to see if we can become friends.
GodofaGap
20th September 2010, 08:46
But if you crop to a non-mod16 resolution isn't resizing inevitable, even if it's just resizing to the nearest mod16 resolution and living with any aspect ratio error? And even if you're converting a non-HD source such as a DVD, unless you're doing an anamorphic recode isn't it impossible to avoid resizing?
If you want mod16 resolutions you could under or overcrop, or not do anything and hope the codec will handle it (I think most will at least do mod4 or even mod2).
The method you described cropping height->resizing->cropping width is really one of the last things I'd recommend, but it's a possibility too.
2Bdecided
20th September 2010, 12:02
How to compare?
To explain a bit: we have a DVD that has 720x576 (480) pixels. These have to be output in PAL/NTSC form, which is not pixels but frequency (each chip has its own way of fitting the pixels into a frequency curve). ...They're almost all using a multiple of 13.5MHz (actually, 27MHz) for their pixel clock at the DAC.
Some have registers to adjust what happens to the pixels of 720 which fall outside the ITU/SMPTE active video range. e.g. send them through, hard crop them, or gently window them. Window is usually suggested default (where available).
Unless you call the compositor or graphics core and intentionally scale it, I've never seen one that takes a 720 pixel image and scales it down into 704 or 711 or whatever.
So the location of those 720 pixels (or at least the centre 704ish of them) is pretty standard. Filtering / oversampling / waveform shaping outside the SD video bandwidth is kind of irrelevant - you're never going to see the difference (unless the display is really strange - good ones gently band limit the incoming signals to remove out-of-band noise).
Cheers,
David.
yetanotherid
21st September 2010, 03:14
If you want mod16 resolutions you could under or overcrop, or not do anything and hope the codec will handle it (I think most will at least do mod4 or even mod2).
The method you described cropping height->resizing->cropping width is really one of the last things I'd recommend, but it's a possibility too.
I generally do overcrop to obtain a mod16 resolution with anamorphic encodes, but for square pixel DVD encodes I'm generally using AutoGK and it resizes as I described.
Given that when encoding a DVD to standard definition using square pixels there's no option but to resize it's anamorphic pixels if you want to keep the aspect ratio correct, why isn't it good to resize to a mod16 height while you're at it and then crop the width if necessary? Here's my logic....
You take an anamorphic DVD and reduce the height of the anamorphic pixels to make them square so instead of the video's display dimensions being something like 1280x544 it's now 704x300 (just making up an example). So there you have yourself an aspect ratio distortion as the mod16 output resolution will probably be 704x304. While you were resizing those anamorphic pixels anyway, where's the harm in resizing them to 712x304 and then cropping 4 pixels off each side before you encode?
In the above example the alternative would be to live with the aspect ratio distortion resulting from having to resize to 704x304 instead of 704x300, or to crop a noticeable amount off the height before resizing to give yourself a 704x288 output, assuming you're wanting to do the math every time or the GUI you're using is clever enough to do it for you. Most of them don't, they just distort the aspect ratio to fit the closest mod16 resolution and even if technically overcropping gives you a perfect anamorphic to square, pixel for pixel encode it'd have to give you a noticeably sharper resized image before I'd prefer it to the AutoGK method. Does it, because I don't think I've ever noticed it does?
Of course the above assumes the width wasn't cropped and the original 1280 anamorphic DVD width resized nicely down to 704 after making it's pixels square, but what if you had to crop a few from the sides and your output is now 698x300? You either:
1. Resize to 704x304 and live with any aspect ratio distortion.
2. Go for the perfect pixel for pixel encode and keep hacking pixels off until until you're at something like 688x288, or depending how much needed to be cropped from the width in the first place, even 688x272, using of course a GUI which will do it for you (I don't think I've used one) or a GUI which will at least let you know how much of a mess you're making of the aspect ratio while you tear your hair out trying to crop till you get it right, or
3. Use a program like AutoGK which will automatically resize the whole thing up to 708x304 and then just crop a couple more pixels off each side.
Option 3 sounds good to me.
Of course all the above really only applies to XviD/DivX square pixel encodes where you're pretty much limited to mod16 dimensions by most GUIs. For x264 encodes non-mod16 and/or anamorphic encodes may be a better solution but while they play fine on my PC how do hardware devices cope? Do non-mod16 dimensions use more CPU power while decoding the video and will non-mod16 or anamorphic video play on all hardware devices?
GodofaGap
21st September 2010, 08:11
Given that when encoding a DVD to standard definition using square pixels there's no option but to resize it's anamorphic pixels if you want to keep the aspect ratio correct, why isn't it good to resize to a mod16 height while you're at it and then crop the width if necessary?
I'm not saying its not "good", it's just not my first choice. Tolerating a small AR error can be acceptable to someone as well. I just don't like over cropping so I'd rather prefer keeping a small black bar or a non-mod16 resolution.
The rest of your story is a little bit of a mystery to me. DVDs are either 720x576 for PAL or 720x480 for NTSC. There are no 1280 width anamorphic DVDs.
Maccara
21st September 2010, 08:37
Of course all the above really only applies to XviD/DivX square pixel encodes where you're pretty much limited to mod16 dimensions by most GUIs. For x264 encodes non-mod16 and/or anamorphic encodes may be a better solution but while they play fine on my PC how do hardware devices cope? Do non-mod16 dimensions use more CPU power while decoding the video and will non-mod16 or anamorphic video play on all hardware devices?
Yes, hw devices cope, or they are broken. Have you noticed, 1080p is not mod16?
(yes, I know 1080/1088 and how it's handled in x264 / h.264, but this does not concern the user)
yetanotherid
21st September 2010, 13:20
I'm not saying its not "good", it's just not my first choice. Tolerating a small AR error can be acceptable to someone as well. I just don't like over cropping so I'd rather prefer keeping a small black bar or a non-mod16 resolution.
"The last thing you'd recommend" has much stronger "not good" implications than "just not my first choice" though.
Those small black bars when under-cropping annoy me so much I'd prefer to live with some aspect ratio distortion if that were the only other option.
The rest of your story is a little bit of a mystery to me. DVDs are either 720x576 for PAL or 720x480 for NTSC. There are no 1280 width anamorphic DVDs.
Sorry, I thought what I was referring to was obvious.
DVD and media players have two choices when displaying those anamorphic pixels. When connected to a HD display they should expand them back to their intended non-square size and then the whole image is upsized to fit the display. When connected to a SD display (CRT TV) they effectively do the opposite to keep the intended aspect ratio.
The non-ITU aspect ratio for a 16:9 PAL DVD is 1.42222. So the way I understand it this means when resizing the DVD using the first (upsize) method, each horizontal DVD pixel is equivalent to 1.422222 square pixels in width. In square pixel terms, this gives the 16:9 PAL DVD an effective display resolution of 1024x576. Okay... not the 1280 width I referred to previously but I was making it up as I went and all the same resizing theory still applies.
When playing the same video on a standard definition display it can't stretch the width of the video to restore aspect ratio so it has to reduce the height. That might leave the SD monitor displaying the video at it's 720 pixel width but at a height of 404 pixels.
What I'm referring to can easily be demonstrated on a PC. Open a DVD video using a media player, then open a 720x? square pixel AVI and compare the amount of screen real estate they use. They're both 720 pixels wide, but the DVD video's width will be noticeably larger on the monitor. Or it should be.
When you convert an anamorphic DVD to AVI it's usual to use the downsize resizing method, so your 720x576 vob file becomes a 720x400 avi.
(most people resize down after cropping because a width of 704 rather than 720 will usually give you an equivalent mod16 height which requires less over-cropping, tiny black bars or aspect ratio distortion.)
So all that takes me back to my question as to why you wouldn't recommend resizing the AutoGK way. It seems to me, given all the resizing going on anyway as anamorphic pixels are reduced to square ones, the width is cropped and then resized up to 720 again.... or down to 704..... your encode isn't going to be of any better quality than mine. Sure, I prefer to lose a few pixels off the sides so I can resize to a mod16 height which doesn't require any black bars or over-cropping to keep the aspect ratio intact, while you prefer to keep the side pixels and have those black bars which drive me nuts..... but that aside.... is the different resizing going to cause the quality of our encodes to differ in a way which causes you to not recommend my preferred method?
I still think it's by far the better way to do it.
yetanotherid
21st September 2010, 13:28
Yes, hw devices cope, or they are broken. Have you noticed, 1080p is not mod16?
Yeah I have but while I've not done many (or maybe any) 1080p encodes myself, some of the ones I've seen have either been 1088p with four rows of incredibly annoying pixels top and bottom, or cropped down to the appropriate mod16 height.
I have wondered about the 1080p resolution, but never thought to ask about it until now. So are 1080p BlueRay discs really 1080p or do they tend to be a close mod16? And why is 1080p used rather than 1088p etc? Now you've bought it up, I have to know... :(
Damn you!! :)
GodofaGap
21st September 2010, 13:59
"The last thing you'd recommend" has much stronger "not good" implications than "just not my first choice" though.
Those small black bars when under-cropping annoy me so much I'd prefer to live with some aspect ratio distortion if that were the only other option.
?
You are going to see black bars anyway unless you are encoding letterboxed 4:3 for a 16:9 display. If the movie is 2.35:1 there are going to black bars on your display whether you like it or not. As long as there is nothing wrong with your monitor calibration black is going to be black.
Sorry, I thought what I was referring to was obvious.
DVD and media players have two choices when displaying those anamorphic pixels. When connected to a HD display they should expand them back to their intended non-square size and then the whole image is upsized to fit the display. When connected to a SD display (CRT TV) they effectively do the opposite to keep the intended aspect ratio.
A TV doesn't really need to resize an anamorphic image. The image is that way because that's how TVs work in the first place! :)
As for your question, I don't like to crop the actual image if it can be avoided.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.