Mercurial > mplayer.hg
comparison DOCS/xml/en/encoding-guide.xml @ 21596:f551403d82a9
replace " with ", better readability
author | torinthiel |
---|---|
date | Thu, 14 Dec 2006 13:49:57 +0000 |
parents | f746c28a324c |
children | acee29a43313 |
comparison
equal
deleted
inserted
replaced
21595:5815f5c6d370 | 21596:f551403d82a9 |
---|---|
2 <!-- $Revision$ --> | 2 <!-- $Revision$ --> |
3 <chapter id="encoding-guide"> | 3 <chapter id="encoding-guide"> |
4 <title>Encoding with <application>MEncoder</application></title> | 4 <title>Encoding with <application>MEncoder</application></title> |
5 | 5 |
6 <sect1 id="menc-feat-dvd-mpeg4"> | 6 <sect1 id="menc-feat-dvd-mpeg4"> |
7 <title>Making a high quality MPEG-4 ("DivX") | 7 <title>Making a high quality MPEG-4 ("DivX") |
8 rip of a DVD movie</title> | 8 rip of a DVD movie</title> |
9 | 9 |
10 <para> | 10 <para> |
11 One frequently asked question is "How do I make the highest quality rip | 11 One frequently asked question is "How do I make the highest quality rip |
12 for a given size?". Another question is "How do I make the highest | 12 for a given size?". Another question is "How do I make the highest |
13 quality DVD rip possible? I do not care about file size, I just want the best | 13 quality DVD rip possible? I do not care about file size, I just want the best |
14 quality." | 14 quality." |
15 </para> | 15 </para> |
16 | 16 |
17 <para> | 17 <para> |
18 The latter question is perhaps at least somewhat wrongly posed. After all, if | 18 The latter question is perhaps at least somewhat wrongly posed. After all, if |
19 you do not care about file size, why not simply copy the entire MPEG-2 video | 19 you do not care about file size, why not simply copy the entire MPEG-2 video |
1928 soon as the movie begins to play: | 1928 soon as the movie begins to play: |
1929 <screen> | 1929 <screen> |
1930 demux_mpg: 24000/1001 fps progressive NTSC content detected, switching framerate. | 1930 demux_mpg: 24000/1001 fps progressive NTSC content detected, switching framerate. |
1931 </screen> | 1931 </screen> |
1932 From this point forward, demux_mpg should never say it finds | 1932 From this point forward, demux_mpg should never say it finds |
1933 "30000/1001 fps NTSC content." | 1933 "30000/1001 fps NTSC content." |
1934 </para> | 1934 </para> |
1935 | 1935 |
1936 <para> | 1936 <para> |
1937 When you watch progressive video, you should never see any | 1937 When you watch progressive video, you should never see any |
1938 interlacing. Beware, however, because sometimes there is a tiny bit | 1938 interlacing. Beware, however, because sometimes there is a tiny bit |
1951 occurred. | 1951 occurred. |
1952 </para> | 1952 </para> |
1953 | 1953 |
1954 <para> | 1954 <para> |
1955 Sometimes progressive video on DVDs is referred to as | 1955 Sometimes progressive video on DVDs is referred to as |
1956 "soft-telecine" because it is intended to | 1956 "soft-telecine" because it is intended to |
1957 be telecined by the DVD player. | 1957 be telecined by the DVD player. |
1958 </para> | 1958 </para> |
1959 </sect3> | 1959 </sect3> |
1960 | 1960 |
1961 | 1961 |
1972 framerate changes when it plays telecined video. | 1972 framerate changes when it plays telecined video. |
1973 </para> | 1973 </para> |
1974 | 1974 |
1975 <para> | 1975 <para> |
1976 Watching a telecined video, you will see interlacing artifacts that | 1976 Watching a telecined video, you will see interlacing artifacts that |
1977 seem to "blink": they repeatedly appear and disappear. | 1977 seem to "blink": they repeatedly appear and disappear. |
1978 You can look closely at this by | 1978 You can look closely at this by |
1979 <orderedlist> | 1979 <orderedlist> |
1980 <listitem><screen>mplayer dvd://1</screen></listitem> | 1980 <listitem><screen>mplayer dvd://1</screen></listitem> |
1981 <listitem><para> | 1981 <listitem><para> |
1982 Seek to a part with motion. | 1982 Seek to a part with motion. |
1996 </orderedlist> | 1996 </orderedlist> |
1997 </para> | 1997 </para> |
1998 | 1998 |
1999 <para> | 1999 <para> |
2000 Sometimes telecined video on DVDs is referred to as | 2000 Sometimes telecined video on DVDs is referred to as |
2001 "hard-telecine". Since hard-telecine is already 60000/1001 fields | 2001 "hard-telecine". Since hard-telecine is already 60000/1001 fields |
2002 per second, the DVD player plays the video without any manipulation. | 2002 per second, the DVD player plays the video without any manipulation. |
2003 </para> | 2003 </para> |
2004 | 2004 |
2005 <para> | 2005 <para> |
2006 Another way to tell if your source is telecined or not is to play | 2006 Another way to tell if your source is telecined or not is to play |
2021 <title>Interlaced</title> | 2021 <title>Interlaced</title> |
2022 | 2022 |
2023 <para> | 2023 <para> |
2024 Interlaced video was originally filmed at 60000/1001 fields per second, | 2024 Interlaced video was originally filmed at 60000/1001 fields per second, |
2025 and stored on the DVD as 30000/1001 frames per second. The interlacing effect | 2025 and stored on the DVD as 30000/1001 frames per second. The interlacing effect |
2026 (often called "combing") is a result of combining pairs of | 2026 (often called "combing") is a result of combining pairs of |
2027 fields into frames. Each field is supposed to be 1/(60000/1001) seconds apart, | 2027 fields into frames. Each field is supposed to be 1/(60000/1001) seconds apart, |
2028 and when they are displayed simultaneously the difference is apparent. | 2028 and when they are displayed simultaneously the difference is apparent. |
2029 </para> | 2029 </para> |
2030 | 2030 |
2031 <para> | 2031 <para> |
2042 | 2042 |
2043 <sect3 id="menc-feat-telecine-ident-mixedpt"> | 2043 <sect3 id="menc-feat-telecine-ident-mixedpt"> |
2044 <title>Mixed progressive and telecine</title> | 2044 <title>Mixed progressive and telecine</title> |
2045 | 2045 |
2046 <para> | 2046 <para> |
2047 All of a "mixed progressive and telecine" video was originally | 2047 All of a "mixed progressive and telecine" video was originally |
2048 24000/1001 frames per second, but some parts of it ended up being telecined. | 2048 24000/1001 frames per second, but some parts of it ended up being telecined. |
2049 </para> | 2049 </para> |
2050 | 2050 |
2051 <para> | 2051 <para> |
2052 When <application>MPlayer</application> plays this category, it will | 2052 When <application>MPlayer</application> plays this category, it will |
2053 (often repeatedly) switch back and forth between "30000/1001 fps NTSC" | 2053 (often repeatedly) switch back and forth between "30000/1001 fps NTSC" |
2054 and "24000/1001 fps progressive NTSC". Watch the bottom of | 2054 and "24000/1001 fps progressive NTSC". Watch the bottom of |
2055 <application>MPlayer</application>'s output to see these messages. | 2055 <application>MPlayer</application>'s output to see these messages. |
2056 </para> | 2056 </para> |
2057 | 2057 |
2058 <para> | 2058 <para> |
2059 You should check the "30000/1001 fps NTSC" sections to make sure | 2059 You should check the "30000/1001 fps NTSC" sections to make sure |
2060 they are actually telecine, and not just interlaced. | 2060 they are actually telecine, and not just interlaced. |
2061 </para> | 2061 </para> |
2062 </sect3> | 2062 </sect3> |
2063 | 2063 |
2064 | 2064 |
2065 <sect3 id="menc-feat-telecine-ident-mixedpi"> | 2065 <sect3 id="menc-feat-telecine-ident-mixedpi"> |
2066 <title>Mixed progressive and interlaced</title> | 2066 <title>Mixed progressive and interlaced</title> |
2067 | 2067 |
2068 <para> | 2068 <para> |
2069 In "mixed progressive and interlaced" content, progressive | 2069 In "mixed progressive and interlaced" content, progressive |
2070 and interlaced video have been spliced together. | 2070 and interlaced video have been spliced together. |
2071 </para> | 2071 </para> |
2072 | 2072 |
2073 <para> | 2073 <para> |
2074 This category looks just like "mixed progressive and telecine", | 2074 This category looks just like "mixed progressive and telecine", |
2075 until you examine the 30000/1001 fps sections and see that they do not have the | 2075 until you examine the 30000/1001 fps sections and see that they do not have the |
2076 telecine pattern. | 2076 telecine pattern. |
2077 </para> | 2077 </para> |
2078 </sect3> | 2078 </sect3> |
2079 </sect2> | 2079 </sect2> |
2132 | 2132 |
2133 <para> | 2133 <para> |
2134 For most practical cases it is not possible to retrieve a complete | 2134 For most practical cases it is not possible to retrieve a complete |
2135 progressive video from interlaced content. The only way to do so | 2135 progressive video from interlaced content. The only way to do so |
2136 without losing half of the vertical resolution is to double the | 2136 without losing half of the vertical resolution is to double the |
2137 framerate and try to "guess" what ought to make up the | 2137 framerate and try to "guess" what ought to make up the |
2138 corresponding lines for each field (this has drawbacks - see method 3). | 2138 corresponding lines for each field (this has drawbacks - see method 3). |
2139 </para> | 2139 </para> |
2140 | 2140 |
2141 <orderedlist> | 2141 <orderedlist> |
2142 <listitem><para> | 2142 <listitem><para> |
2154 <listitem><para> | 2154 <listitem><para> |
2155 Use a deinterlacing filter before encoding. There are several of | 2155 Use a deinterlacing filter before encoding. There are several of |
2156 these filters available to choose from, each with its own advantages | 2156 these filters available to choose from, each with its own advantages |
2157 and disadvantages. Consult <option>mplayer -pphelp</option> and | 2157 and disadvantages. Consult <option>mplayer -pphelp</option> and |
2158 <option>mplayer -vf help</option> to see what is available | 2158 <option>mplayer -vf help</option> to see what is available |
2159 (grep for "deint"), read Michael's Niedermayer | 2159 (grep for "deint"), read Michael's Niedermayer |
2160 <ulink url="http://guru.multimedia.cx/deinterlacing-filters/">Deinterlacing filters comparison</ulink>, | 2160 <ulink url="http://guru.multimedia.cx/deinterlacing-filters/">Deinterlacing filters comparison</ulink>, |
2161 and search the | 2161 and search the |
2162 <ulink url="http://www.mplayerhq.hu/design7/mailing_lists.html"> | 2162 <ulink url="http://www.mplayerhq.hu/design7/mailing_lists.html"> |
2163 MPlayer mailing lists</ulink> to find many discussions about the | 2163 MPlayer mailing lists</ulink> to find many discussions about the |
2164 various filters. | 2164 various filters. |
2234 work properly, <option>pullup</option> <emphasis role="bold">must</emphasis> | 2234 work properly, <option>pullup</option> <emphasis role="bold">must</emphasis> |
2235 be followed by the <option>softskip</option> filter or | 2235 be followed by the <option>softskip</option> filter or |
2236 else <application>MEncoder</application> will crash. | 2236 else <application>MEncoder</application> will crash. |
2237 <option>pullup</option> is, however, the cleanest and most | 2237 <option>pullup</option> is, however, the cleanest and most |
2238 accurate method available for encoding both telecine and | 2238 accurate method available for encoding both telecine and |
2239 "mixed progressive and telecine". | 2239 "mixed progressive and telecine". |
2240 <screen> | 2240 <screen> |
2241 mencoder dvd://1 -oac copy -vf pullup,softskip | 2241 mencoder dvd://1 -oac copy -vf pullup,softskip |
2242 -ovc lavc -ofps 24000/1001<!-- | 2242 -ovc lavc -ofps 24000/1001<!-- |
2243 --></screen> | 2243 --></screen> |
2244 </para></listitem> | 2244 </para></listitem> |
2295 display the video on an interlaced device (with a TV card, for | 2295 display the video on an interlaced device (with a TV card, for |
2296 example). If you have interlaced frames in a 24000/1001 frames per | 2296 example). If you have interlaced frames in a 24000/1001 frames per |
2297 second video, they will be telecined along with the progressive | 2297 second video, they will be telecined along with the progressive |
2298 frames. Half of the interlaced "frames" will be displayed for three | 2298 frames. Half of the interlaced "frames" will be displayed for three |
2299 fields' duration (3/(60000/1001) seconds), resulting in a flicking | 2299 fields' duration (3/(60000/1001) seconds), resulting in a flicking |
2300 "jump back in time" effect that looks quite bad. If you | 2300 "jump back in time" effect that looks quite bad. If you |
2301 even attempt this, you <emphasis role="bold">must</emphasis> use a | 2301 even attempt this, you <emphasis role="bold">must</emphasis> use a |
2302 deinterlacing filter like <option>lb</option> or | 2302 deinterlacing filter like <option>lb</option> or |
2303 <option>l5</option>. | 2303 <option>l5</option>. |
2304 </para> | 2304 </para> |
2305 | 2305 |
2340 <listitem> | 2340 <listitem> |
2341 <formalpara> | 2341 <formalpara> |
2342 <title>About cropping:</title> | 2342 <title>About cropping:</title> |
2343 <para> | 2343 <para> |
2344 Video data on DVDs are stored in a format called YUV 4:2:0. In YUV | 2344 Video data on DVDs are stored in a format called YUV 4:2:0. In YUV |
2345 video, luma ("brightness") and chroma ("color") | 2345 video, luma ("brightness") and chroma ("color") |
2346 are stored separately. Because the human eye is somewhat less | 2346 are stored separately. Because the human eye is somewhat less |
2347 sensitive to color than it is to brightness, in a YUV 4:2:0 picture | 2347 sensitive to color than it is to brightness, in a YUV 4:2:0 picture |
2348 there is only one chroma pixel for every four luma pixels. In a | 2348 there is only one chroma pixel for every four luma pixels. In a |
2349 progressive picture, each square of four luma pixels (two on each | 2349 progressive picture, each square of four luma pixels (two on each |
2350 side) has one common chroma pixel. You must crop progressive YUV | 2350 side) has one common chroma pixel. You must crop progressive YUV |
2822 A typical usage of this feature is to set the matrices preferred by the | 2822 A typical usage of this feature is to set the matrices preferred by the |
2823 <ulink url="http://www.kvcd.net/">KVCD</ulink> specifications. | 2823 <ulink url="http://www.kvcd.net/">KVCD</ulink> specifications. |
2824 </para> | 2824 </para> |
2825 | 2825 |
2826 <para> | 2826 <para> |
2827 The <emphasis role="bold">KVCD "Notch" Quantization Matrix:</emphasis> | 2827 The <emphasis role="bold">KVCD "Notch" Quantization Matrix:</emphasis> |
2828 </para> | 2828 </para> |
2829 | 2829 |
2830 <para> | 2830 <para> |
2831 Intra: | 2831 Intra: |
2832 <screen> | 2832 <screen> |
3595 Ultimately, only you can decide which options are best for your | 3595 Ultimately, only you can decide which options are best for your |
3596 purposes. The decision for the first class of options is the simplest: | 3596 purposes. The decision for the first class of options is the simplest: |
3597 you only have to decide whether you think the quality differences | 3597 you only have to decide whether you think the quality differences |
3598 justify the speed differences. For the second class of options, | 3598 justify the speed differences. For the second class of options, |
3599 preferences may be far more subjective, and more factors may be | 3599 preferences may be far more subjective, and more factors may be |
3600 involved. Note that some of the "personal preferences and special | 3600 involved. Note that some of the "personal preferences and special |
3601 requirements" options can still have large impacts on speed or quality, | 3601 requirements" options can still have large impacts on speed or quality, |
3602 but that is not what they are primarily useful for. A couple of the | 3602 but that is not what they are primarily useful for. A couple of the |
3603 "personal preference" options may even cause changes that look better | 3603 "personal preference" options may even cause changes that look better |
3604 to some people, but look worse to others. | 3604 to some people, but look worse to others. |
3605 </para> | 3605 </para> |
3606 | 3606 |
3607 <para> | 3607 <para> |
3608 Before continuing, you need to understand that this guide uses only one | 3608 Before continuing, you need to understand that this guide uses only one |