Log in

View Full Version : Anamorphic or not Anamorphic


Pages : [1] 2

PuzZLeR
6th May 2007, 00:37
What are the true advantages of going anamorphic? This is new to me since I used to encode in DivX where it wasn't supported (due to AVI's square pixel assumption).

For example, if you have content that is MPEG-2, 4:3, 720x480, two possible encoding choices are:

a) Encode at 640x480 with PAR 1:1.

b) Encode anamorphic and produce 720x480 with PAR 8:9.

Neither is distorted. Both seem to look similar in quality. However b) has about 12%-13% more pixels and needs 12%-13% more bitrate as well for the same quality.

Encoding with a) has better compatibility with QT and iPods, but that's not really my long-term interest for archiving video.

However b) seems more "natural" to the source. As well, BD/HD-DvD support 720x480 AVC if I want to better "future-proof" my clips. Is the extra bitrate/file size worth it?

I am clueless which I should use. Am I missing something?

Thanks in advance!

[P]ako
6th May 2007, 03:02
If I were you, I would encode them at 848x480. As for your question about whether the extra bitrate/file size is worth, my answer is yes, quality comes to a price: larger files.

PuzZLeR
6th May 2007, 04:17
Hi, thanks for the reply.

Yes, bigger screen, more pixels, better quality, bigger file.

But why 848 width from a 720 width source? What benefit would that serve?

[P]ako
6th May 2007, 04:37
Oops, sorry, I missed the fact you are working with 4:3 material. I gather your source is fullscreen, since your are encoding at 640x480. If so, I would be encoding at 720x544. Why? First, it is mod16, second, when you go 640x480 you are losing "data". When the AR is supposed to be 4:3, the DVD player keeps the horizontal and changes the vertical to 540. So, if you go from 720 to 640 horizontal, you really are discarding data.

galaxy001
6th May 2007, 09:30
When you play the video at fullscreen, usually, it will be upsampled to 1024x768, no matter whether it is Anamorphic or not Anamorphic.
So, if there is always a upsample , I don't think 848x480 will be better than 720x480.
I know Lacus3 is better that what the directshow filter done, but you will always use directshow filter to get a fullscreen size. Can the benefit be kept during the 848-to-1024 upsampling ?

Awatef
6th May 2007, 12:25
@ puzz
We're talking here about very little difference of only 10% (I think you probably have to crop to 704 anyway). It shouldn't make a noticeable difference in quality using the same bitrate.
Since we're using x264 here, I'll go for anamorphic, unless the bitrate is very limited (less than 1 mbit/s), in which case I would even think about going even lower than 640x480!

PS: IMHO, upsizing is not an option, the offline resizers may be of better quality, but you will have to target a resolution one way or another, and you'll definitely bump up on a screen with a different resolution, so better don't go beyond the original resolution.

bond
6th May 2007, 15:47
if i were to use anamorphic i would not resize the source at all, but only crop the black bars to a mod 16 resolution

that is, if your cpu is able to decode such a stream in realtime of course

PuzZLeR
6th May 2007, 20:20
Thanks for the insight!

I'm now leaning more towards anamorphic. As of this writing, we are just at the time of the release of the first TB drives, so the extra 12% shouldn't make a big difference.

However, lots was mentioned about cropping, black bars, sizing, etc.

What kind of apps do this?

What I'd really like to know is of apps which can change a clip from square pixels to anamorphic or vice versa, whichever is possible (not talking playback, talking about actually changing the DAR/PAR/etc.).

If there's one that does it without re-encoding (with a batch feature as a bonus) that would be grand.

Thanks again for the input.

legoman666
6th May 2007, 21:40
VLC can change the cropping and aspect ratio during playback very easily. It's nice for sources whose aspect ratio is wrong or have hard coded black bars.

PuzZLeR
7th May 2007, 01:02
Yes, I'm sure no matter how "wrong" a resolution, or PAR can be, some decoders can "fix" it with certain settings.

However, is there a way to do this to the actual video itself before playback?

For example is there any way to change a 640x480 PAR 1:1 to 720x480 PAR 8:9, or vice versa without re-encoding? Sure there may be lossiness if such an app exists that does that, but certainly not as much as re-encoding.

The reason I ask is that I currently have some older clips from years ago, with "bad settings" that I want to change without having to rely on a decoder setting or having to re-encode them again.

Actually, my initial reason for this thread was to "future-proof" my vidz as best as possible, but wasn't the case a few years ago when I chose some wrong options.

akupenguin
7th May 2007, 01:41
is there any way to change a 640x480 PAR 1:1 to 720x480 PAR 8:9, or vice versa without re-encoding?
To rephrase that question, "is there any way to re-encode a video without re-encoding?". That makes no more sense than other questions such as "can I change the bitrate without re-encoding", or "can I scale/filter/etc without re-encoding".

Anyway, how is PAR a "decoder setting"? It's part of the video stream. Sure, there are a few decoders out there that ignore PAR, but that just means they're not correctly decoding the video.

PuzZLeR
7th May 2007, 06:16
Is there any way I can improve the quality of a VCD clip to HD level without re-encoding?

Just kidding....

Thanks for your answer akupenguin. I knew it was a long-shot anyhow but I threw it out there "just in case". I figured there may be a way to mux it into another format, but it's probably silly thinking anyhow.

...still leaning towards anamorphic if anybody's got other opinions on it...

Awatef
7th May 2007, 12:23
@ puzz
About your older encodings with bad settings: you can re-pack your old AVI files in MKV using mkvmerge, which enables you to force a specific aspect ratio. This is especially useful if you -for example- ripped a 16:9 DVD in 720x480. Here you specify 16:9 in mkvmerge and you're done ;)

SpAwN_gUy
8th May 2007, 08:27
I'm sorry to bother,.. but... i'm also confused...
for like 3 years i'm making scripts with GKnot (and i do love it.. i think..).
and i'm kinda confused with anamorphic encodings..
okay, what do i have now..
if i encode anamorphic, so Video should be less or equal then the original vidoe on the DVD.. (720x480 for 16:9(i have now..) and.. the same for 4:3).. so then.. i should crop blackbars and mod16 to encode,... right?
and for non anamorphic:
GKnot suggests (for 16:9) something near 720x400 and for 4:3 - 720x544... (or less then 100% of original video size)..

but WHY [P]ako suggests 848x480 for 16:9 and 720x544 for 4:3(just found that it is the same with GKnot.. hehe)..

so my question is WHY 848???? for non anamorphic?

and why when encoded anamorphic with video size 704x480 MPC plays me 853x480 ?? .... should i be encoding non anamorphic at that resolution?

foxyshadis
8th May 2007, 09:09
Because he's suggesting a pure upsize-only method, in order to eliminate any possible loss of detail and also compensate for typical bilinear resizing on playback. The cost of this is that if you provide the same bitrate that would look great at a lower resolution, you end up with significantly worse artifacts than a small loss of detail, so you need to create a much larger video. It helps to do a compressibility check to determine how much upsizing instead of downsizing or some mix will cost you.

On playback, 853x480 is just a size made with the default method of expanding the horizontal. There's only ever one resize from source->screen, you shouldn't worry about double-resizing in fullscreen.

[P]ako
8th May 2007, 17:50
Because 848 is mod16.

PuzZLeR
9th May 2007, 04:55
Sorry to picky, but the expression for a number x "is mod 16" is as wrong as saying "5 is plus 1 and 6" for "5+1=6".

The correct expression is "x mod 16 = 0", meaning the remainder is 0 when you divide x by 16.

Ok, smarta$$ time is over.

I have since figured out how to change the PAR within an .mkv (with MKVMerge->Format specific options) and also an .mp4 (with mp4box command line). Thanks to the posts, some muxing and more mathematics, I have "un-wronged" my previous older clips without re-encoding. They now play great!

BTW - I have two questions.

Is there any way I can put a 640x480 clip within an "all-black" 720x480 clip, such as on a black canvas, with the result being a clip within the black bars at the sides? Or can I mat a 640x480 clip with adding black bars each side? (I can then play with the PAR value to adjust if necessary.)

As well, I'd love to know people's opinion on this. Do you think that when the AVC stand-alones come out sometime, will they support anamorphic clips? I think they should, and the only reason it wasn't supported with DivX was because of the AVI container, but it still makes me wonder.

[P]ako
9th May 2007, 05:58
Why would you want to have the black bars back? They are a waste of bitrate.

PuzZLeR
9th May 2007, 07:27
Mostly just curious how this is done.

I do make DvDs out of some of my AVC 640x480 stuff for certain occasions and sometimes the clip doesn't fit the way I like it on-screen and I just want to try black bars to see if that will improve the situation.

Yes it would be a waste of bitrate with the clips on their own, but when burning on a DvD(RW), it doesn't really matter when you sometimes have extra room on the disc that would have been empty otherwise after finalizing it.

Maybe it's my software instead or even the player itself.

Dr.Khron
9th May 2007, 12:10
I think we need a sticky on this... Maybe not in this specific forum, but cropping/resizeing is a topic that lots of people have difficulty with.

And some of it is open to debate too.

[P]ako
9th May 2007, 15:59
@PuzZLeR. Avisynth has an internal filter to add borders:

http://avisynth.org/mediawiki/AddBorders

PuzZLeR
9th May 2007, 17:30
I think we need a sticky on this... Maybe not in this specific forum, but cropping/resizeing is a topic that lots of people have difficulty with.

And some of it is open to debate too.

Agreed.

I find even the most experienced digital video enthusiasts and video encoders have trouble with this concept.

Awatef
10th May 2007, 11:41
Experienced encoders don't have any difficulty with this. This is basic math! Doom9 has guides on this anyway.

Kuukunen
10th May 2007, 13:22
One thing that has been sort of bothering me is the term "anamorphic". When talking about anamorphic video I've understood it usually (always?) means when you have widescreen material scaled as 4:3. In the case of DVD, when you you watch it, the TV/whatever will scale it to 16:9, or if the TV can't do it, the DVD-player will drop the scanlines (and add letterbox?) to get the right aspect ratio.

I understand the word "anamorphic" means "pertaining to a kind of distorting optical system", so referring to non-square (rectangular?) pixels as anamorphic would be ok in theory, but whenever I've seen the term used when talking about video, it's used in a sense I described earlier. Neither PAL nor NTSC has PAR of 1:1, but I can't say I remember ever seeing the word "anamorphic" having been used to describe them.

Or am I wrong?
Sorry to picky, but the expression for a number x "is mod 16" is as wrong as saying "5 is plus 1 and 6" for "5+1=6".

The correct expression is "x mod 16 = 0", meaning the remainder is 0 when you divide x by 16.
Woo, more nitpicking, if you want to be a smartass, I want to be one too. When talking about mathematics, the correct way would be "x ≡ 0 (mod 16)". Or, "x is congruent to 0 modulo 16". (I hope it shows properly for you.)

In computer languages, there is usually a remainder operator, because for programming, it's often very convenient. So if you consider it as some sort of pseudocode, I guess it works, but usually people don't nitpick on pseudocode, so I assume you're talking about in the sense of theoretical mathematics.

When I read "x mod 16 = 0", of course I know what you mean. And I guess in some occasions that can be considered right mathematically too since the mathematical notation isn't all strictly defined, for example some math books have different notation. But usually they explain it beforehand. Still I'd put it under "works well enough", and normally wouldn't care, but when talking about video, "x is mod 16" works well enough too, so I thought I'd bring up this point. Naturally I could be wrong here too.

Awatef
10th May 2007, 15:27
@kuuk.
As long as we're talking DVDs, only videos w/ 16:9 AR are considered anamorphic.
But when we talk MPEG-4, everything that is not encoded in the proper AR is considered anamorphic ;)

PuzZLeR
10th May 2007, 16:50
@[P]ako
Thanks for the tip. I'm now experimenting with borders if I need to change size.

@Kuukunen:
It's really a matter of notation relative to reference. All expressions are correct: "x mod 16 = 0" and "x ≡ 0 (mod 16)" and "x is congruent to 0 modulo 16" as long as they are defined from source. You can even call it "x and 16 are mod 0 dude" if you define context beforehand as such.

I guess where I should have made my point was that "x is mod 16" was incomplete. Without the "0" it simply does not make sense theoretically (although most would know what you're talking about).

@Awatef:
I think you cleared alot of confusion in your last post. (And I thank you for your previous helpful ones too.) It was a definition thing really.

"Anamorphic" has never been used for 4:3 DvD video and it would de-rail me when I would notice this in MPEG-4 4:3 video. Huh?

If I understood correctly, "anamorphic" defines a form of resizing to "fit" by changing the horizontal dimension of pixels. With DvD video, it was the 16:9 videos that would need to "resize" in some way. However, with the square pixel assumption of computers/monitors, both 4:3 and 16:9 would have to "resize" to be a certain "fit" when it comes to MPEG-4, which is by nature, native to computers, not television, where pixels need to be more rectangular.

Ok, I think I'm on my way. But this is my real problem, and my reason for starting this thread.

PC assumes square pixels. You have to tell it in advance with a PAR ratio otherwise it will distort it, and some playback apps still may even have problems with rectangular pixels in playback and converting. Television playback needs rectangular pixels in video playback, even with BD/HD-DvD coming out, unless some hardware/software compensates in some way for it.

I'm assuming that AVC will make the trek to stand-alones via disc/hard-drive/network/etc very soon. I want my video to be playable on BOTH in the long-run, as I assume do most in this forum.

I really would like to go anamorphic for 4:3 MPEG-4 encoded video because you do retain more of the original without as much data loss. The extra 12% bitrate/file size is worth it.

However, when televison playback will happen in the future, will these stand-alone devices be playing it with the assumption that "this is PC content" and play it with square pixels or will they consider the PAR that has been implemented in advance and play it "as is"?

Ok, no one knows the answer to that question, and it may be specific to a certain model, however the last thing I want to do is encode a bunch of video in anamorphic and the playback devices assume it's "PC material" when migrating to television and my videos look "fatter" than should.

It's not like you can encode at one resolution and just change the PAR any time you need to. (Is there a "one-deal-fits-all"?)

I miss DivX where it was so easy. No anamorphic was supported since AVI was built for PCs and assumed square pixels. All you had to do was just encode a 720x480 NTSC MPEG-2 clip to 640x480, give it the appropriate bitrate, and you're done.

akupenguin
10th May 2007, 17:22
It's not like you can encode at one resolution and just change the PAR any time you need to.
You can change the PAR any time you want to. But for any given resolution of a given video, only one PAR will be correct, so why would you want to change it unless you made a mistake in the original encode? And if your hypothesis is that some player would ignore PAR, why are you even asking?

I miss DivX where it was so easy. No anamorphic was supported since AVI was built for PCs and assumed square pixels. All you had to do was just encode a 720x480 NTSC MPEG-2 clip to 640x480, give it the appropriate bitrate, and you're done.
ODML AVI does support anamorphic, or you can store aspect ratio in the mpeg4 stream itself. Maybe VirtualDub and DivX didn't use those features, but mencoder and XviD do.

SicMX
10th May 2007, 17:52
In Handbrake if you choose "anamorphic" it will rip the DVD at the full 720x480 (if NTSC) and when the video is played in say Quicktime the width will be upscaled to keep the aspect ratio correct.

If e.g. the film is really widescreen i usually end up with a 1024x480 file in Quicktime. Note that file is still 720x480 but when stretched to get the aspect ratio it is 1024x480.

This is how i think it work. Not 100% certain though =)

Also if the source is letterboxed just crop those and then the hight will be less than 480pixels.

Note that when using anamporhic mode you need to have a pretty high bitrate (i use around 3000kbps with H.264) because of the high resolution.

PuzZLeR
10th May 2007, 18:15
You can change the PAR any time you want to. But for any given resolution of a given video, only one PAR will be correct, so why would you want to change it unless you made a mistake in the original encode?

Exactly. Changing the PAR within an .mp4 or .mkv container is simple, but pointless anyway unless you got the original rez wrong. This is why it's frustrating. You can't just encode in one rez, and then just change the PAR when you need to. It doesn't make sense that way. You have to make the right decision on rez from the start (or re-encode).


And if your hypothesis is that some player would ignore PAR, why are you even asking?


Well, I'm not sure exactly. I just wanted to see if anybody has any insight on this, or any reasonable logical hunch on the market and tech.


ODML AVI does support anamorphic, or you can store aspect ratio in the mpeg4 stream itself. Maybe VirtualDub and DivX didn't use those features, but mencoder and XviD do.

ODML AVI however wasn't supported universally as AVI was. The assumption was that anything playing ODML AVI plays AVI, which made the choice easy (for me at least). I believe .mp4 and .mkv are very different in this respect. They actually have this feature built in without enhancement. This would be fine and dandy but, unfortunately even so, not all playback/decoding/converting software recognizes anything other than PAR 1:1, no matter what's there. (I can name a few if you like, however some are obvious.)

Frankly, this sucks, hence reason for my dilema as to which method of encoding I should go with. Go with better, "natural" quality of anamorphic, or just "play safe" with PAR 1:1? That is IF 1:1 is safe (hello BD/HD-DvD conversion).

DivX/Xvid stand-alone players always assumed a 1:1 PAR. In other words, you will always be safe just encoding with the proper rez and assuming square pixels for your PC AND stand-alone.

I don't feel that security with H.264/.mp4/.mkv etc.

PuzZLeR
10th May 2007, 18:27
In Handbrake if you choose "anamorphic" it will rip the DVD at the full 720x480 (if NTSC) and when the video is played in say Quicktime the width will be upscaled to keep the aspect ratio correct.

Yes, I adore HandBrake, my favorite x264 GUI (but my opinion only). Actually, what the HB devs did here was provide some sort of "hack" embedded in the encoded clip to get QT to play anamorphic content.

Not sure of the tech details behind it, but QT is not playing the anamorphic video under "natural" circumstances. If you hit ^I you will notice different readings for "Format" as opposed to "Normal Size" and "Current Size".

And as far as bitrate is concerned, there really is about a 12.5% increase for same quality going from 640x480 to 720x480 anamorphic (307,200 to 345,600 pixel count).

(I'm in NTSC-land.)

nm
10th May 2007, 18:44
DivX/Xvid stand-alone players always assumed a 1:1 PAR. In other words, you will always be safe just encoding with the proper rez and assuming square pixels for your PC AND stand-alone.
I think you can apply the same logic to H.264 in whatever container: if the player doesn't support anamorphic encodes, it will certainly assume a 1:1 PAR. On the other hand, if the player can read the flags and PAR values correctly from your container of choice, it will also be able to correctly play back video with 1:1 PAR. So, you are always safe with that. Personally I wouldn't buy a standalone that doesn't do these things correctly, so I'll just happily encode with the original PAR of the source.

Awatef
10th May 2007, 22:49
@ puzz
As far as I'm concerned, I wouldn't care about player compatibility since player compatibility always means restrictions.
I would definitely go the HTPC way (you can assemble your own HD capable device starting 450$ canadian). The way I see it, this is a one time investment for 10 years to come. You won't even have to replace the DVD-ROM drive w/ a BD one, a double-layer DVD is fully sufficient for a full length movie in 1080p! (Amazing 8.8 Mbit/s for a 2h movie w/ a 448kbps DD5.1 soundtrack!)

Kuukunen
11th May 2007, 10:28
@Kuukunen:
It's really a matter of notation relative to reference. All expressions are correct: "x mod 16 = 0" and "x ≡ 0 (mod 16)" and "x is congruent to 0 modulo 16" as long as they are defined from source. You can even call it "x and 16 are mod 0 dude" if you define context beforehand as such.

I guess where I should have made my point was that "x is mod 16" was incomplete. Without the "0" it simply does not make sense theoretically (although most would know what you're talking about).
.
If you take it like that, in my opinion "x is mod16" should be considered correct too. It should be considered to be part of the jargon here as it has been used on these forums hundreds of times and everyone knows what it means. I was just saying if you take that out of the context and speak about theoretical mathematics, congruence is more correct way than the remainder operation. Oh and the two expressions I gave are the same, it's just how the mathematical notation is read.

You asked about cropping and resizing, but didn't get an answer. Avisynth does that too and a lot more. :P
@kuuk.
As long as we're talking DVDs, only videos w/ 16:9 AR are considered anamorphic.
But when we talk MPEG-4, everything that is not encoded in the proper AR is considered anamorphic ;)
Thanks for clearing stuff, so I'm sorry to be nitpicking again, but...
All I was saying I don't remember it being used in a sense other than the DVD/film sense. Especially not with NTSC or PAL broadcasts that technically ARE anamorphic. That wasn't my point though... Point was that if you have non-anamorphic (which actually IS non-square pixels) content on DVD and you re-encode it to MPEG-4 AVC of same resolution, it "suddenly" is anamorphic. But when you copy the exact same stream to a BD, again, it is not anamorphic, even though you might watch it on a computer, maybe even the same program as you'd watch the file. Again sorry, and yes, I would guess what you meant is MPEG-4 file played on computer, but this is why I thought it was kind of confusing to used the term anamorphic differently for playback from a file and playback from a disc...
@ puzz
As far as I'm concerned, I wouldn't care about player compatibility since player compatibility always means restrictions.
If you don't care about player compatibility at all, you might as well encode in something like Snow. And when they change the bitstream format, tough luck. Not to mention the whole point was to make them "future proof", so if ignoring player compatibility was an option, he wouldn't have made this thread in the first place. Puzzler didn't define what kind of future proofing it is though. Playback from computer, disc, possible future technology x? I assume possibly all.

So back to the topic. When you talk about the future, it always means predictions. My prediction, however, is that in the future non-square pixels are more and more supported. At least the way I see it, things are moving more and more in that direction. So I vote go for it.

Awatef
11th May 2007, 14:04
OK, let's put some Tabasco on this :D
I think the future is going "square" since HD resolutions are "square": 1920x1080 & 1280x720 are both perfect 16:9 ;)

Kuukunen
11th May 2007, 15:11
You're right.

I was basing my predictions on the fact the new container formats support PAR better. But on the other hand, anamorphic video in the first place was just a hack to get better quality with certain technical limitations: that it was easier to store stuff in 4:3. Now BD and HD-DVD support wide variety of resolutions, highest being square pixels, and logically it makes no sense why vertical quality should be better than horizontal.

However, that still doesn't mean the support for non-square pixels isn't going to be better in the future. (I still can't bring myself to say "anamorphic". :P)

delacroixp
10th December 2007, 01:47
anamorphic video in the first place was just a hack to get better quality with certain technical limitations: that it was easier to store stuff in 4:3.
Now BD and HD-DVD support wide variety of resolutions, highest being square pixels, and
logically it makes no sense why vertical quality should be better than horizontal.

Quite right... anamorphism was a kludge (http://searchcio.techtarget.com/sDefinition/0,,sid19_gci212446,00.html) to produce wide-angle movies on 'regular' 35mm film and it was then perpetuated when film was digitised onto DVD.

There is no intrinsic value in maintaining the anamorphic format when transcoding to MP4.
An 864x480 resolution has the same number of pixels as 720x576 (PAL 16:9), rearranged into a more natural 16:9 format.
(MKV will let you signal 864x486 for complete visual accuracy while maintaining MOD 16 all round)

Any resolution less than 864x480 (excluding cropping) will result in a loss of data and detail.


:):devil::D
Pascal

Sagekilla
10th December 2007, 04:05
Quite right... anamorphism was a kludge (http://searchcio.techtarget.com/sDefinition/0,,sid19_gci212446,00.html) to produce wide-angle movies on 'regular' 35mm film and it was then perpetuated when film was digitised onto DVD.

There is no intrinsic value in maintaining the anamorphic format when transcoding to MP4.
An 864x480 resolution has the same number of pixels as 720x576 (PAL 16:9), rearranged into a more natural 16:9 format.
(MKV will let you signal 864x486 for complete visual accuracy while maintaining MOD 16 all round)

Any resolution less than 864x480 (excluding cropping) will result in a loss of data and detail.


:):devil::D
Pascal


Whole heartedly agree, I never use anamorphic encoding and always encode using 864x480/464/368. But, even though I'm against it, I have tried and seen what anamorphic encoding has to offer and I find it very compelling that you can encode a scene at, say, 768x576 and have it stretched to 1024x576 with very minimal quality difference over native 1024x576.

Still, when it comes to the fact that I'm encoding once with the intention of keep my video as is without re-encoding, I'd rather resize to the actual resolution rather than stretch it at playback.

onesloth
10th December 2007, 08:07
If you have a 16:9 source ripped from a DVD it's originally 720x480. If you resize either of those dimensions down (ex. 720x400) you will be losing original pixels and detail, right? If you upsize (say 864x480), when encoding, you're adding pixels without adding detail, just more bitrate. If your justification for this added bitrate is the better quality of the pre-encode resize vs. the playback resizing, won't that only really be true if your video is always being played back at your upsized resolution (864x480). If you playback at a higher resolution (like 1280x720) won't you lose any benefit of your pre-encode resize when the vid is resized again during playback?

delacroixp
10th December 2007, 11:33
If you have a 16:9 source ripped from a DVD it's originally 720x480.
If you resize either of those dimensions down (ex. 720x400) you will be losing original pixels and detail, right?
If you upsize (say 864x480), when encoding, you're adding pixels without adding detail, just more bitrate.
If your justification for this added bitrate is the better quality of the pre-encode resize vs. the playback resizing, won't that
only really be true if your video is always being played back at your upsized resolution (864x480).
If you playback at a higher resolution (like 1280x720) won't you lose any benefit of your pre-encode resize when the vid is resized again during playback?
Quite right...
I live in PAL land (we're all friends) where movies are released in 720x576 @ 25 fps.
We have more detail than you guys in NTSC but you have more fps (which enhances high-motion action scenes).

NTSC:
720x480 = 345,600 pixels (Anamorphic)
768x432 = 331,776 pixels (16:9)
At 768x432 you have slightly fewer pixels than the original anamorphic setup but the numbers are both MOD 16 and also have the the correct DAR (16:9).

768x448 = 344,064 pixels is a little closer... it's MOD 16 but you'll have to signal 784x448 to attain the correct DAR (all calcs exclude cropping).


:):devil::D
Pascal

delacroixp
10th December 2007, 11:57
But, even though I'm against it, I have tried and seen what anamorphic encoding has to offer and I find it very compelling that you can encode a scene at, say, 768x576 and have it stretched to 1024x576 with very minimal quality difference over native 1024x576.

Still, when it comes to the fact that I'm encoding once with the intention of keep my video as is without re-encoding, I'd rather resize to the actual resolution rather than stretch it at playback.
"Smoke and Mirrors (http://en.wikipedia.org/wiki/Smoke_and_mirrors)"

Let's face it... you'll never watch a movie at 868x480 (unless you watch in window mode).
Your movie will always be stretched... to
1024x576 (if you're watching on a 1024x768 PC screen) or 1280x720 and even
1680x945 (if you have one of those fancy 1680x1050 wide-angle PC screens).

858x480 was always the natural viewing format (1024x576 is a poorer quality version of the same thing).
I guess that's why Sony introduced their Superbit (http://www.sonypictures.com/cthe/superbit/catalog.html) range of DVD's.


:):devil::D
Pascal


btw
Sony officially discontinues Superbit DVDs (http://www.cdfreaks.com/news/Sony-officially-discontinues-Superbit-DVDs.html)

Brother John
10th December 2007, 19:43
You could make the point, though, that the smaller resizing from 858x480 to 1024×576 might produce less artifacts than the larger resizing from 720×480 to 1024×576. There’s no denying that the first priority of on-the-fly resizing is speed rather than quality. There’s also no denying that those effects should be minimal and probably not visible at all.

In the end what it boils down to is: Can you spare the bitrate and CPU cycles? Personally I’ve never seen the point in upsizing to a square-pixel resolution.

delacroixp
11th December 2007, 12:19
You could make the point, though, that the smaller resizing from 858x480 to 1024×576 might produce less artifacts than the larger resizing from 720×480 to 1024×576.
In the end what it boils down to is: Can you spare the bitrate and CPU cycles? Personally I’ve never seen the point in upsizing to a square-pixel resolution.
Quite right... certainly people from NTSC land will struggle more than PAL to upscale their movies onto HD big-screen TV's or 720p projecters.
It's probably the No. 1 reason they've adopted HD TV and Blu-Ray so quickly... the quality (of NTSC) was atrocious.
That said, there is an increase in time and complexity to convert your cropped-anamorphic figures into a square-pixel equivalent (same no of pixels) but I should imagine that the actual encoding time should be pretty similar.

It's interesting to note that some older movies (especially more than 20 or 30 years) have been given far more pixels than they deserve (merely to fill up the 720x576 quota).
They may have been released on PAL 16:9 but you can quite happily encode them at 800x448 or less without loss-of-detail... anime and cartoons also spring to mind.

In fact, one of my favourite movies The Great Escape (1963) (http://en.wikipedia.org/wiki/The_Great_Escape) was released in "wideangle 4:3 anamorphic" with an on-DVD resolution of 720x320.
Incidently, it was released 10 years after the first anamorphic movie (http://en.wikipedia.org/wiki/The_Robe_%28film%29).


:):devil::D
Pascal

.

delacroixp
11th December 2007, 13:12
1) Make an anamorphic snapshot... MPClassic (http://www.softpedia.com/get/Multimedia/Video/Video-Players/Media-Player-Classic-for-Win2kXP.shtml) works well: (see attachment 1)


2) Crop using something like MS (http://office.microsoft.com/en-us/help/HP010017211033.aspx) Office Picture Manager (http://www.youtube.com/watch?v=4Zg2Sf9m2Jw) which allows you to crop step-wise on all sides: (see attachment 2)
A preview setup like Dr DivX (http://forum.doom9.org/showthread.php?p=969913#post969913) is gr8 since it forces you to crop MOD 2 and adjusts for MOD 16 width and height.


3) Calculate the Encode resolution: (see attachment 3)
In my case Phantom of the Opera (http://en.wikipedia.org/wiki/The_Phantom_of_the_Opera_(2004_film)).
Cropping L = 2 ; R = 4 ; Top = Bottom = 76
Cropped Image = 714x424 [302,736 pixels]

Encode resolution (MP4)
= 832 x (832/2.4017)
= 832 x 346
-> 832 x 352 (MOD 16) [292,864 pixels... as good as it gets]


4) Enter the Signalling aspect ratio: (see attachment 4)

Signalling aspect ratio (MKV)
= (716/720 x 1024) / 424
= 2.4017 or 845x352


:):devil::D
Pascal

.

Honeyko
20th January 2008, 13:45
Crop using something like MS (http://office.microsoft.com/en-us/help/HP010017211033.aspx) Office Picture Manager (http://www.youtube.com/watch?v=4Zg2Sf9m2Jw) which allows you to crop step-wise on all sides.

A tool I use is Adobe ImageReady (a quick-n-dirty photo-manipulation component of Photoshop; an older version,
such as v6, serves well for this purpose); I can zoom in until the pixels are the size of Chicklets -- telling good
and bad rows and columns is very easy at level.

Phantom of the Opera
Cropping L = 2 ; R = 4 ; Top = Bottom = 76
Cropped Image = 714x424 [302,736 pixels]

Encode resolution (MP4)
= 832 x (832/2.4017)
= 832 x 346
-> 832 x 352 (MOD 16) [292,864 pixels... as good as it gets]
While you have close to the same number of pixels with these settings, you've actually lost a fair bit of your
vertical data (424 height vs. 352 height = 83% vertical data retention.)

An anamorphic encode would retain all of the data thusly: 424 > 432 (MOD16),
714 > 720 (MOD16) ....encode 720x432 (311,040 pixels, or a 102% increase)

You could also crop two more horizontal columns and encode MOD8 712x424 and not resize any of the source pixels
at all. (Or leave the two columns in and encode 720x424; 305,280 pixels; 100.8% increase)

==//==

For those who like anamorphically encoding, the next step is to bump up cropped vertical and horizontal dimensions to
mod16 (or drop, if you're only one or two rows or columns away). After encoding, I'll either use MPEG4modifier
(xvid) or MKVmerge (x264) to anamorphically stretch the horizontal.

Here are a few screen-captures of my mainly NTSC 720x(cropped>mod16) anamorphic encodes, as widened
during play and then snapped by VLC:

Real Genius:
http://i2.photobucket.com/albums/y19/mike18xx/real_genius_crossbow_shot.png

Superman Doomsday:
http://i2.photobucket.com/albums/y19/mike18xx/SupermanDoomsday-06RainofShards.png

Becket (poor quality source restored from grainy "pink" stock):
http://www.cinema-obscura.com/mempics/honeyko/Becket1964/becket2.jpg

Paint Your Wagon:
http://i2.photobucket.com/albums/y19/mike18xx/pyw_claim.jpg

Brother John
20th January 2008, 14:34
Why are you all making your life so bloody difficult with those calculations.
1. Crop
2. Set the appropriate PAR (http://forum.doom9.org/showpost.php?p=1058927&postcount=11) in the encoder.
3. MKVMerge usually recognises the PAR automatically. With MP4Box, set the PAR again.
4. Done. No calculations necessary at all.

Atak_Snajpera
20th January 2008, 15:45
Why are you all making your life so bloody difficult with those calculations.

I also don't understand why some people like to complicate things... :)

ShadowVlican
20th January 2008, 17:29
Why are you all making your life so bloody difficult with those calculations.
1. Crop
2. Set the appropriate PAR (http://forum.doom9.org/showpost.php?p=1058927&postcount=11) in the encoder.
3. MKVMerge usually recognises the PAR automatically. With MP4Box, set the PAR again.
4. Done. No calculations necessary at all.
+1

except i take advantage of MKV's AR instead of the encoders

SeeMoreDigital
20th January 2008, 17:33
I also don't understand why some people like to complicate things... :)Because if you just "crop", you don't always arrive at a "mod-16" image size!

Meaning you have to re-size your cropped image to a mod-16 image before encoding and prior to adding PAR signalling.

Now... Although there are encoding applications that will allow you to generate MPEG-4 Part-2/Part-10 encodes at non "mod-16" sizes. Such encodes might not work correctly in all makes/models of stand-alone players!

Brother John
20th January 2008, 18:15
Meaning you have to re-size your cropped image to a mod-16 image before encoding and prior to adding PAR signalling.
You mean distort the image by reszing to the nearest mod16 and then compensate by using an individual custom PAR? Yes of course, such crazy scenarios don’t work without calculations.

It’s rather useless in a PC environment altough a good example of AR signalling’s flexibility. But if you start arguing with compatibility to “all makes/models of stand-alone players” you’d better forget non-square video completely.

SeeMoreDigital
20th January 2008, 18:28
But if you start arguing with compatibility to “all makes/models of stand-alone players” you’d better forget non-square video completely.That's a ridiculous statement.....

It's not that difficult to work out how to generate "image only" mod-16 encodes with the correct level of PAR signalling... Thus maintaining compatibility with all makes/models of stand-alone players... that support aspect ratio signalling!

Perhaps if you had a stand-alone player that handled PAR signalling detection properly, you'd understand.