Mercurial > mplayer.hg
comparison DOCS/encoding.html @ 8035:533e212cd282
document new 2pass syntax, remove/fix lots of obsolete junk in docs
author | rfelker |
---|---|
date | Sat, 02 Nov 2002 05:42:11 +0000 |
parents | 988498df1996 |
children | 630360b15089 |
comparison
equal
deleted
inserted
replaced
8034:933c769d7fd5 | 8035:533e212cd282 |
---|---|
104 commands are needed:<BR> | 104 commands are needed:<BR> |
105 <CODE> rm frameno.avi</CODE> - remove this file, which | 105 <CODE> rm frameno.avi</CODE> - remove this file, which |
106 can come from a previous 3-pass encoding (it interferes with current | 106 can come from a previous 3-pass encoding (it interferes with current |
107 one)<BR> | 107 one)<BR> |
108 <CODE> mencoder -dvd 2 -ovc lavc -lavcopts | 108 <CODE> mencoder -dvd 2 -ovc lavc -lavcopts |
109 vcodec=mpeg4:more_options -oac copy -o movie.avi -pass 1<BR> | 109 vcodec=mpeg4:vpass=1:more_options -oac copy -o movie.avi<BR> |
110 mencoder -dvd 2 -ovc lavc -lavcopts | 110 mencoder -dvd 2 -ovc lavc -lavcopts |
111 vcodec=mpeg4:more_options -oac copy -o movie.avi -pass 2</CODE></P> | 111 vcodec=mpeg4:vpass=2:more_options -oac copy -o movie.avi</CODE></P> |
112 | 112 |
113 <P><U><B>3-pass encoding:</B></U> this is an extension of 2-pass encoding, | 113 <P><U><B>3-pass encoding:</B></U> this is an extension of 2-pass encoding, |
114 where the audio encoding takes place in a separate pass. This method enables | 114 where the audio encoding takes place in a separate pass. This method enables |
115 estimation of recommended video bitrate in order to fit on a CD. Also, the | 115 estimation of recommended video bitrate in order to fit on a CD. Also, the |
116 audio is encoded only once, unlike in 2-pass mode. The schematics:</P> | 116 audio is encoded only once, unlike in 2-pass mode. The schematics:</P> |
124 <B>only</B> the requested audio stream. Don't forget <CODE>-lameopts</CODE>, | 124 <B>only</B> the requested audio stream. Don't forget <CODE>-lameopts</CODE>, |
125 if you need to set it. If you were encoding a long movie, MEncoder | 125 if you need to set it. If you were encoding a long movie, MEncoder |
126 prints the recommended bitrate values for 650Mb, 700Mb, and 800Mb | 126 prints the recommended bitrate values for 650Mb, 700Mb, and 800Mb |
127 destination sizes, after this pass finishes.</P></LI> | 127 destination sizes, after this pass finishes.</P></LI> |
128 <LI>Second pass: | 128 <LI>Second pass: |
129 <P><CODE>mencoder <file/DVD> -oac copy -pass 1 | 129 <P><CODE>mencoder <file/DVD> -oac copy |
130 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=<bitrate></CODE></P> | 130 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=<bitrate></CODE></P> |
131 <P>Alias the first pass of DivX4 video encoding. | 131 <P>Alias the first pass of DivX4 video encoding. |
132 Optionally specify the video bitrate MEncoder printed at the end of | 132 Optionally specify the video bitrate MEncoder printed at the end of |
133 the previous pass.</P></LI> | 133 the previous pass.</P></LI> |
134 <LI>Third pass: | 134 <LI>Third pass: |
135 <P><CODE>mencoder <file/DVD> -oac copy -pass 2 | 135 <P><CODE>mencoder <file/DVD> -oac copy |
136 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=<bitrate></CODE></P> | 136 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2:vbitrate=<bitrate></CODE></P> |
137 <P>Alias the second pass of DivX4 video encoding. | 137 <P>Alias the second pass of DivX4 video encoding. |
138 Optionally specify the video bitrate MEncoder printed at the end of | 138 Optionally specify the video bitrate MEncoder printed at the end of |
139 the previous pass. In this pass, audio from <CODE>frameno.avi</CODE> will | 139 the previous pass. In this pass, audio from <CODE>frameno.avi</CODE> will |
140 be inserted into the destination file.. and it's all ready!</P></LI> | 140 be inserted into the destination file.. and it's all ready!</P></LI> |
141 </OL> | 141 </OL> |
146 which can come from a previous 3-pass encoding (it interferes with current | 146 which can come from a previous 3-pass encoding (it interferes with current |
147 one)<BR> | 147 one)<BR> |
148 <CODE> mencoder -dvd 2 -ovc frameno | 148 <CODE> mencoder -dvd 2 -ovc frameno |
149 -o frameno.avi -oac mp3lame -lameopts vbr=3:more_options<BR> | 149 -o frameno.avi -oac mp3lame -lameopts vbr=3:more_options<BR> |
150 mencoder -dvd 2 -ovc lavc | 150 mencoder -dvd 2 -ovc lavc |
151 -lavcopts vcodec=mpeg4:more_options -oac copy -o movie.avi -pass 1<BR> | 151 -lavcopts vcodec=mpeg4:vpass=1:more_options -oac copy -o movie.avi<BR> |
152 mencoder -dvd 2 -ovc lavc | 152 mencoder -dvd 2 -ovc lavc |
153 -lavcopts vcodec=mpeg4:more_options -oac copy -o movie.avi -pass 2</CODE></P> | 153 -lavcopts vcodec=mpeg4:vpass=2:more_options -oac copy -o movie.avi</CODE></P> |
154 | 154 |
155 <P><U><B>2 or 3-pass encoding using internal libavcodec controller:</B></U> | 155 <P><U><B>2 or 3-pass encoding using internal libavcodec controller:</B></U> |
156 Optionally you can use libavcodec's internal 2 or 3-pass mode, it may give | 156 Optionally you can use libavcodec's internal 2 or 3-pass mode, it may give |
157 you better final rate accuracy than using the external, DivX4-inspired 2-pass | 157 you better final rate accuracy than using the external, DivX4-inspired 2-pass |
158 rate controler with libavcodec.</P> | 158 rate controler with libavcodec.</P> |
159 | 159 |
160 <UL> | 160 <UL> |
161 <LI><B>2-pass encoding:</B><BR> | 161 <LI><B>2-pass encoding:</B><BR> |
162 <CODE>rm -f lavc_stats.txt<BR> | 162 <CODE> |
163 mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 (audio-options) -o | 163 mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 (audio-options) -o |
164 movie.avi<BR> | 164 movie.avi<BR> |
165 mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 (audio-options) -o | 165 mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 (audio-options) -o |
166 movie.avi</CODE></LI> | 166 movie.avi</CODE></LI> |
167 <LI><B>3-pass encoding:</B><BR> | 167 <LI><B>3-pass encoding:</B><BR> |
168 <CODE>rm -f frameno.avi lavc_stats.txt<BR> | 168 <CODE>rm -f frameno.avi<BR> |
169 mencoder -dvd 2 -ovc frameno (audio-options) -o frameno.avi<BR> | 169 mencoder -dvd 2 -ovc frameno (audio-options) -o frameno.avi<BR> |
170 mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o | 170 mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o |
171 movie.avi<BR> | 171 movie.avi<BR> |
172 mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac copy -o | 172 mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac copy -o |
173 movie.avi</CODE></LI> | 173 movie.avi</CODE></LI> |
330 | 330 |
331 <P><I>Copying two subtitles from a DVD while doing 3-pass encoding</I><BR> | 331 <P><I>Copying two subtitles from a DVD while doing 3-pass encoding</I><BR> |
332 <CODE>rm subtitles.idx subtitles.sub</CODE><BR> | 332 <CODE>rm subtitles.idx subtitles.sub</CODE><BR> |
333 <CODE>mencoder -dvd 1 -vobsubout subtitles -vobsuboutindex 0 | 333 <CODE>mencoder -dvd 1 -vobsubout subtitles -vobsuboutindex 0 |
334 -sid 2 -o frameno.avi -ovc frameno -oac mp3lame -lameopts vbr=3</CODE><BR> | 334 -sid 2 -o frameno.avi -ovc frameno -oac mp3lame -lameopts vbr=3</CODE><BR> |
335 <CODE>mencoder -dvd 1 -oac copy -ovc divx4 -pass 1</CODE><BR> | 335 <CODE>mencoder -dvd 1 -oac copy -ovc divx4 -divx4opts pass=1</CODE><BR> |
336 <CODE>mencoder -dvd 1 -oac copy -ovc divx4 -pass 2 -vobsubout | 336 <CODE>mencoder -dvd 1 -oac copy -ovc divx4 -divx4opts pass=2 -vobsubout |
337 subtitles -vobsuboutindex 1 -sid 5</CODE></P> | 337 subtitles -vobsuboutindex 1 -sid 5</CODE></P> |
338 | 338 |
339 <P><I>Copying a french subtitle from an MPEG file</I><BR> | 339 <P><I>Copying a french subtitle from an MPEG file</I><BR> |
340 <CODE>rm subtitles.idx subtitles.sub</CODE><BR> | 340 <CODE>rm subtitles.idx subtitles.sub</CODE><BR> |
341 <CODE>mencoder movie.mpg -ifo movie.ifo -vobsubout subtitles | 341 <CODE>mencoder movie.mpg -ifo movie.ifo -vobsubout subtitles |