Mercurial > mplayer.hg
diff DOCS/encoding.html @ 4397:970a09005860
3-pass encoding dox
author | gabucino |
---|---|
date | Mon, 28 Jan 2002 14:01:29 +0000 |
parents | cab4ac1467e4 |
children | 55c8aefdef1b |
line wrap: on
line diff
--- a/DOCS/encoding.html Mon Jan 28 08:37:58 2002 +0000 +++ b/DOCS/encoding.html Mon Jan 28 14:01:29 2002 +0000 @@ -9,11 +9,10 @@ <P><B>MEncoder</B> (<B>MPlayer</B>'s Movie Encoder) is a simple movie encoder, designed to encode MPlayer-playable movies -(<B>AVI/DVD/VCD/VOB/MPG/MOV/VIV/FLI/RM/NUV/NET</B>) to other MPlayer-playable formats (see -below). Currently it's in beta stage, and encodes only to <B>DivX4</B> (1 or 2 -passes) video, <B>PCM</B>/<B>MP3</B>/<B>VBRMP3</B> audio. Also has stream -copying abilities. In the future, there will be cropping, resizing filters, and -other interesting stuff.</P> +(<B>AVI/DVD/VCD/VOB/MPG/MOV/VIV/FLI/RM/NUV/NET</B>) to other MPlayer-playable +formats (see below). It can encode with various codecs, like <B>DivX4</B> (1 or +2 passes), libavcodec, <B>PCM</B>/<B>MP3</B>/<B>VBRMP3</B> audio. Also has +stream copying and video resizing abilities.</P> <P><B><A NAME=2.4.2>2.4.2. Compiling</B></P> @@ -54,7 +53,7 @@ <A HREF=codecs.html#2.2.1.2>libavcodec</A></LI> <LI>video encoding from <B>V4L compatible TV tuners</B></LI> <LI>encoding/multiplexing to interleaved AVI files with proper index</LI> - <LI>1 or 2 pass <B>DivX4</B> video</LI> + <LI>1, 2 or 3 pass <B>DivX4</B> video</LI> <LI><B>VBR</B> MP3 audio - <B>IMPORTANT NOTE</B> : VBR MP3 audio doesn't always play nicely on windows players! If you intend to encode AVIs mainly for windows, encode with CBR!</LI> @@ -77,9 +76,9 @@ </UL> </P> -<P><B><A NAME=2.4.3.1>2.4.3.1. Encoding 2-pass DivX4</B></P> +<P><B><A NAME=2.4.3.1>2.4.3.1. Encoding 2 or 3-pass DivX4</B></P> -<P>The name comes from the fact that this method encodes the file <I>twice</I>. +<P><U><B>2-pass encoding :</B></U> the name comes from the fact that this method encodes the file <I>twice</I>. The first encoding (dubbed <I>pass</I>) creates some temporary files (*.log) with a size of few megabytes, do not delete them yet (you can delete the AVI). In the second pass, the 2-pass output file is created, using the bitrate data from the temporary files. The resulting @@ -88,9 +87,71 @@ <P>This example shows how to encode a DVD to a 2-pass DivX4 AVI. Just two commands are needed :<BR> -<CODE> mencoder -dvd 2 -ovc divx4 -oac mp3lame -divx4opts br=1100 +<CODE> rm frameno.avi</CODE> - remove this file, which + can come from a previous 3-pass encoding (it interferes with current one)<BR> +<CODE> mencoder -dvd 2 -divx4opts br=1100 -o movie.avi -pass 1<BR> - mencoder -dvd 2 -ovc divx4 -oac mp3lame -divx4opts br=1100 -o movie.avi -pass 2</CODE></P> + mencoder -dvd 2 -divx4opts br=1100 -o movie.avi -pass 2</CODE></P> + +<P><U><B>3-pass encoding :</B></U> this is an extension of 2-pass encoding, + where the audio encoding takes place in a separate pass. This method enables + estimation of recommended video bitrate in order to fit on a CD. Also, the + audio is encoded only once, unlike in 2-pass mode. The schematics :</P> + +<P> + <TABLE> + <TR> + <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> + <CODE>rm frameno.avi</CODE></TD> + <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> + <B>remove conflicting temporary file</B></TD> + </TR> + <TR> + <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> + <CODE>mencoder <file/DVD> -ovc frameno -o + frameno.avi</CODE></TD> + <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> + <B><U>First pass</U> : an audio-only avi file will be created, containing + ONLY the requested audio stream. Don't forget <CODE>-lameopts</CODE>, if + you need to set it. If you were encoding a long movie, MEncoder prints + the recommended bitrate values for 650Mb, 700Mb, and 800Mb destination + sizes, after this pass finishes.</B></TD> + </TR> + <TR> + <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> + <CODE>mencoder <file/DVD> -oac copy -pass 1 + -divx4opts br=<bitrate></CODE></TD> + <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> + <B><U>Second pass</U> : alias the first pass of DivX4 video encoding. + Optionally specify the video bitrate MEncoder printed at the end of the + previous pass.</B></TD> + </TR> + <TR> + <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> + <CODE>mencoder <file/DVD> -oac copy -pass 2 + -divx4opts br=<bitrate></CODE></TD> + <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> + <B><U>Third pass</U> : alias the second pass of DivX4 video encoding. + Optionally specify the video bitrate MEncoder printed at the end of the + previous pass. In this pass, audio from <CODE>frameno.avi</CODE> will be + inserted into the destination file.. and it's all ready!</B></TD> + </TR> + </TABLE> +</P> + +<P><B>Example for 3-pass encoding :</B></P> + +<P><CODE> rm frameno.avi</CODE> - remove this file, + which can come from a previous 3-pass encoding (it interferes with current + one)<BR> +<CODE> mencoder -dvd 2 -ovc frameno + -o frameno.avi<BR> +<CODE> mencoder -dvd 2 + -divx4opts br=1100 -oac copy -o movie.avi -pass 1<BR> + mencoder -dvd 2 + -divx4opts br=1100 -oac copy -o movie.avi -pass 2</CODE> +</P> + <P><B><A NAME=2.4.3.2>2.4.3.2. Rescaling movies</B></P>