Mercurial > mplayer.hg
diff DOCS/encoding.html @ 6974:916f62dd0910
Another big batch of cosmetics *only*.
2 character indentation everywhere, 2 blank lines before new sections.
The docs should now have a nice and uniform look.
author | diego |
---|---|
date | Sun, 11 Aug 2002 18:27:38 +0000 |
parents | 87deea511b1f |
children | 83a386e88f9e |
line wrap: on
line diff
--- a/DOCS/encoding.html Sun Aug 11 18:07:42 2002 +0000 +++ b/DOCS/encoding.html Sun Aug 11 18:27:38 2002 +0000 @@ -12,6 +12,7 @@ <P><B><A NAME="encoding">2.4 Encoding with MEncoder</A></B></P> + <P><B><A NAME="overview">2.4.1 Overview</A></B></P> <P><B>MEncoder</B> (<B>MPlayer</B>'s Movie Encoder) is a simple movie encoder, @@ -22,6 +23,7 @@ <B>PCM</B>/<B>MP3</B>/<B>VBR MP3</B> audio. Also has powerful plugin system for video manipulation.</P> + <P><B><A NAME="compilation">2.4.2 Compilation</A></B></P> <UL> @@ -55,6 +57,7 @@ <P>You are ready. As you probably know, other encoding tools need the <I>avifile</I> library installed. <B>MEncoder</B> doesn't need it at all.</P> + <P><B><A NAME="features">2.4.3 MEncoder features</A></B></P> <UL> @@ -86,6 +89,7 @@ <LI>audio encoding from v4l (DONE for FreeBSD ?)</LI> </UL> + <P><B><A NAME="2pass">2.4.3.1 Encoding 2 or 3-pass DivX4</A></B></P> <P><U><B>2-pass encoding:</B></U> the name comes from the fact that this method @@ -113,34 +117,34 @@ audio is encoded only once, unlike in 2-pass mode. The schematics:</P> <TABLE> -<TR> - <TD> <CODE>rm frameno.avi</CODE></TD> - <TD> <B>remove conflicting temporary file</B></TD> -</TR> -<TR> - <TD> <CODE>mencoder <file/DVD> -ovc frameno -o + <TR> + <TD><CODE>rm frameno.avi</CODE></TD> + <TD><B>remove conflicting temporary file</B></TD> + </TR> + <TR> + <TD><CODE>mencoder <file/DVD> -ovc frameno -o frameno.avi</CODE></TD> - <TD> <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> <CODE>mencoder <file/DVD> -oac copy -pass 1 + <TD><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><CODE>mencoder <file/DVD> -oac copy -pass 1 -ovc divx4 -divx4opts br=<bitrate></CODE></TD> - <TD> <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> <CODE>mencoder <file/DVD> -oac copy -pass 2 + <TD><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><CODE>mencoder <file/DVD> -oac copy -pass 2 -ovc divx4 -divx4opts br=<bitrate></CODE></TD> - <TD> <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> + <TD><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><B>Example for 3-pass encoding:</B></P> @@ -153,8 +157,7 @@ mencoder -dvd 2 -lavcopts vcodec=mpeg4:more_options -oac copy -o movie.avi -pass 1<BR> mencoder -dvd 2 - -lavcopts vcodec=mpeg4:more_options -oac copy -o movie.avi -pass 2</CODE> -</P> + -lavcopts vcodec=mpeg4:more_options -oac copy -o movie.avi -pass 2</CODE></P> <P><U><B>2 or 3-pass encoding using internal libavcodec controller:</B></U> Optionally you can use libavcodec's internal 2 or 3-pass mode, it may give @@ -177,6 +180,7 @@ movie.avi</CODE></LI> </UL> + <P><B><A NAME="rescaling">2.4.3.2 Rescaling movies</A></B></P> <P>Often the need to resize movie images' size emerges. Its reasons can be many, @@ -265,8 +269,7 @@ <P><B>Explanation of the process</B></P> <P><B>MEncoder</B> <I>decodes</I> the input image(s) with <CODE>libjpeg</CODE> - (when decoding PNGs, it will use <B>libpng</B>). -</P> + (when decoding PNGs, it will use <B>libpng</B>).</P> <P><B>MEncoder</B> then feeds the decoded image to the chosen video compressor (DivX4, Xvid, ffmpeg msmpeg4, etc...). Watch for the PNG decoder, as @@ -349,116 +352,118 @@ <P>NOTE: for all available options, <B>read the man page!</B></P> -<P> - As <B>MEncoder</B> is built on the same codebase as <B>MPlayer</B>, there +<P>As <B>MEncoder</B> is built on the same codebase as <B>MPlayer</B>, there are many <B>MPlayer</B> options that have function in <B>MEncoder</B> too! See, you can use <CODE>-sid</CODE> to rip a DVD with subtitles, or - <CODE>-noidx</CODE> to disregard buggy index of input AVI. <B>Be smart!</B> -</P> + <CODE>-noidx</CODE> to disregard buggy index of input AVI. <B>Be smart!</B></P> <TABLE BORDER=1> -<TR> - <TD> <CODE>-ss</CODE> time</TD> - <TD> start encoding from the given time (can start only from keyframes!) - </TD> -</TR> -<TR> - <TD> <CODE>-endpos</CODE> time</TD> - <TD> stop encoding at the given time. See the man page for examples! - </TD> -</TR> -<TR> - <TD> <CODE>-o</CODE> filename</TD> - <TD> specify output filename - </TD> -</TR> -<TR> - <TD> <CODE>-sws</CODE> 0-2</TD> - <TD> type of scaling method<BR> - 0 - fast bilinear<BR> - 1 - bilinear<BR> - 2 - bicubic (best quality)<BR> - </TD> -</TR> -<TR> - <TD> <CODE>-ovc</CODE> codecname</TD> - <TD> Encode with the given codec (codec names are from codecs.conf). Examples:<BR> - <B>help</B> - get list of available codecs<BR> - <B>rawrgb</B> - ?<BR> - <B>copy</B> - no encoding, just copy the stream (only from AVI/ASF now)<BR> - <B>divx4</B> - encode to DivX4<BR> - <B>lavc</B> - encode with a codec from libavcodec<BR> - <B>vfw</B> - encode with a Windows DLL<BR> - </TD> -</TR> -<TR> - <TD> <CODE>-oac</CODE> codecname</TD> - <TD> Encode with the given codec (codec names are from codecs.conf). Examples:<BR> - <B>help</B> - get list of available codecs<BR> - <B>copy</B> - no encoding, just copy the stream (only from AVI/ASF now)<BR> - <B>pcm</B> - encode to uncompressed PCM<BR> - <B>mp3lame</B> - encode to MP3 (using Lame)<BR> - </TD> -</TR> -<TR> - <TD> <CODE>-mf</CODE> multifile options</TD> - <TD> Used when encoding from multiple JPEG files. Its sub-options are:<BR> - <B>on</B> - turns on multifile support<BR> - <B>w</B>=<value> - width of the output file<BR> - <B>h</B>=<value> - height of the output file<BR> - <B>fps</B>=<value> - fps of the output file<BR> - <B>type</B>=<value> - type of input files (available types: <CODE>jpeg</CODE>, <CODE>png</CODE>)<BR> - </TD> -</TR> - -<TR> - <TD> <CODE>-divx4opts</CODE></TD> - <TD> If encoding to DivX4, you can specify its parameters here, like:<BR> - <CODE>-divx4opts br=1800:deinterlace:key=250</CODE><BR> - Common options: <B>(for full list, check the man page!)</B><BR> - <B>help</B> - get help<BR> - <B>br</B>=<value> - specify bitrate in kbit <4-16000> or bit <16001-24000000><BR> - <B>q</B>=<value> - quality (1-fastest, 5-best - default 5)<BR> - <B>key</B>=<value> - keyframe interval<BR> - </TD> -</TR> -<TR> - <TD> <CODE>-lavcopts</CODE></TD> - <TD> If encoding with libavcodec, you can specify its parameters here, like:<BR> - <CODE>-lavcopts vcodec=msmpeg4:vbitrate=1800:vhq:keyint=250</CODE><BR> - Common options: <B>(for full list, check the man page!)</B><BR> - <B>help</B> - get help<BR> - <B>vcodec</B>=<value> - select videocodec (for the full list, see the libavcodec section above)<BR> - <B>vbitrate</B>=<value> - specify bitrate in kbit <4-16000> or bit <16001-24000000><BR> - <B>vhq</B> - high quality<BR> - <B>keyint</B>=<value> - keyframe interval<BR> - </TD> -</TR> -<TR> - <TD> <CODE>-lameopts</CODE></TD> - <TD> If encoding to MP3 with libmp3lame, you can specify its parameters here, like:<BR> - <CODE>-lameopts q=3</CODE><BR> - <CODE>-lameopts br=192:cbr</CODE><BR> - Common options: <B>(for full list, check the man page!)</B><BR> - <B>help</B> - get help<BR> - <B>cbr</B> - select <B>CBR</B> MP3 (default is <B>VBR</B>)<BR> - <B>br</B>=<value> - specify bitrate in kbit <0-1024> (this is for <B>CBR</B> only!)<BR> - <B>q</B>=<value> - quality (0-highest, 9-fastest - default 0) (this is for <B>VBR</B> only!)<BR> - <B>vbr</B>=<value> - VBR sub-mode (3-ABR, best quality/speed) (this is for <B>VBR</B> only!)<BR> - </TD> -</TR> -<TR> - <TD> <CODE>-vobsubout</CODE> basename</TD> - <TD> Specify the basename for the output <CODE>.idx</CODE> and <CODE>.sub</CODE> files. This turns off subtitle rendering on the encoded movie.</TD> -</TR> -<TR> - <TD> <CODE>-vobsuboutindex</CODE> index</TD> - <TD> Specify the index of the subtitles in the output files. Defaults to 0.</TD> -</TR> -<TR> - <TD> <CODE>-vobsuboutid</CODE> langid</TD> - <TD> Specify the language two letter code for the subtitles. This overrides what is read from the DVD or the <CODE>.ifo</CODE> file.</TD> -</TR> + <TR> + <TD><CODE>-ss</CODE> time</TD> + <TD>start encoding from the given time (can start only from keyframes!) + </TD> + </TR> + <TR> + <TD><CODE>-endpos</CODE> time</TD> + <TD>stop encoding at the given time. See the man page for examples! + </TD> + </TR> + <TR> + <TD><CODE>-o</CODE> filename</TD> + <TD>specify output filename + </TD> + </TR> + <TR> + <TD><CODE>-sws</CODE> 0-2</TD> + <TD>type of scaling method<BR> + 0 - fast bilinear<BR> + 1 - bilinear<BR> + 2 - bicubic (best quality)<BR> + </TD> + </TR> + <TR> + <TD><CODE>-ovc</CODE> codecname</TD> + <TD>Encode with the given codec (codec names are from codecs.conf). Examples:<BR> + <B>help</B> - get list of available codecs<BR> + <B>rawrgb</B> - ?<BR> + <B>copy</B> - no encoding, just copy the stream (only from AVI/ASF now)<BR> + <B>divx4</B> - encode to DivX4<BR> + <B>lavc</B> - encode with a codec from libavcodec<BR> + <B>vfw</B> - encode with a Windows DLL<BR> + </TD> + </TR> + <TR> + <TD><CODE>-oac</CODE> codecname</TD> + <TD>Encode with the given codec (codec names are from codecs.conf). Examples:<BR> + <B>help</B> - get list of available codecs<BR> + <B>copy</B> - no encoding, just copy the stream (only from AVI/ASF now)<BR> + <B>pcm</B> - encode to uncompressed PCM<BR> + <B>mp3lame</B> - encode to MP3 (using Lame)<BR> + </TD> + </TR> + <TR> + <TD><CODE>-mf</CODE> multifile options</TD> + <TD>Used when encoding from multiple JPEG files. Its sub-options are:<BR> + <B>on</B> - turns on multifile support<BR> + <B>w</B>=<value> - width of the output file<BR> + <B>h</B>=<value> - height of the output file<BR> + <B>fps</B>=<value> - fps of the output file<BR> + <B>type</B>=<value> - type of input files (available types: + <CODE>jpeg</CODE>, <CODE>png</CODE>)<BR> + </TD> + </TR> + + <TR> + <TD><CODE>-divx4opts</CODE></TD> + <TD>If encoding to DivX4, you can specify its parameters here, like:<BR> + <CODE>-divx4opts br=1800:deinterlace:key=250</CODE><BR> + Common options: <B>(for full list, check the man page!)</B><BR> + <B>help</B> - get help<BR> + <B>br</B>=<value> - specify bitrate in kbit <4-16000> + or bit <16001-24000000><BR> + <B>q</B>=<value> - quality (1-fastest, 5-best - default 5)<BR> + <B>key</B>=<value> - keyframe interval<BR> + </TD> + </TR> + <TR> + <TD><CODE>-lavcopts</CODE></TD> + <TD>If encoding with libavcodec, you can specify its parameters here, like:<BR> + <CODE>-lavcopts vcodec=msmpeg4:vbitrate=1800:vhq:keyint=250</CODE><BR> + Common options: <B>(for full list, check the man page!)</B><BR> + <B>help</B> - get help<BR> + <B>vcodec</B>=<value> - select videocodec (for the full list, see the libavcodec section above)<BR> + <B>vbitrate</B>=<value> - specify bitrate in kbit <4-16000> or bit <16001-24000000><BR> + <B>vhq</B> - high quality<BR> + <B>keyint</B>=<value> - keyframe interval<BR> + </TD> + </TR> + <TR> + <TD><CODE>-lameopts</CODE></TD> + <TD>If encoding to MP3 with libmp3lame, you can specify its parameters here, like:<BR> + <CODE>-lameopts q=3</CODE><BR> + <CODE>-lameopts br=192:cbr</CODE><BR> + Common options: <B>(for full list, check the man page!)</B><BR> + <B>help</B> - get help<BR> + <B>cbr</B> - select <B>CBR</B> MP3 (default is <B>VBR</B>)<BR> + <B>br</B>=<value> - specify bitrate in kbit <0-1024> (this is for <B>CBR</B> only!)<BR> + <B>q</B>=<value> - quality (0-highest, 9-fastest - default 0) (this is for <B>VBR</B> only!)<BR> + <B>vbr</B>=<value> - VBR sub-mode (3-ABR, best quality/speed) (this is for <B>VBR</B> only!)<BR> + </TD> + </TR> + <TR> + <TD><CODE>-vobsubout</CODE> basename</TD> + <TD>Specify the basename for the output <CODE>.idx</CODE> and <CODE>.sub</CODE> + files. This turns off subtitle rendering on the encoded movie.</TD> + </TR> + <TR> + <TD><CODE>-vobsuboutindex</CODE> index</TD> + <TD>Specify the index of the subtitles in the output files. Defaults to 0.</TD> + </TR> + <TR> + <TD><CODE>-vobsuboutid</CODE> langid</TD> + <TD>Specify the language two letter code for the subtitles. This overrides + what is read from the DVD or the <CODE>.ifo</CODE> file.</TD> + </TR> </TABLE> <P><B><A NAME="examples">2.4.6 Examples</A></B></P>