Mercurial > mplayer.hg
comparison DOCS/xml/en/encoding-guide.xml @ 17056:e0018f345868
Add indicative QP for ASP and AVC codecs
author | gpoirier |
---|---|
date | Sun, 27 Nov 2005 19:48:39 +0000 |
parents | cfe186231e2d |
children | e2340cf00456 |
comparison
equal
deleted
inserted
replaced
17055:0e521e6bd3c6 | 17056:e0018f345868 |
---|---|
1041 | 1041 |
1042 | 1042 |
1043 <sect3 id="menc-feat-dvd-mpeg4-resolution-bitrate-compute"> | 1043 <sect3 id="menc-feat-dvd-mpeg4-resolution-bitrate-compute"> |
1044 <title>Computing the resolution</title> | 1044 <title>Computing the resolution</title> |
1045 <para> | 1045 <para> |
1046 The following steps will guide you to compute the resolution of your | |
1047 encode without taking too much distortion by taking into account several | |
1048 information about the souce video. | |
1046 First, you should compute the encoded aspect ratio: | 1049 First, you should compute the encoded aspect ratio: |
1047 <systemitem>ARc = (Wc x (ARa / PRdvd )) / Hc</systemitem> | 1050 <systemitem>ARc = (Wc x (ARa / PRdvd )) / Hc</systemitem> |
1048 <itemizedlist> | 1051 <itemizedlist> |
1049 <title>where:</title> | 1052 <title>where:</title> |
1050 <listitem><para> | 1053 <listitem><para> |
1077 there is a limited total number of bits that you can spend; therefore it is | 1080 there is a limited total number of bits that you can spend; therefore it is |
1078 necessary to find a good tradeoff between compressibility and quality. | 1081 necessary to find a good tradeoff between compressibility and quality. |
1079 </para> | 1082 </para> |
1080 | 1083 |
1081 <para> | 1084 <para> |
1082 The CQ depends both on the bitrate and the movie resolution. | 1085 The CQ depends both on the bitrate, the video codec efficiency and the |
1086 movie resolution. | |
1083 In order to raise the CQ, typically you would downscale the movie given that the | 1087 In order to raise the CQ, typically you would downscale the movie given that the |
1084 bitrate is computed in function of the target size and the length of the | 1088 bitrate is computed in function of the target size and the length of the |
1085 movie, which are constant. | 1089 movie, which are constant. |
1086 A CQ below 0.18 usually ends up in a very blocky picture, because there | 1090 With MPEG-4 ASP codecs such as <systemitem class="library">XviD</systemitem> |
1091 and <systemitem class="library">libavcodec</systemitem>, a CQ below 0.18 | |
1092 usually ends up in a pretty blocky picture, because there | |
1087 are not enough bits to code the information of each macroblock (MPEG4, like | 1093 are not enough bits to code the information of each macroblock (MPEG4, like |
1088 many other codecs, groups pixels by blocks of several pixels to compress the | 1094 many other codecs, groups pixels by blocks of several pixels to compress the |
1089 image; if there are not enough bits, the edges of those blocks are | 1095 image; if there are not enough bits, the edges of those blocks are |
1090 visible). | 1096 visible). |
1091 It is therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, | 1097 It is therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, |
1092 and 0.26-0.28 for 2 CDs. | 1098 and 0.26-0.28 for 2 CDs with standard encoding options. |
1099 More advanced encoding options such as those listed here for | |
1100 <link linkend="menc-feat-mpeg4-lavc-example-settings"><systemitem class="library">libavcodec</systemitem></link> | |
1101 and | |
1102 <link linkend="menc-feat-xvid-example-settings"><systemitem class="library">XviD</systemitem></link> | |
1103 should make it possible to get the same quality with CQ ranging from | |
1104 0.18 to 0.20 for 1 CD rip, and 0.24-0.26 for 2 CDs | |
1105 With MPEG-4 ASP codecs such as <systemitem class="library">x264</systemitem>, | |
1106 you can use a CQ ranging from 0.14 to 0.16 with standard encoding options, | |
1107 and should be able to go as low as 0.10 to 0.12 with | |
1108 <link linkend="menc-feat-x264-example-settings"><systemitem class="library">x264</systemitem>'s advanced encoding settings</link>. | |
1093 </para> | 1109 </para> |
1094 | 1110 |
1095 <para> | 1111 <para> |
1096 Please take note that the CQ is just an indicative figure, as depending on | 1112 Please take note that the CQ is just an indicative figure, as depending on |
1097 the encoded content, a CQ of 0.18 may look just fine for a Bergman, contrary | 1113 the encoded content, a CQ of 0.18 may look just fine for a Bergman, contrary |
1098 to a movie such as The Matrix, which contains many high-motion scenes. | 1114 to a movie such as The Matrix, which contains many high-motion scenes. |
1099 On the other hand, it is worthless to raise CQ higher than 0.30 as you would | 1115 On the other hand, it is worthless to raise CQ higher than 0.30 as you would |
1100 be wasting bits without any noticeable quality gain. | 1116 be wasting bits without any noticeable quality gain. |
1117 Also note that as said earlier on this quide, low resolution comparatively | |
1118 need a bigger QP to look good. | |
1101 </para> | 1119 </para> |
1102 </sect3> | 1120 </sect3> |
1103 | 1121 |
1104 </sect2> | 1122 </sect2> |
1105 | 1123 |