From 323d7eb108af149100602691226e270d797b2b3f Mon Sep 17 00:00:00 2001 From: gpoirier Date: Sun, 24 Jul 2005 20:53:54 +0000 Subject: [PATCH] New item: "Choosing resolution and bitrate", from Rich's encoding guide git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16086 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/en/encoding-guide.xml | 71 ++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/DOCS/xml/en/encoding-guide.xml b/DOCS/xml/en/encoding-guide.xml index e0229dc054..54aca874c0 100644 --- a/DOCS/xml/en/encoding-guide.xml +++ b/DOCS/xml/en/encoding-guide.xml @@ -950,7 +950,77 @@ Unfortunately, not all players enforce this auto-scaling information, therefore you may still want to rescale. + + + +Choosing resolution and bitrate + + + If you will not be encoding in constant quantizer mode, you need to + select a bitrate. + The concept of bitrate is quite simple. + It's the (average) number of bits that will be consumed to store your + movie, per second. + Normally bitrate is measured in kilobits (1000 bits) per second. + The size of your movie on disk is the bitrate times the length of the + movie in time, plus a small amount of "overhead" (see the section on + the AVI container + for instance). + Other parameters such as scaling, cropping, etc. will + not alter the file size unless you + change the bitrate as well!. + + + Bitrate does not scale proportional + to resolution. + That is to say, a 320x240 file at 200 kbit/sec will not be the same + quality as the same movie at 640x480 and 800 kbit/sec! + There are two reasons for this: + + + Perceptual: You notice MPEG + artifacts more if they're scaled up bigger! + Artifacts appear on the scale of blocks (8x8). + Your eye will not see errors in 4800 small blocks as easily as it + sees errors in 1200 large blocks (assuming you'll be scaling both + to fullscreen). + + + Theoretical: When you scale down + an image but still use the same size (8x8) blocks for the frequency + space transform, you move more data to the high frequency bands. + Roughly speaking, each pixel contains more of the detail than it + did before. + So even though your scaled-down picture contains 1/4 the information + in the spacial directions, it could still contain a large portion + of the information in the frequency domain (assuming that the high + frequencies were underutilized in the original 640x480 image). + + + + + Past guides have recommended choosing a bitrate and resolution based + on a "bits per pixel" approach, but this is usually not valid due to + the above reasons. + A better estimate seems to be that bitrates scale proportional to the + square root of resolution, so that 320x240 and 400 kbit/sec would be + comparable to 640x480 at 800 kbit/sec. + However this has not been verified with theoretical or empirical + rigor. + Further, given that movies vary greatly with regard to noise, detail, + degree of motion, etc., it's futile to make general recommendations + for bits per length-of-diagonal (the analogue of bits per pixel, + using the square root). + + + So far we have discussed the difficulty of choosing a bitrate and + resolution. + + + + +Computing the resolution First, you should compute the encoded aspect ratio: ARc = (Wc x (ARa / PRdvd )) / Hc @@ -1008,6 +1078,7 @@ On the other hand, it is worthless to raise CQ higher than 0.30 as you would be wasting bits without any noticeable quality gain. +