Mercurial > mplayer.hg
comparison DOCS/xml/en/encoding-guide.xml @ 20860:f95698d9d53c
rename: XviD -> Xvid
author | kraymer |
---|---|
date | Mon, 13 Nov 2006 08:53:20 +0000 |
parents | 08ca04703274 |
children | 51575db8d5c0 |
comparison
equal
deleted
inserted
replaced
20859:6cd71fac75d3 | 20860:f95698d9d53c |
---|---|
307 | 307 |
308 <note><title>Note:</title> | 308 <note><title>Note:</title> |
309 <para> | 309 <para> |
310 Most codecs which support ABR encode only support two pass encode | 310 Most codecs which support ABR encode only support two pass encode |
311 while some others such as <systemitem class="library">x264</systemitem>, | 311 while some others such as <systemitem class="library">x264</systemitem>, |
312 <systemitem class="library">XviD</systemitem> | 312 <systemitem class="library">Xvid</systemitem> |
313 and <systemitem class="library">libavcodec</systemitem> support | 313 and <systemitem class="library">libavcodec</systemitem> support |
314 multipass, which slightly improves quality at each pass, | 314 multipass, which slightly improves quality at each pass, |
315 yet this improvement is no longer measurable nor noticeable after the | 315 yet this improvement is no longer measurable nor noticeable after the |
316 4th or so pass. | 316 4th or so pass. |
317 Therefore, in this section, two pass and multipass will be used | 317 Therefore, in this section, two pass and multipass will be used |
1087 The CQ depends on the bitrate, the video codec efficiency and the | 1087 The CQ depends on the bitrate, the video codec efficiency and the |
1088 movie resolution. | 1088 movie resolution. |
1089 In order to raise the CQ, typically you would downscale the movie given that the | 1089 In order to raise the CQ, typically you would downscale the movie given that the |
1090 bitrate is computed in function of the target size and the length of the | 1090 bitrate is computed in function of the target size and the length of the |
1091 movie, which are constant. | 1091 movie, which are constant. |
1092 With MPEG-4 ASP codecs such as <systemitem class="library">XviD</systemitem> | 1092 With MPEG-4 ASP codecs such as <systemitem class="library">Xvid</systemitem> |
1093 and <systemitem class="library">libavcodec</systemitem>, a CQ below 0.18 | 1093 and <systemitem class="library">libavcodec</systemitem>, a CQ below 0.18 |
1094 usually results in a pretty blocky picture, because there | 1094 usually results in a pretty blocky picture, because there |
1095 are not enough bits to code the information of each macroblock. (MPEG4, like | 1095 are not enough bits to code the information of each macroblock. (MPEG4, like |
1096 many other codecs, groups pixels by blocks of several pixels to compress the | 1096 many other codecs, groups pixels by blocks of several pixels to compress the |
1097 image; if there are not enough bits, the edges of those blocks are | 1097 image; if there are not enough bits, the edges of those blocks are |
1099 It is therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, | 1099 It is therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, |
1100 and 0.26-0.28 for 2 CDs rip with standard encoding options. | 1100 and 0.26-0.28 for 2 CDs rip with standard encoding options. |
1101 More advanced encoding options such as those listed here for | 1101 More advanced encoding options such as those listed here for |
1102 <link linkend="menc-feat-mpeg4-lavc-example-settings"><systemitem class="library">libavcodec</systemitem></link> | 1102 <link linkend="menc-feat-mpeg4-lavc-example-settings"><systemitem class="library">libavcodec</systemitem></link> |
1103 and | 1103 and |
1104 <link linkend="menc-feat-xvid-example-settings"><systemitem class="library">XviD</systemitem></link> | 1104 <link linkend="menc-feat-xvid-example-settings"><systemitem class="library">Xvid</systemitem></link> |
1105 should make it possible to get the same quality with CQ ranging from | 1105 should make it possible to get the same quality with CQ ranging from |
1106 0.18 to 0.20 for a 1 CD rip, and 0.24 to 0.26 for a 2 CD rip. | 1106 0.18 to 0.20 for a 1 CD rip, and 0.24 to 0.26 for a 2 CD rip. |
1107 With MPEG-4 ASP codecs such as <systemitem class="library">x264</systemitem>, | 1107 With MPEG-4 ASP codecs such as <systemitem class="library">x264</systemitem>, |
1108 you can use a CQ ranging from 0.14 to 0.16 with standard encoding options, | 1108 you can use a CQ ranging from 0.14 to 0.16 with standard encoding options, |
1109 and should be able to go as low as 0.10 to 0.12 with | 1109 and should be able to go as low as 0.10 to 0.12 with |
1377 over 1GHz). | 1377 over 1GHz). |
1378 </para></footnote> | 1378 </para></footnote> |
1379 when choosing MPEG-4 AVC codecs like | 1379 when choosing MPEG-4 AVC codecs like |
1380 <systemitem class="library">x264</systemitem> instead of MPEG-4 ASP codecs | 1380 <systemitem class="library">x264</systemitem> instead of MPEG-4 ASP codecs |
1381 such as <systemitem class="library">libavcodec</systemitem> MPEG-4 or | 1381 such as <systemitem class="library">libavcodec</systemitem> MPEG-4 or |
1382 <systemitem class="library">XviD</systemitem>. | 1382 <systemitem class="library">Xvid</systemitem>. |
1383 (Advanced codec developers may be interested in reading Michael | 1383 (Advanced codec developers may be interested in reading Michael |
1384 Niedermayer's opinion on | 1384 Niedermayer's opinion on |
1385 "<ulink url="http://guru.multimedia.cx/?p=10">why MPEG4-ASP sucks</ulink>".) | 1385 "<ulink url="http://guru.multimedia.cx/?p=10">why MPEG4-ASP sucks</ulink>".) |
1386 Likewise, you should get better quality using MPEG-4 ASP than you | 1386 Likewise, you should get better quality using MPEG-4 ASP than you |
1387 would with MPEG-2 codecs. | 1387 would with MPEG-2 codecs. |
1402 It usually takes a long time for standalone video players to begin to | 1402 It usually takes a long time for standalone video players to begin to |
1403 include support for the latest video codecs. | 1403 include support for the latest video codecs. |
1404 As a result, most only support MPEG-1 (like VCD, XVCD and KVCD), MPEG-2 | 1404 As a result, most only support MPEG-1 (like VCD, XVCD and KVCD), MPEG-2 |
1405 (like DVD, SVCD and KVCD) and MPEG-4 ASP (like DivX, | 1405 (like DVD, SVCD and KVCD) and MPEG-4 ASP (like DivX, |
1406 <systemitem class="library">libavcodec</systemitem>'s LMP4 and | 1406 <systemitem class="library">libavcodec</systemitem>'s LMP4 and |
1407 <systemitem class="library">XviD</systemitem>) | 1407 <systemitem class="library">Xvid</systemitem>) |
1408 (Beware: Usually, not all MPEG-4 ASP features are supported). | 1408 (Beware: Usually, not all MPEG-4 ASP features are supported). |
1409 Please refer to the technical specs of your player (if they are available), | 1409 Please refer to the technical specs of your player (if they are available), |
1410 or google around for more information. | 1410 or google around for more information. |
1411 </para></listitem> | 1411 </para></listitem> |
1412 | 1412 |
1413 <listitem><para> | 1413 <listitem><para> |
1414 <emphasis role="bold">Best quality per encoding time</emphasis>: | 1414 <emphasis role="bold">Best quality per encoding time</emphasis>: |
1415 Codecs that have been around for some time (such as | 1415 Codecs that have been around for some time (such as |
1416 <systemitem class="library">libavcodec</systemitem> MPEG-4 and | 1416 <systemitem class="library">libavcodec</systemitem> MPEG-4 and |
1417 <systemitem class="library">XviD</systemitem>) are usually heavily | 1417 <systemitem class="library">Xvid</systemitem>) are usually heavily |
1418 optimized with all kinds of smart algorithms and SIMD assembly code. | 1418 optimized with all kinds of smart algorithms and SIMD assembly code. |
1419 That is why they tend to yield the best quality per encoding time ratio. | 1419 That is why they tend to yield the best quality per encoding time ratio. |
1420 However, they may have some very advanced options that, if enabled, | 1420 However, they may have some very advanced options that, if enabled, |
1421 will make the encode really slow for marginal gains. | 1421 will make the encode really slow for marginal gains. |
1422 </para> | 1422 </para> |
1430 processing, though this is only useful for users of machines with | 1430 processing, though this is only useful for users of machines with |
1431 several CPUs. | 1431 several CPUs. |
1432 <systemitem class="library">libavcodec</systemitem> MPEG-4 does | 1432 <systemitem class="library">libavcodec</systemitem> MPEG-4 does |
1433 allow that, but speed gains are limited, and there is a slight | 1433 allow that, but speed gains are limited, and there is a slight |
1434 negative effect on picture quality. | 1434 negative effect on picture quality. |
1435 <systemitem class="library">XviD</systemitem>'s multi-threaded encoding, | 1435 <systemitem class="library">Xvid</systemitem>'s multi-threaded encoding, |
1436 activated by the <option>threads</option> option, can be used to | 1436 activated by the <option>threads</option> option, can be used to |
1437 boost encoding speed — by about 40-60% in typical cases — | 1437 boost encoding speed — by about 40-60% in typical cases — |
1438 with little if any picture degradation. | 1438 with little if any picture degradation. |
1439 <systemitem class="library">x264</systemitem> also allows multi-threaded | 1439 <systemitem class="library">x264</systemitem> also allows multi-threaded |
1440 encoding, which currently speeds up encoding by 15-30% (depending on | 1440 encoding, which currently speeds up encoding by 15-30% (depending on |
1443 | 1443 |
1444 <listitem><para> | 1444 <listitem><para> |
1445 <emphasis role="bold">Personal taste</emphasis>: | 1445 <emphasis role="bold">Personal taste</emphasis>: |
1446 This is where it gets almost irrational: For the same reason that some | 1446 This is where it gets almost irrational: For the same reason that some |
1447 hung on to DivX 3 for years when newer codecs were already doing wonders, | 1447 hung on to DivX 3 for years when newer codecs were already doing wonders, |
1448 some folks will prefer <systemitem class="library">XviD</systemitem> | 1448 some folks will prefer <systemitem class="library">Xvid</systemitem> |
1449 or <systemitem class="library">libavcodec</systemitem> MPEG-4 over | 1449 or <systemitem class="library">libavcodec</systemitem> MPEG-4 over |
1450 <systemitem class="library">x264</systemitem>. | 1450 <systemitem class="library">x264</systemitem>. |
1451 </para> | 1451 </para> |
1452 <para> | 1452 <para> |
1453 You should make your own judgement; do not take advice from people who | 1453 You should make your own judgement; do not take advice from people who |
2381 </entry></row> | 2381 </entry></row> |
2382 <row><entry>h263p</entry><entry> | 2382 <row><entry>h263p</entry><entry> |
2383 H.263+ | 2383 H.263+ |
2384 </entry></row> | 2384 </entry></row> |
2385 <row><entry>mpeg4</entry><entry> | 2385 <row><entry>mpeg4</entry><entry> |
2386 ISO standard MPEG-4 (DivX, XviD compatible) | 2386 ISO standard MPEG-4 (DivX, Xvid compatible) |
2387 </entry></row> | 2387 </entry></row> |
2388 <row><entry>msmpeg4</entry><entry> | 2388 <row><entry>msmpeg4</entry><entry> |
2389 pre-standard MPEG-4 variant by MS, v3 (AKA DivX3) | 2389 pre-standard MPEG-4 variant by MS, v3 (AKA DivX3) |
2390 </entry></row> | 2390 </entry></row> |
2391 <row><entry>msmpeg4v2</entry><entry> | 2391 <row><entry>msmpeg4v2</entry><entry> |
2911 </sect2> | 2911 </sect2> |
2912 </sect1> | 2912 </sect1> |
2913 | 2913 |
2914 | 2914 |
2915 <sect1 id="menc-feat-xvid"> | 2915 <sect1 id="menc-feat-xvid"> |
2916 <title>Encoding with the <systemitem class="library">XviD</systemitem> | 2916 <title>Encoding with the <systemitem class="library">Xvid</systemitem> |
2917 codec</title> | 2917 codec</title> |
2918 <para> | 2918 <para> |
2919 <systemitem class="library">XviD</systemitem> is a free library for | 2919 <systemitem class="library">Xvid</systemitem> is a free library for |
2920 encoding MPEG-4 ASP video streams. | 2920 encoding MPEG-4 ASP video streams. |
2921 Before starting to encode, you need to <link linkend="xvid"> | 2921 Before starting to encode, you need to <link linkend="xvid"> |
2922 set up <application>MEncoder</application> to support it</link>. | 2922 set up <application>MEncoder</application> to support it</link>. |
2923 </para> | 2923 </para> |
2924 <para> | 2924 <para> |
2933 <sect2 id="menc-feat-xvid-intro"> | 2933 <sect2 id="menc-feat-xvid-intro"> |
2934 <title>What options should I use to get the best results?</title> | 2934 <title>What options should I use to get the best results?</title> |
2935 | 2935 |
2936 <para> | 2936 <para> |
2937 Please begin by reviewing the | 2937 Please begin by reviewing the |
2938 <systemitem class="library">XviD</systemitem> section of | 2938 <systemitem class="library">Xvid</systemitem> section of |
2939 <application>MPlayer</application>'s man page. | 2939 <application>MPlayer</application>'s man page. |
2940 This section is intended to be a supplement to the man page. | 2940 This section is intended to be a supplement to the man page. |
2941 </para> | 2941 </para> |
2942 <para> | 2942 <para> |
2943 The XviD default settings are already a good tradeoff between | 2943 The Xvid default settings are already a good tradeoff between |
2944 speed and quality, therefore you can safely stick to them if | 2944 speed and quality, therefore you can safely stick to them if |
2945 the following section puzzles you. | 2945 the following section puzzles you. |
2946 </para> | 2946 </para> |
2947 </sect2> | 2947 </sect2> |
2948 | 2948 |
2949 <sect2 id="menc-feat-xvid-encoding-options"> | 2949 <sect2 id="menc-feat-xvid-encoding-options"> |
2950 <title>Encoding options of <systemitem class="library">XviD</systemitem></title> | 2950 <title>Encoding options of <systemitem class="library">Xvid</systemitem></title> |
2951 | 2951 |
2952 <itemizedlist> | 2952 <itemizedlist> |
2953 <listitem><para> | 2953 <listitem><para> |
2954 <emphasis role="bold">vhq</emphasis> | 2954 <emphasis role="bold">vhq</emphasis> |
2955 This setting affects the macroblock decision algorithm, where the | 2955 This setting affects the macroblock decision algorithm, where the |
3103 vector for the whole frame. | 3103 vector for the whole frame. |
3104 This almost always raises PSNR, but significantly slows down | 3104 This almost always raises PSNR, but significantly slows down |
3105 encoding (as well as decoding). | 3105 encoding (as well as decoding). |
3106 Therefore, you should only use it when you have turned | 3106 Therefore, you should only use it when you have turned |
3107 <option>vhq</option> to the maximum. | 3107 <option>vhq</option> to the maximum. |
3108 <systemitem class="library">XviD</systemitem>'s GMC is more | 3108 <systemitem class="library">Xvid</systemitem>'s GMC is more |
3109 sophisticated than DivX's, but is only supported by few | 3109 sophisticated than DivX's, but is only supported by few |
3110 standalone players. | 3110 standalone players. |
3111 </para></listitem> | 3111 </para></listitem> |
3112 | 3112 |
3113 </itemizedlist> | 3113 </itemizedlist> |
3114 </sect2> | 3114 </sect2> |
3115 | 3115 |
3116 <sect2 id="menc-feat-xvid-encoding-profiles"> | 3116 <sect2 id="menc-feat-xvid-encoding-profiles"> |
3117 <title>Encoding profiles</title> | 3117 <title>Encoding profiles</title> |
3118 <para> | 3118 <para> |
3119 XviD supports encoding profiles through the <option>profile</option> option, | 3119 Xvid supports encoding profiles through the <option>profile</option> option, |
3120 which are used to impose restrictions on the properties of the XviD video | 3120 which are used to impose restrictions on the properties of the Xvid video |
3121 stream such that it will be playable on anything which supports the | 3121 stream such that it will be playable on anything which supports the |
3122 chosen profile. | 3122 chosen profile. |
3123 The restrictions relate to resolutions, bitrates and certain MPEG-4 | 3123 The restrictions relate to resolutions, bitrates and certain MPEG-4 |
3124 features. | 3124 features. |
3125 The following table shows what each profile supports. | 3125 The following table shows what each profile supports. |