Log in

View Full Version : larger resolution, more clear output?


fifth5
14th May 2009, 09:16
Hi, I'm taking a resolution and bitrate experiment to look for a balanced size and quality for my encoding solution.

First, same DVD source, same LCD monitor.
Given that I made a 656*272 sample, encoding against 600kbps video bitrate, then I did another 816*336, 650k sample.

Visually, the latter looked much more clear, more even pixels rendering, and impressive details, whereas the former was not so good as expected.

Then, I found some rippers produced good quality movies but used a large resolution and normally a video bitrate less than 800k.

Definitely, it's not correct that I have to limitlessly increase resolution to improve quality. Here I got 3 questions,
1. why did the resulting quality got improved so much when I increased the resolution, and just a little bitrate. In the case, the resolution played an important role.
2. is there any regular connection for resolution and video bitrate, how to balance these 2 parameters?
3. if, if I set the output resolution is larger than original resolution, is that ok? Do I need some additional trick?

Thanks in advance.

burfadel
14th May 2009, 09:41
Setting the output resolution as higher than the source is just wasting bits, the new pixels are artificially created from the existing pixels. Even though it might produce a slightly better image, depending on bitrate, it is almost always disadvantageous. If you so wish to have a higher resolution, use a media player that can resize the image on the fly. Again, its not really beneficial unless output to a good true HD tv, the benefit of which requires a decent quality encode.

Balancing the two perfectly when using a set bitrate is dependent on the source. Different sources will require a slightly different balance. A fast motion source would benefit, in the case of a set bitrate, a lower resolution whilst a fairly static (as in not much motion) source would benefit from using a higher bitrate. Sources with both mixed and static scenes are therefore hard to determine!

The 'standardised' resolution for DVD encodes is 640x352, or a resolution that equals around 225000 pixels. This is the balance people have found to be good for a ~42 min tv show with 128kb sound to be 350mb (and 22min shows 175mb, 85/90 min movie 700mb). This convention was for when people fit the shows on CD, such that one movie, two 40 min eps, or four 20 min eps fit on one disk. A resolution of 640x352 for 16:9 material still holds true for today.

Now, in your case its a source thats approximately 720x304, or roughly 2.35:1 (encoding wise the ratio is fractionally off). This equats to 218800 pixes. This is BELOW the standardised resolution for what people typically encode to. Keeping it at full resolution is not a bad idea, cutting down to 656x272 is cutting it down a little too much, the alternative to full resolution is to use 688x288.

Why do you want to use a bitrate of 600? is there any specific reason that you want a defined output size? What encoder are you using? if you are using x264, it may be beneficial if output size doesn't have to be defined to use CRF. You can find a CRF you prefer, such as 22, and stick to that. In that case, you can stick roughly to the 225000 pixel suggestion resolution wise, and then not worry about what bitrate to use. The quality of the output will be good in each case (compared to the source).

Using a good resizer is important though, if using avisynth Spline64 is a good choice for both increasing and descreasing resolution. A little slower than some others, but produces good results.

fifth5
14th May 2009, 12:14
Thanks.
Yes, I’m using MeGUI and X264, but 600k was just an example, didn’t make much sense.

All your suggestion was based on a number – 225000 pixels. How did people define it? Just for purpose of fitting CD size?

I wanted a discussion about the relationship of output resolution, encoding bitrate, monitor resolution, even resizer used by encoder and render.
You know, LCD resolution is generally higher than DVD’s, so I used 720x480 anamorphism as much as I can. But for a fixed output size, e.g., 700mb, or 1G, I’d like to find a way to define such a balance.

Dark Shikari
14th May 2009, 12:40
Up to a certain point, you will lose more quality from the lowpassing inherent in downscaling than you will gain from lower quantizers at the same bitrate (due to fewer pixels to code).

burfadel
14th May 2009, 13:36
Defining such a balance depends on the details and motion in the source, the length of the source, the audio and settings used, and the settings in x264 itself (ensuring you use the latest revision). There is no definitive answer to a balance that fits all. Fitting a tv show of 40 mins to 700mb is a bit of a waste of space, and a movie to 1gb should fit very very easily in most cases (even 700mb for good quality)! so full res will do for that too. If you want reasonably sized (in terms of small files) with x264, stick the the 225000 pixel suggestion.

That is a close to a balanced solution as you can get.

fifth5
15th May 2009, 02:46
Up to a certain point, you will lose more quality from the lowpassing inherent in downscaling than you will gain from lower quantizers at the same bitrate (due to fewer pixels to code).

I didn't quite follow you.
Could you pls explain it more clear?

Thanks.

Chengbin
15th May 2009, 03:15
I didn't quite follow you.
Could you pls explain it more clear?

Thanks.

At a given bitrate, a smaller resolution video will look better because it has fewer pixels to encode, and since every pixel gets more bitrate, quality goes up. But to a certain point, there will be too few pixels to render the fine detail. And below that point, you start losing quality. Remember each pixel only stores one color.

fifth5
15th May 2009, 06:15
At a given bitrate, a smaller resolution video will look better because it has fewer pixels to encode, and since every pixel gets more bitrate, quality goes up. But to a certain point, there will be too few pixels to render the fine detail. And below that point, you start losing quality. Remember each pixel only stores one color.

Not exactly.
I understood that data bits got arranged on each pixel, and that depends on what source I got, like burfadel said.

Given bitrate, lower resolution, better presentation.
Or,
a little higher bitrate, higher resolution, better presentation.

I'm afraid there might be a threshold to balance bitrate and resolution, at given output size.
But I'm even confused that if this question itself makes sense.

Did anyone make some tests?

benwaggoner
15th May 2009, 06:42
There's not some magic bits per pixel content that works for everything, no.

Probably a good starting point is to take the source without scaling (remember to flag for anamorphic), find out what bitrate works for you. and go from there.

*.mp4 guy
15th May 2009, 16:41
Generally you want to use the lowest resolution for your source that will keep the vast majority of detail. For a lot of dvds this is significantly lower then the native resolution, because the people (idiots) who authored the disc decided to lowpass it. However Reducing resolution below this point is always bad unless you are encoding at extremely low bitrates, similarly, at extremely high bitrates, its never a good idea to resize your source at all.

JohannesL
18th May 2009, 12:34
It is sometimes a good idea. Preprocessing will be more effective if you upscale first, compared to leaving in the original res, applying preprocessing and scaling to full screen upon playback.

TL0
18th May 2009, 17:45
Generally you want to use the lowest resolution for your source that will keep the vast majority of detail. For a lot of dvds this is significantly lower then the native resolution, because the people (idiots) who authored the disc decided to lowpass it. However Reducing resolution below this point is always bad unless you are encoding at extremely low bitrates

Do you have example resolutions where this is the case? 576x384? or lower?

*.mp4 guy
18th May 2009, 22:21
One of the main points of my post was that this resolution is variable, dependant on how compltely the source resolution is filled with usefull information.

burfadel
19th May 2009, 00:38
If you want a specific answer:
640x352 for 16:9

688x288 for 2.35:1

And for 4:3, either:
512x384 (most common)
528x400
560x416

In every case, using cropping.

Keep in mind even though there's roughly the same number of pixels used in each, since 4:3 has to cover more vertical resolution on the screen the quality will seem lower than 688x288. That said, for most 4:3 content many people see that resolution for encoded material as not too bad at all, and using a higher resolution to improve quality just uses significantly more bitrate. Resolution related 'quality' issues is much less annoying at 4:3 than 2.35:1!

If you do not need a definitive output size, stick with CRF. Using CBR is a bad idea, using ABR (2-pass) isn't necessarily a good thing either unless a desired output size is required. At least that way if you use reasonable settings you are pretty much guaranteed of good outputs, at least in terms of what x264 does. If you use ABR (2-pass) or CBR, especially at a 'lower' bitrate, it may look good for your test video, but then when you encode something else the quality may not meet your likes. Not only that, using CRF mode is faster for encoding (since its only one pass, and only needs to be one pass!), so if encoding speed is an issue for you thats a bonus. Plus, you can always up your settings if you haven't done so, such that you use --subme 9 and -me umh etc.

I think you'd find in the case you presented, using 650kbps with 656x272 would probably look better than 650kbps at 816x336!

That said, if you look at the suggested resolutions, 656x272 is below what I suggested for 2.35:1.

*.mp4 guy
19th May 2009, 01:24
If you want a specific answer:
640x352 for 16:9

688x288 for 2.35:1

And for 4:3, either:
512x384 (most common)
528x400
560x416

These numbers have no theoretical or empirical basis that I am aware of. Just because something is common doesnt make it correct.

[edit] I just hacked together an avisynth script and tested a 4:3 DVD that I knew was lowpassed, its actual resolution is about 544*336 (yes, it has less verticle resolution then horizontal) anyway, its fairly easy to test a few resolutions and determine where you lose the most detail, though in this case I did something a bit more complicated.

burfadel
19th May 2009, 02:21
I never said they did :) There is absolutely no correct answer to the question asked in terms of balancing resolution and bitrate. The values given are just based around the commonly used resolutions for source material. Bitrate wise, a 4:3 show is 414720 pixels for PAL and 345600 for NTSC. For 2.35:1 show, the resolution is 720x304, which is 218800 pixels. Efficiency wise, at say 600kbps, the 720x304 show would most likely look better than the 720x576 show, simply because the encoding bits available.

The 225000 pixels is just a common balanced suggestion. If you disregard that, you either encode at the original resolution or for every thing you encode run a series of tests beforehand, which is a bit tedious and impractical!

Not exactly.

Given bitrate, lower resolution, better presentation.
Or,
a little higher bitrate, higher resolution, better presentation.

I'm afraid there might be a threshold to balance bitrate and resolution, at given output size.
But I'm even confused that if this question itself makes sense.

Did anyone make some tests?

Even the bitrate/lower res, better presentatin or higher bitrate, higher resolution, better presentation is a bit of a problematic scenario.

Upscaling then compressing is not a good idea efficiency wise, the extra detail is artifical as compared to a true source of the same higher resolution which is actual recorded the extra detail in the pixels (of course depending on compression settings, encoder used, preprocessing etc, but the basics apply).

By the sounds of it, the source was probably a fairly low motion (and maybe not so complex detail wise), hence the higher resolution didn't affect the bitrate so much and the bits were put in to detail.

The other thing to consider in the resize filter used, a good filter is just as important for downscaling as it is for upscaling. The difference in quality could be related to the resize method alone!

Ghitulescu
20th May 2009, 12:25
Then, I found some rippers produced good quality movies but used a large resolution and normally a video bitrate less than 800k.

A ripper by definition does not alter the file, just transfers the information from one data support to another.

Ghitulescu
20th May 2009, 12:44
Hi, I'm taking a resolution and bitrate experiment to look for a balanced size and quality for my encoding solution.

First, same DVD source, same LCD monitor.
Given that I made a 656*272 sample, encoding against 600kbps video bitrate, then I did another 816*336, 650k sample.

Visually, the latter looked much more clear, more even pixels rendering, and impressive details, whereas the former was not so good as expected.



Now we're coming to the point.

What's the purpose of the file? You can use any resolution (pixels) you want if you watch the movie on a computer (Arhhh!).

However, if you intend to see the movie on a TV, then some requirements must be met.

The topmost one is the size of the frame in pixels. Should be 640x480 or 720x576. Then and only then no device will scale the video during displaying. A particular case with LB or 2.35:1 movies. People tend to remove the black mates, yielding strange resolutions like 623x237. It depends entirely on the player if it correctly adds back the mating (black bars) in order to achieve the original image or the "perfect" image for your TV.

Secondly is PAR : DAR pair. DAR says what ratio exists between the physical values of the image. It can be 16:9 or 4:3. PAR is something few people heard of, and it refers to the same thing but for the pixel. PAL pixels are "wide", NTSC pixels are "long", while PC screen pixels are "square".

All movies for PC have a PAR of 1:1. That's why you need 640x480 and not 720x480. And that's also the reason for VGA resolution ;). And it's also the reason why people should use 1280x576 (for PAL widescreen PAR=1) or 960x576 (PAL widescreen PAR PAL), I mean for real WS movies (anamorph).

Third is the bitrate. No matter how good an algoritm is, it cannot perform miracles. That's precisely why good movies in DivX are now 1.5 GB or more instead of 650/700 MB like they used to be. Try to use the highest bitrate possible for your project.


---===---

Nevertheless, I find it strange that people rip a DVD (which is designed for TV), compress it in a PC-specific format (AVI, DivX etc.) then watch it on a TV. Then complain about quality and how to squeeze the last bit of quality. Then spend hours and days tweaking all the settings. Nowadays, when a DVDR costs about the same as a CD.

But PC world is a masochistic one otherwise we won't use all Windows ;)!?

Comatose
20th May 2009, 12:53
One of the main points of my post was that this resolution is variable, dependant on how compltely the source resolution is filled with usefull information.
Is there a definite way to check? Other than just downsizing and comparing.

nm
20th May 2009, 13:26
The topmost one is the size of the frame in pixels. Should be 640x480 or 720x576. Then and only then no device will scale the video during displaying.
That's only true for old CRT TVs (and the NTSC resolution used in DVDs is 720x480, not 640x480). Even then anamorphic 16:9 video needs to be letterboxed (scaled vertically) by the player to fit 4:3 screens and retain the correct aspect ratio.

Modern progressive panels and projectors always scale SD inputs to their native resolution or the player does it. If resizing is done by the player and it supports all source resolutions and aspect ratios, it doesn't matter what exact resolution the video is encoded at. Standalone players that support MPEG-4 ASP also support non-standard resolutions.

All movies for PC have a PAR of 1:1. That's why you need 640x480 and not 720x480. And that's also the reason for VGA resolution ;). And it's also the reason why people should use 1280x576 (for PAL widescreen PAR=1) or 960x576 (PAL widescreen PAR PAL), I mean for real WS movies (anamorph).
What are movies for PC? There's no need to use square pixels unless you are targeting some lame application that doesn't support other aspect ratios. Most players handle any PAR just fine.

Nevertheless, I find it strange that people rip a DVD (which is designed for TV), compress it in a PC-specific format (AVI, DivX etc.) then watch it on a TV. Then complain about quality and how to squeeze the last bit of quality. Then spend hours and days tweaking all the settings. Nowadays, when a DVDR costs about the same as a CD.
I think many people are going to hard disk based backup solutions and use networked players (Popcorn Hour, PS3, Xbox 360, ...) or HTPCs for playback.

Ghitulescu
20th May 2009, 15:11
That's only true for old CRT TVs (and the NTSC resolution used in DVDs is 720x480, not 640x480). Even then anamorphic 16:9 video needs to be letterboxed (scaled vertically) by the player to fit 4:3 screens and retain the correct aspect ratio.
read all my message then post. 640x480 is needed because PAR = 1 for computer, while about 0.9 for NTSC. Because I was talking about the PC resolution.

Modern progressive panels and projectors always scale SD inputs to their native resolution or the player does it. If resizing is done by the player and it supports all source resolutions and aspect ratios, it doesn't matter what exact resolution the video is encoded at. Standalone players that support MPEG-4 ASP also support non-standard resolutions.

Not necessarily. If you have a HDMI connection, your 1080 panel set to BitPerBit (or analog, the name depends on the manufacturer), and the player + source is 1080 - no scaling.

Not to mention that the players that can do Divx first scale the native resolution of say 578x241 to a SMPTE/EBU one (NTSC/PAL/HDTV), then send the scaled image to the TV, where is scaled again to the panels' native resolution. 1024x768 (HDTV ready plasma) is not a standard. Neither 1366x768 (LCD, plasma). But the analog/digital signal in between SHOULD conform the SMPTE/EBU requirements.

What are movies for PC? There's no need to use square pixels unless you are targeting some lame application that doesn't support other aspect ratios. Most players handle any PAR just fine.

every movie in AVI, divx & co are encoded using PAR = 1, therefore they are made for PC, unless we are talking here about HDTV, where by default PAR = 1. That's because I'm not talking about the "conoisseurs" but about the large majority of people that download a shitty one-click software (usually Trialware, or PaidWare/AdWare) and convert their movies with it.

I know that xVid and DivX both know PAR and DAR, but hey, if you encode the movie for PC/mobile phone/PSP whatever you need PAR=1, while for TV you need PAR <> 1. And people do not care, otherwise they wouldn't download one-click software.

and that "most players play them just fine", well it might be now (2009) and for a restricted number of them, because I know software worth hundreds of € that do not do this correctly (Adobe Premiere - on purpose, I have to say), unless you tell them, hey, I'm just previewing this.



I think many people are going to hard disk based backup solutions and use networked players (Popcorn Hour, PS3, Xbox 360, ...) or HTPCs for playback.
Most of them can do VOB as well, some of them can simulate completely a DVD (eg menus). What's the purpose having 1.5GB from 4.4 GB?
-=-
This guy shares a similar opinion: http://www.videohelp.com/forum/archive/aspect-ratio-for-stand-alone-divx-xvid-players-t365220.html

nm
20th May 2009, 16:21
read all my message then post. 640x480 is needed because PAR = 1 for computer, while about 0.9 for NTSC. Because I was talking about the PC resolution.
Ok, then 720x576 would be wrong: it should be 768x576 for PAR=1 and then you'd have difficulties playing it back on older standalone devices.

Not necessarily. If you have a HDMI connection, your 1080 panel set to BitPerBit (or analog, the name depends on the manufacturer), and the player + source is 1080 - no scaling.
Yes, I was talking about the TV scaling SD inputs (composite, S-Video, SCART) versus the player scaling SD video to HD (and TV fed through HDMI/DVI/VGA).

Not to mention that the players that can do Divx first scale the native resolution of say 578x241 to a SMPTE/EBU one (NTSC/PAL/HDTV), then send the scaled image to the TV, where is scaled again to the panels' native resolution. 1024x768 (HDTV ready plasma) is not a standard. Neither 1366x768 (LCD, plasma). But the analog/digital signal in between SHOULD conform the SMPTE/EBU requirements.
Indeed. The current situation is that consumer playback solutions often scale the image at both ends. However, given a 1080p50/60 TV and a player that upscales everything to 1080p, these issues can be avoided. PCs and some standalone devices can also output 1024x768 and 1360x768 to avoid scaling in the TV.

every movie in AVI, divx & co are encoded using PAR = 1
Not every movie. I have many anamorphic MPEG-4 ASP encodes in AVI/OGM and H.264 in Matroska. I prefer encoding DVB at the source resolution and PAR even though I only use PCs for playback.

therefore they are made for PC
Standalone players connected to TV sets handle them just fine.

That's because I'm not talking about the "conoisseurs" but about the large majority of people that download a shitty one-click software (usually Trialware, or PaidWare/AdWare) and convert their movies with it.
What do they have to do with the topic discussed in this thread? We aren't such people.

I know that xVid and DivX both know PAR and DAR, but hey, if you encode the movie for PC/mobile phone/PSP whatever you need PAR=1
Ok, you seem to be arguing about compatibility across all PC software solutions and different mobile players. In that case using PAR=1 is a good idea, but there are many other things to account for, such as resolution and bitrate limits. As for personal PC playback, any player that I would recommend to anyone does support anamorphic video. Encoding for Flash and other Internet solutions is another matter.

while for TV you need PAR <> 1.
Again, only for old CRTs or SD inputs.

and that "most players play them just fine", well it might be now (2009) and for a restricted number of them, because I know software worth hundreds of € that do not do this correctly (Adobe Premiere - on purpose, I have to say), unless you tell them, hey, I'm just previewing this.
We were talking about playback, not video editing.

Most of them can do VOB as well, some of them can simulate completely a DVD (eg menus). What's the purpose having 1.5GB from 4.4 GB?
I agree that storing DVDs as image files may be a better option for most users that like to keep menus and extras intact. Other people don't need them and want to save storage space.

Ghitulescu
20th May 2009, 16:39
Ok, then 720x576 would be wrong: it should be 768x576 for PAR=1 and then you'd have difficulties playing it back on older standalone devices.


Yes, I was talking about the TV scaling SD inputs (composite, S-Video, SCART) versus the player scaling SD video to HD (and TV fed through HDMI/DVI/VGA).


Indeed. The current situation is that consumer playback solutions often scale the image at both ends. However, given a 1080p50/60 TV and a player that upscales everything to 1080p, these issues can be avoided. PCs and some standalone devices can also output 1024x768 and 1360x768 to avoid scaling in the TV.


Not every movie. I have many anamorphic MPEG-4 ASP encodes in AVI/OGM and H.264 in Matroska. I prefer encoding DVB at the source resolution and PAR even though I only use PCs for playback.


Standalone players connected to TV sets handle them just fine.


What do they have to do with the topic discussed in this thread? We aren't such people.


Ok, you seem to be arguing about compatibility across all PC software solutions and different mobile players. In that case using PAR=1 is a good idea, but there are many other things to account for, such as resolution and bitrate limits. As for personal PC playback, any player that I would recommend to anyone does support anamorphic video. Encoding for Flash and other Internet solutions is another matter.


Again, only for old CRTs or SD inputs.


We were talking about playback, not video editing.


I agree that storing DVDs as image files may be a better option for most users that like to keep menus and extras intact. Other people don't need them and want to save storage space.

Ok, we agree on most points, that's the most important thing.

My "crusade" was actually due to bad encoding of DivX movies I've seen in my life. People generally do not care about settings or quality, glad to hear that here the things are different.

Also I was against various resolutions people use for encoding, examples as 627x341 being quite common. The thing is that no person in the world can obtain such resolution no matter what they do, except of course computer animated movies: all commercial sources do respect the standards, also the self-made movies (camcorder, cell phone, webcam) all of them have a standardised resolution.

And if a PAL movie having 720x576 pixels presents black borders, they are there with a purpose (letterboxing or overscan). If one removes the black vertical boxes (-> 688x576), then watches that movie on a TV, then s/he obtain a distorted image with parts of the actual image being hidden by overscan. Of course, on a PC or handheld or cell phone, PSP etc. it looks absolut fabulous ...

Ghitulescu
20th May 2009, 16:40
Ok, then 720x576 would be wrong: it should be 768x576 for PAR=1 and then you'd have difficulties playing it back on older standalone devices.
That's right, this is the value I use when I design backgrounds for DVDs (circles remains circles and not eggs ;)).