⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menc-feat-selecting-codec.html

📁 MPlayer-mingw32-1.0rc2.zip 经典播放器源码
💻 HTML
字号:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>13.1.聽Selecting codecs and container formats</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="MPlayer - The Movie Player"><link rel="up" href="mencoder.html" title="Chapter聽13.聽Basic usage of MEncoder"><link rel="prev" href="mencoder.html" title="Chapter聽13.聽Basic usage of MEncoder"><link rel="next" href="menc-feat-selecting-input.html" title="13.2.聽Selecting input file or device"><link rel="preface" href="howtoread.html" title="How to read this documentation"><link rel="chapter" href="intro.html" title="Chapter聽1.聽Introduction"><link rel="chapter" href="install.html" title="Chapter聽2.聽Installation"><link rel="chapter" href="usage.html" title="Chapter聽3.聽Usage"><link rel="chapter" href="cd-dvd.html" title="Chapter聽4.聽CD/DVD usage"><link rel="chapter" href="faq.html" title="Chapter聽5.聽Frequently Asked Questions"><link rel="chapter" href="containers.html" title="Chapter聽6.聽Containers"><link rel="chapter" href="codecs.html" title="Chapter聽7.聽Codecs"><link rel="chapter" href="video.html" title="Chapter聽8.聽Video output devices"><link rel="chapter" href="audio.html" title="Chapter聽9.聽Audio output devices"><link rel="chapter" href="tv.html" title="Chapter聽10.聽TV"><link rel="chapter" href="radio.html" title="Chapter聽11.聽Radio"><link rel="chapter" href="ports.html" title="Chapter聽12.聽Ports"><link rel="chapter" href="mencoder.html" title="Chapter聽13.聽Basic usage of MEncoder"><link rel="chapter" href="encoding-guide.html" title="Chapter聽14.聽Encoding with MEncoder"><link rel="appendix" href="bugreports.html" title="Appendix聽A.聽How to report bugs"><link rel="appendix" href="bugs.html" title="Appendix聽B.聽Known bugs"><link rel="appendix" href="skin.html" title="Appendix聽C.聽MPlayer skin format"><link rel="appendix" href="history.html" title="Appendix聽D.聽History"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">13.1.聽Selecting codecs and container formats</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mencoder.html">Prev</a>聽</td><th width="60%" align="center">Chapter聽13.聽Basic usage of <span class="application">MEncoder</span></th><td width="20%" align="right">聽<a accesskey="n" href="menc-feat-selecting-input.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="menc-feat-selecting-codec"></a>13.1.聽Selecting codecs and container formats</h2></div></div></div><p>
Audio and video codecs for encoding are selected with the
<tt class="option">-oac</tt> and <tt class="option">-ovc</tt> options, respectively.
Type for instance:
</p><pre class="screen">mencoder -ovc help</pre><p>
to list all video codecs supported by the version of
<span class="application">MEncoder</span> on your machine.
The following choices are available:
</p><p>
Audio Codecs:
</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Audio codec name</th><th>Description</th></tr></thead><tbody><tr><td>mp3lame</td><td>encode to VBR, ABR or CBR MP3 with LAME</td></tr><tr><td>lavc</td><td>use one of <a class="link" href="menc-feat-enc-libavcodec.html#menc-feat-enc-libavcodec-audio-codecs" title="14.3.2.聽libavcodec's audio codecs"><code class="systemitem">libavcodec</code>'s audio codecs</a></td></tr><tr><td>faac</td><td>FAAC AAC audio encoder</td></tr><tr><td>toolame</td><td>MPEG Audio Layer 2 encoder</td></tr><tr><td>twolame</td><td>MPEG Audio Layer 2 encoder based on tooLAME</td></tr><tr><td>pcm</td><td>uncompressed PCM audio</td></tr><tr><td>copy</td><td>do not reencode, just copy compressed frames</td></tr></tbody></table></div><p>
</p><p>
Video codecs:
</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Video codec name</th><th>Description</th></tr></thead><tbody><tr><td>lavc</td><td>use one of <a class="link" href="menc-feat-enc-libavcodec.html#menc-feat-enc-libavcodec-video-codecs" title="14.3.1.聽libavcodec's video codecs"><code class="systemitem">libavcodec</code>'s video codecs</a></td></tr><tr><td>xvid</td><td>Xvid, MPEG-4 Advanced Simple Profile (ASP) codec</td></tr><tr><td>x264</td><td>x264, MPEG-4 Advanced Video Coding (AVC), AKA H.264 codec</td></tr><tr><td>nuv</td><td>nuppel video, used by some realtime applications</td></tr><tr><td>raw</td><td>uncompressed video frames</td></tr><tr><td>copy</td><td>do not reencode, just copy compressed frames</td></tr><tr><td>frameno</td><td>used for 3-pass encoding (not recommended)</td></tr></tbody></table></div><p>
</p><p>
Output container formats are selected with the <tt class="option">-of</tt>
option.
Type:
</p><pre class="screen">mencoder -of help</pre><p>
to list all containers supported by the version of
<span class="application">MEncoder</span> on your machine.
The following choices are available:
</p><p>
Container formats:
</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Container format name</th><th>Description</th></tr></thead><tbody><tr><td>lavf</td><td>one of the containers supported by
  <code class="systemitem">libavformat</code></td></tr><tr><td>avi</td><td>Audio-Video Interleaved</td></tr><tr><td>mpeg</td><td>MPEG-1 and MPEG-2 PS</td></tr><tr><td>rawvideo</td><td>raw video stream (no muxing - one video stream only)</td></tr><tr><td>rawaudio</td><td>raw audio stream (no muxing - one audio stream only)</td></tr></tbody></table></div><p>
The AVI container is the native container format for
<span class="application">MEncoder</span>, which means that it's the one that
is best handled, and the one for which <span class="application">MEncoder</span>
was designed.
As noted above, other container formats are usable, but you may
experience problems when using them.
</p><p>
<code class="systemitem">libavformat</code> containers:
</p><p>
If you selected <code class="systemitem">libavformat</code>
to do the muxing of the output file (by using the <tt class="option">-of lavf</tt>),
the appropriate container format will be determined by the file extension
of the output file.
You may force a particular container format with
<code class="systemitem">libavformat</code>'s
<tt class="option">format</tt> option.

</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th><code class="systemitem">libavformat</code> container name</th><th>Description</th></tr></thead><tbody><tr><td>mpg</td><td>MPEG-1 and MPEG-2 PS</td></tr><tr><td>asf</td><td>Advanced Streaming Format</td></tr><tr><td>avi</td><td>Audio-Video Interleaved</td></tr><tr><td>wav</td><td>Waveform Audio</td></tr><tr><td>swf</td><td>Macromedia Flash</td></tr><tr><td>flv</td><td>Macromedia Flash video</td></tr><tr><td>rm</td><td>RealMedia</td></tr><tr><td>au</td><td>SUN AU</td></tr><tr><td>nut</td><td>NUT open container (experimental and not yet spec-compliant)</td></tr><tr><td>mov</td><td>QuickTime</td></tr><tr><td>mp4</td><td>MPEG-4 format</td></tr><tr><td>dv</td><td>Sony Digital Video container</td></tr><tr><td>mkv</td><td>Matroska open audio/video container</td></tr></tbody></table></div><p>
As you can see, <code class="systemitem">libavformat</code>
allows <span class="application">MEncoder</span> to mux into a considerable
variety of containers.
Unfortunately, as <span class="application">MEncoder</span> was not designed
from the beginning to support container formats other than AVI,
your should really be paranoid about the resulting file.
Please check to be sure that the audio/video synchronization is OK
and that the file can be played correctly by players other than
<span class="application">MPlayer</span>.
</p><div class="example"><a name="encode_to_macromedia_flash_format"></a><p class="title"><b>Example聽13.1.聽encode to Macromedia Flash format</b></p><div class="example-contents"><p>
Creating a Macromedia Flash video suitable for playback in a web browser
with the Macromedia Flash plugin:
</p><pre class="screen">
mencoder <em class="replaceable"><code>input.avi</code></em> -o <em class="replaceable"><code>output.flv</code></em> -of lavf \
    -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc \
    -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3
</pre><p>
</p></div></div><br class="example-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mencoder.html">Prev</a>聽</td><td width="20%" align="center"><a accesskey="u" href="mencoder.html">Up</a></td><td width="40%" align="right">聽<a accesskey="n" href="menc-feat-selecting-input.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter聽13.聽Basic usage of <span class="application">MEncoder</span>聽</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">聽13.2.聽Selecting input file or device</td></tr></table></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -