Mercurial > mplayer.hg
comparison DOCS/encoding.html @ 8816:341d8083491a
fix lots of stuff that was outdated, unclear, inaccurate, or
misleading. hopefully no one objects to any of these changes.
author | rfelker |
---|---|
date | Mon, 06 Jan 2003 04:58:20 +0000 |
parents | 27bc01774674 |
children | 636c1e894a27 |
comparison
equal
deleted
inserted
replaced
8815:74dd9b5cc7f6 | 8816:341d8083491a |
---|---|
13 <H2><A NAME="encoding">2.4 Encoding with MEncoder</A></H2> | 13 <H2><A NAME="encoding">2.4 Encoding with MEncoder</A></H2> |
14 | 14 |
15 <P>For the complete list of available MEncoder options and examples, please see | 15 <P>For the complete list of available MEncoder options and examples, please see |
16 the man page.</P> | 16 the man page.</P> |
17 | 17 |
18 <H3><A NAME="2pass">2.4.1 Encoding 2 or 3-pass DivX4</A></H3> | 18 <H3><A NAME="2pass">2.4.1 Encoding 2 or 3-pass MPEG-4 ("DIVX")</A></H3> |
19 | 19 |
20 <P><U><B>2-pass encoding:</B></U> the name comes from the fact that this method | 20 <P><U><B>2-pass encoding:</B></U> the name comes from the fact that this method |
21 encodes the file <I>twice</I>. The first encoding (dubbed <I>pass</I>) | 21 encodes the file <I>twice</I>. The first encoding (dubbed <I>pass</I>) |
22 creates some temporary files (*.log) with a size of few megabytes, do not | 22 creates some temporary files (*.log) with a size of few megabytes, do not |
23 delete them yet (you can delete the AVI). In the second pass, the 2-pass | 23 delete them yet (you can delete the AVI). In the second pass, the 2-pass |
24 output file is created, using the bitrate data from the temporary files. The | 24 output file is created, using the bitrate data from the temporary files. The |
25 resulting file will have much better image quality. If this is the first time | 25 resulting file will have much better image quality. If this is the first time |
26 you heard about this, you should consult some guides available on the | 26 you heard about this, you should consult some guides available on the |
27 Net.</P> | 27 Net.</P> |
28 | 28 |
29 <P>This example shows how to encode a DVD to a 2-pass DivX4 AVI. Just two | 29 <P>This example shows how to encode a DVD to a 2-pass MPEG-4 ("DIVX") AVI. Just |
30 commands are needed:<BR> | 30 two commands are needed:<BR> |
31 <CODE> rm frameno.avi</CODE> - remove this file, which | 31 <CODE> rm frameno.avi</CODE> - remove this file, which |
32 can come from a previous 3-pass encoding (it interferes with current | 32 can come from a previous 3-pass encoding (it interferes with current |
33 one)<BR> | 33 one)<BR> |
34 <CODE> mencoder -dvd 2 -ovc lavc -lavcopts | 34 <CODE> mencoder -dvd 2 -ovc lavc -lavcopts |
35 vcodec=mpeg4:vpass=1 -oac copy -o movie.avi<BR> | 35 vcodec=mpeg4:vpass=1 -oac copy -o movie.avi<BR> |
52 prints the recommended bitrate values for 650Mb, 700Mb, and 800Mb | 52 prints the recommended bitrate values for 650Mb, 700Mb, and 800Mb |
53 destination sizes, after this pass finishes.</P></LI> | 53 destination sizes, after this pass finishes.</P></LI> |
54 <LI>Second pass: | 54 <LI>Second pass: |
55 <P><CODE>mencoder <file/DVD> -oac copy | 55 <P><CODE>mencoder <file/DVD> -oac copy |
56 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=<bitrate></CODE></P> | 56 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=<bitrate></CODE></P> |
57 <P>Alias the first pass of DivX4 video encoding. | 57 <P>This is the first pass of video encoding. |
58 Optionally specify the video bitrate MEncoder printed at the end of | 58 Optionally specify the video bitrate MEncoder printed at the end of |
59 the previous pass.</P></LI> | 59 the previous pass.</P></LI> |
60 <LI>Third pass: | 60 <LI>Third pass: |
61 <P><CODE>mencoder <file/DVD> -oac copy | 61 <P><CODE>mencoder <file/DVD> -oac copy |
62 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2:vbitrate=<bitrate></CODE></P> | 62 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2:vbitrate=<bitrate></CODE></P> |
63 <P>Alias the second pass of DivX4 video encoding. | 63 <P>This is the second pass of video encoding. |
64 Optionally specify the video bitrate MEncoder printed at the end of | 64 Specify the same bitrate as in the previous pass unless you really know |
65 the previous pass. In this pass, audio from <CODE>frameno.avi</CODE> will | 65 what you are doing. In this pass, audio from <CODE>frameno.avi</CODE> |
66 be inserted into the destination file.. and it's all ready!</P></LI> | 66 will be inserted into the destination file.. and it's all ready!</P></LI> |
67 </OL> | 67 </OL> |
68 | 68 |
69 <H4>Example for 3-pass encoding:</H4> | 69 <H4>Example for 3-pass encoding:</H4> |
70 | 70 |
71 <P><CODE> rm frameno.avi</CODE> - remove this file, | 71 <P><CODE> rm frameno.avi</CODE> - remove this file, |
138 | 138 |
139 <UL> | 139 <UL> |
140 <LI>mjpeg - Motion JPEG</LI> | 140 <LI>mjpeg - Motion JPEG</LI> |
141 <LI>h263 - H263</LI> | 141 <LI>h263 - H263</LI> |
142 <LI>h263p - H263 Plus</LI> | 142 <LI>h263p - H263 Plus</LI> |
143 <LI>mpeg4 - DivX4</LI> | 143 <LI>mpeg4 - ISO standard MPEG-4 (DivX 4/5, OpenDivX, XVID compatible)</LI> |
144 <LI>msmpeg4 - the old DivX</LI> | 144 <LI>msmpeg4 - pre-standard MPEG-4 variant by MS, v3 (aka DivX3)</LI> |
145 <LI>msmpeg4v2 - Micro$oft MPEG4 V2 (DivX alias MP43 predecessor)</LI> | 145 <LI>msmpeg4v2 - pre-standard MPEG-4 by MS, v2 (used in old asf files)</LI> |
146 <LI>wmv1 - Windows Media Video, version 1 (aka WMV7)</LI> | |
146 <LI>rv10 - an old RealVideo codec</LI> | 147 <LI>rv10 - an old RealVideo codec</LI> |
147 <LI>mpeg1video - MPEG1 video :)</LI> | 148 <LI>mpeg1video - MPEG1 video :)</LI> |
149 <LI>huffyuv - lossless compression</LI> | |
148 </UL> | 150 </UL> |
149 | 151 |
150 <P>The first column contains the codec names that should be passed after the | 152 <P>The first column contains the codec names that should be passed after the |
151 <CODE>vcodec</CODE> config, like: <CODE>-lavcopts vcodec=msmpeg4</CODE></P> | 153 <CODE>vcodec</CODE> config, like: <CODE>-lavcopts vcodec=msmpeg4</CODE></P> |
152 | 154 |
166 <OL> | 168 <OL> |
167 <LI>MEncoder <I>decodes</I> the input image(s) with | 169 <LI>MEncoder <I>decodes</I> the input image(s) with |
168 <CODE>libjpeg</CODE> (when decoding PNGs, it will use <B>libpng</B>).</LI> | 170 <CODE>libjpeg</CODE> (when decoding PNGs, it will use <B>libpng</B>).</LI> |
169 | 171 |
170 <LI>MEncoder then feeds the decoded image to the chosen video compressor | 172 <LI>MEncoder then feeds the decoded image to the chosen video compressor |
171 (DivX4, Xvid, ffmpeg msmpeg4, etc...). Watch for the PNG decoder, as | 173 (DivX4, Xvid, ffmpeg msmpeg4, etc...).</LI> |
172 currently it can output only to RGB formats, thus can't be used with codecs | |
173 that require YUV as input, like DivX4 or ffmpeg's msmpeg4.</LI> | |
174 </OL> | 174 </OL> |
175 | 175 |
176 <H4>Examples</H4> | 176 <H4>Examples</H4> |
177 | 177 |
178 <P>The explanation of the <CODE>-mf</CODE> option can be found below in the | 178 <P>The explanation of the <CODE>-mf</CODE> option can be found below in the |