menc-feat-vcd-dvd.html

来自「MPlayer-mingw32-1.0rc2.zip 经典播放器源码」· HTML 代码 · 共 313 行 · 第 1/2 页

HTML
313
字号
</p></li><li><p>
  <span class="bold"><strong>vbitrate</strong></span>:
  1152 for VCD;
  up to 2500 for SVCD;
  up to 9800 for DVD.
  For the latter two formats, vbitrate should be set based on personal
  preference.
  For instance, if you insist on fitting 20 or so hours on a DVD, you
  could use vbitrate=400.
  The resulting video quality would probably be quite bad.
  If you are trying to squeeze out the maximum possible quality on a DVD,
  use vbitrate=9800, but be warned that this could constrain you to less
  than an hour of video on a single-layer DVD.
</p></li><li><p>
  <span class="bold"><strong>vstrict</strong></span>:
  <tt class="option">vstrict</tt>=0 should be used to create DVDs.
  Without this option, <span class="application">MEncoder</span> creates a
  stream that cannot be correctly decoded by some standalone DVD
  players.
</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-lavc-examples"></a>14.8.3.3.聽Examples</h4></div></div></div><p>
This is a typical minimum set of <tt class="option">-lavcopts</tt> for
encoding video:
</p><p>
VCD:
</p><pre class="screen">
-lavcopts vcodec=mpeg1video:vrc_buf_size=327:vrc_minrate=1152:\
vrc_maxrate=1152:vbitrate=1152:keyint=15:acodec=mp2
</pre><p>
</p><p>
SVCD:
</p><pre class="screen">
-lavcopts vcodec=mpeg2video:vrc_buf_size=917:vrc_maxrate=2500:vbitrate=1800:\
keyint=15:acodec=mp2
</pre><p>
</p><p>
DVD:
</p><pre class="screen">
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=15:vstrict=0:acodec=ac3
</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-lavc-advanced"></a>14.8.3.4.聽Advanced Options</h4></div></div></div><p>
For higher quality encoding, you may also wish to add quality-enhancing
options to lavcopts, such as <tt class="option">trell</tt>,
<tt class="option">mbd=2</tt>, and others.
Note that <tt class="option">qpel</tt> and <tt class="option">v4mv</tt>, while often
useful with MPEG-4, are not usable with MPEG-1 or MPEG-2.
Also, if you are trying to make a very high quality DVD encode, it may
be useful to add <tt class="option">dc=10</tt> to lavcopts.
Doing so may help reduce the appearance of blocks in flat-colored areas.
Putting it all together, this is an example of a set of lavcopts for a
higher quality DVD:
</p><p>
</p><pre class="screen">
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:\
keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:\
vqmin=1:lmin=1:dc=10:vstrict=0
</pre><p>
</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="menc-feat-vcd-dvd-audio"></a>14.8.4.聽Encoding Audio</h3></div></div></div><p>
VCD and SVCD support MPEG-1 layer II audio, using one of
<code class="systemitem">toolame</code>,
<code class="systemitem">twolame</code>,
or <code class="systemitem">libavcodec</code>'s MP2 encoder.
The libavcodec MP2 is far from being as good as the other two libraries,
however it should always be available to use.
VCD only supports constant bitrate audio (CBR) whereas SVCD supports
variable bitrate (VBR), too.
Be careful when using VBR because some bad standalone players might not
support it too well.
</p><p>
For DVD audio, <code class="systemitem">libavcodec</code>'s
AC-3 codec is used.
</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-audio-toolame"></a>14.8.4.1.聽toolame</h4></div></div></div><p>
For VCD and SVCD:
</p><pre class="screen">-oac toolame -toolameopts br=224</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-audio-twolame"></a>14.8.4.2.聽twolame</h4></div></div></div><p>
For VCD and SVCD:
</p><pre class="screen">-oac twolame -twolameopts br=224</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-audio-lavc"></a>14.8.4.3.聽libavcodec</h4></div></div></div><p>
For DVD with 2 channel sound:
</p><pre class="screen">-oac lavc -lavcopts acodec=ac3:abitrate=192</pre><p>
</p><p>
For DVD with 5.1 channel sound:
</p><pre class="screen">-channels 6 -oac lavc -lavcopts acodec=ac3:abitrate=384</pre><p>
</p><p>
For VCD and SVCD:
</p><pre class="screen">-oac lavc -lavcopts acodec=mp2:abitrate=224</pre><p>
</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="menc-feat-vcd-dvd-all"></a>14.8.5.聽Putting it all Together</h3></div></div></div><p>
This section shows some complete commands for creating VCD/SVCD/DVD
compliant videos.
</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-pal-dvd"></a>14.8.5.1.聽PAL DVD</h4></div></div></div><p>
</p><pre class="screen">
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
  -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \
  -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 \
  -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-ntsc-dvd"></a>14.8.5.2.聽NTSC DVD</h4></div></div></div><p>
</p><pre class="screen">
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
  -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 \
  -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=18:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 30000/1001 \
  -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-pal-ac3-copy"></a>14.8.5.3.聽PAL AVI Containing AC-3 Audio to DVD</h4></div></div></div><p>
If the source already has AC-3 audio, use -oac copy instead of re-encoding it.
</p><pre class="screen">
mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
  -vf scale=720:576,harddup -ofps 25 \
  -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=15:vstrict=0:aspect=16/9 -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-ntsc-ac3-copy"></a>14.8.5.4.聽NTSC AVI Containing AC-3 Audio to DVD</h4></div></div></div><p>
If the source already has AC-3 audio, and is NTSC @ 24000/1001 fps:
</p><pre class="screen">
mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf:telecine \
  -vf scale=720:480,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:\
  vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:aspect=16/9 -ofps 24000/1001 \
  -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-pal-svcd"></a>14.8.5.5.聽PAL SVCD</h4></div></div></div><p>
</p><pre class="screen">
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \
    scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
    vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:\
vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 25 \
    -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
  </pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-ntsc-svcd"></a>14.8.5.6.聽NTSC SVCD</h4></div></div></div><p>
</p><pre class="screen">
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd  -vf \
    scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
    vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:\
vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 30000/1001 \
    -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-pal-vcd"></a>14.8.5.7.聽PAL VCD</h4></div></div></div><p>
</p><pre class="screen">
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
    scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
    vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:\
vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \
    -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-ntsc-vcd"></a>14.8.5.8.聽NTSC VCD</h4></div></div></div><p>
</p><pre class="screen">
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
    scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
    vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:\
vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 \
    -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
</pre><p>
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="menc-feat-quicktime-7.html">Prev</a>聽</td><td width="20%" align="center"><a accesskey="u" href="encoding-guide.html">Up</a></td><td width="40%" align="right">聽<a accesskey="n" href="bugreports.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">14.7.聽Using <span class="application">MEncoder</span> to create
<span class="application">QuickTime</span>-compatible files聽</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">聽Appendix聽A.聽How to report bugs</td></tr></table></div></body></html>

⌨️ 快捷键说明

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