Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > a42e22ddf1d70fb02e9f62289d71cafa > files > 842

mplayer-doc-1.0-1.rc4.0.r31086.3.1mdv2010.2.i586.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>10.5. 编码为MPEG格式</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="MPlayer - 电影播放器"><link rel="up" href="mencoder.html" title="第 10 章 MEncoder的基础用法"><link rel="prev" href="menc-feat-handheld-psp.html" title="10.4. 编码为Sony PSP视频格式"><link rel="next" href="menc-feat-rescale.html" title="10.6. 改变电影大小"><link rel="preface" href="howtoread.html" title="如何阅读此文档"><link rel="chapter" href="intro.html" title="第 1 章 介绍"><link rel="chapter" href="install.html" title="第 2 章 Installation"><link rel="chapter" href="usage.html" title="第 3 章 Usage"><link rel="chapter" href="advaudio.html" title="第 4 章 Advanced audio usage"><link rel="chapter" href="cd-dvd.html" title="第 5 章 CD/DVD用法"><link rel="chapter" href="video.html" title="第 6 章 Video output devices"><link rel="chapter" href="tv.html" title="第 7 章 TV"><link rel="chapter" href="radio.html" title="第 8 章 广播电台"><link rel="chapter" href="ports.html" title="第 9 章 Ports"><link rel="chapter" href="mencoder.html" title="第 10 章 MEncoder的基础用法"><link rel="chapter" href="encoding-guide.html" title="第 11 章 Encoding with MEncoder"><link rel="chapter" href="faq.html" title="第 12 章 Frequently Asked Questions"><link rel="appendix" href="bugreports.html" title="附录 A. 如何报告错误"><link rel="appendix" href="skin.html" title="附录 B. MPlayer skin format"></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">10.5. 编码为MPEG格式</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="menc-feat-handheld-psp.html">上一页</a> </td><th width="60%" align="center">第 10 章 <span class="application">MEncoder</span>的基础用法</th><td width="20%" align="right"> <a accesskey="n" href="menc-feat-rescale.html">下一页</a></td></tr></table><hr></div><div class="sect1" title="10.5. 编码为MPEG格式"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="menc-feat-mpeg"></a>10.5. 编码为MPEG格式</h2></div></div></div><p>
<span class="application">MEncoder</span>可生成MPEG (MPEG-节目流)格式的文件。
通常,当你使用MPEG-1或MPEG-2视频,是因为你的编码受限于SVCD, VCD, 或DVD。
这些格式所需的特别要求将在
<a class="link" href="menc-feat-vcd-dvd.html" title="11.8. Using MEncoder to create VCD/SVCD/DVD-compliant files"> VCD及DVD生成指南 </a>
中进行解释
section.
</p><p>
要改变<span class="application">MEncoder</span>的输出文件格式,使用
<tt class="option">-of mpeg</tt>选项。
</p><div class="informalexample"><p>
例如:
</p><pre class="screen">
mencoder <em class="replaceable"><code>input.avi</code></em> -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video \
    -oac copy <em class="replaceable"><code>other_options</code></em> -o <em class="replaceable"><code>output.mpg</code></em>
</pre><p>
可生成为只有有限多媒体支持的系统进行播放的MPEG-1文件,例如默认安装的Windows:
</p><pre class="screen">
mencoder <em class="replaceable"><code>input.avi</code></em> -of mpeg -mpegopts format=mpeg1:tsaf:muxrate=2000 \
    -o <em class="replaceable"><code>output.mpg</code></em> -oac lavc -lavcopts acodec=mp2:abitrate=224 -ovc lavc \
    -lavcopts vcodec=mpeg1video:vbitrate=1152:keyint=15:mbd=2:aspect=4/3
</pre><p>
同上,但使用了<code class="systemitem">libavformat</code> MPEG混合器:
</p><pre class="screen">
mencoder <em class="replaceable"><code>input.avi</code></em> -o <em class="replaceable"><code>VCD.mpg</code></em> -ofps 25 -vf scale=352:288,harddup -of lavf \
    -lavfopts format=mpg:i_certify_that_my_video_stream_does_not_use_b_frames \
    -oac lavc -lavcopts acodec=mp2:abitrate=224 -ovc lavc \
    -lavcopts vcodec=mpeg1video:vrc_buf_size=327:keyint=15:vrc_maxrate=1152:vbitrate=1152:vmax_b_frames=0
</pre><p>
</p></div><div class="note" title="提示:" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">提示:</h3><p>
如果由于某种原因,第二次编码的效果不能令你满意,你可以使用另外一种比特律
重新执行视频编码,只要你保存了前一次编码中生成的统计文件。
这是可行因为生成统计文件的主要目的是记录每桢的复杂度,不是特别依赖于比特律。
然而,你要注意的是如果所有编码按照与最终生成文件的比特律相差不大的参数执行
程序,你将得到最佳效果。
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="menc-feat-handheld-psp.html">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="mencoder.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="menc-feat-rescale.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">10.4. 编码为Sony PSP视频格式 </td><td width="20%" align="center"><a accesskey="h" href="index.html">起始页</a></td><td width="40%" align="right" valign="top"> 10.6. 改变电影大小</td></tr></table></div></body></html>