~ubuntu-branches/debian/squeeze/mplayer/squeeze

« back to all changes in this revision

Viewing changes to DOCS/HTML/zh_CN/menc-feat-vcd-dvd.html

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2010-07-31 23:44:52 UTC
  • mfrom: (1.1.4 upstream) (8.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100731234452-j7yyrgsh1wustazr
Tags: 2:1.0~rc3++final.dfsg1-1
* upload to unstable
* enable mencoder and mplayer-gui package
* build again against the system FFmpeg 0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>11.8. Using MEncoder to create VCD/SVCD/DVD-compliant files</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="encoding-guide.html" title="第 11 章 Encoding with MEncoder"><link rel="prev" href="menc-feat-quicktime-7.html" title="11.7. Using MEncoder to create QuickTime-compatible files"><link rel="next" href="faq.html" title="第 12 章 Frequently Asked Questions"><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"><link rel="subsection" href="menc-feat-vcd-dvd.html#menc-feat-vcd-dvd-constraints" title="11.8.1. Format Constraints"><link rel="subsection" href="menc-feat-vcd-dvd.html#menc-feat-vcd-dvd-output" title="11.8.2. Output Options"><link rel="subsection" href="menc-feat-vcd-dvd.html#menc-feat-vcd-dvd-lavc" title="11.8.3. Using libavcodec for VCD/SVCD/DVD Encoding"><link rel="subsection" href="menc-feat-vcd-dvd.html#menc-feat-vcd-dvd-audio" title="11.8.4. Encoding Audio"><link rel="subsection" href="menc-feat-vcd-dvd.html#menc-feat-vcd-dvd-all" title="11.8.5. Putting it all Together"></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">11.8. Using <span class="application">MEncoder</span>
 
2
  to create VCD/SVCD/DVD-compliant files</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="menc-feat-quicktime-7.html">上一页</a> </td><th width="60%" align="center">第 11 章 Encoding with <span class="application">MEncoder</span></th><td width="20%" align="right"> <a accesskey="n" href="faq.html">下一页</a></td></tr></table><hr></div><div class="sect1" title="11.8. Using MEncoder to create VCD/SVCD/DVD-compliant files"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="menc-feat-vcd-dvd"></a>11.8. Using <span class="application">MEncoder</span>
 
3
  to create VCD/SVCD/DVD-compliant files</h2></div></div></div><div class="sect2" title="11.8.1. Format Constraints"><div class="titlepage"><div><div><h3 class="title"><a name="menc-feat-vcd-dvd-constraints"></a>11.8.1. Format Constraints</h3></div></div></div><p>
 
4
<span class="application">MEncoder</span> is capable of creating VCD, SCVD
 
5
and DVD format MPEG files using the
 
6
<code class="systemitem">libavcodec</code> library.
 
7
These files can then be used in conjunction with
 
8
<a class="ulink" href="http://www.gnu.org/software/vcdimager/vcdimager.html" target="_top">vcdimager</a>
 
9
or
 
10
<a class="ulink" href="http://dvdauthor.sourceforge.net/" target="_top">dvdauthor</a>
 
11
to create discs that will play on a standard set-top player.
 
12
</p><p>
 
13
The DVD, SVCD, and VCD formats are subject to heavy constraints.
 
14
Only a small selection of encoded picture sizes and aspect ratios are
 
15
available.
 
16
If your movie does not already meet these requirements, you may have
 
17
to scale, crop or add black borders to the picture to make it
 
18
compliant.
 
19
</p><div class="sect3" title="11.8.1.1. Format Constraints"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-constraints-resolution"></a>11.8.1.1. Format Constraints</h4></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col><col><col><col><col><col><col></colgroup><thead><tr><th>Format</th><th>Resolution</th><th>V. Codec</th><th>V. Bitrate</th><th>Sample Rate</th><th>A. Codec</th><th>A. Bitrate</th><th>FPS</th><th>Aspect</th></tr></thead><tbody><tr><td>NTSC DVD</td><td>720x480, 704x480, 352x480, 352x240</td><td>MPEG-2</td><td>9800 kbps</td><td>48000 Hz</td><td>AC-3,PCM</td><td>1536 kbps (max)</td><td>30000/1001, 24000/1001</td><td>4:3, 16:9 (only for 720x480)</td></tr><tr><td>NTSC DVD</td><td>352x240<sup>[<a name="fn-rare-resolutions" href="#ftn.fn-rare-resolutions" class="footnote">a</a>]</sup></td><td>MPEG-1</td><td>1856 kbps</td><td>48000 Hz</td><td>AC-3,PCM</td><td>1536 kbps (max)</td><td>30000/1001, 24000/1001</td><td>4:3, 16:9</td></tr><tr><td>NTSC SVCD</td><td>480x480</td><td>MPEG-2</td><td>2600 kbps</td><td>44100 Hz</td><td>MP2</td><td>384 kbps (max)</td><td>30000/1001</td><td>4:3</td></tr><tr><td>NTSC VCD</td><td>352x240</td><td>MPEG-1</td><td>1150 kbps</td><td>44100 Hz</td><td>MP2</td><td>224 kbps</td><td>24000/1001, 30000/1001</td><td>4:3</td></tr><tr><td>PAL DVD</td><td>720x576, 704x576, 352x576, 352x288</td><td>MPEG-2</td><td>9800 kbps</td><td>48000 Hz</td><td>MP2,AC-3,PCM</td><td>1536 kbps (max)</td><td>25</td><td>4:3, 16:9 (only for 720x576)</td></tr><tr><td>PAL DVD</td><td>352x288<sup>[<a href="menc-feat-vcd-dvd.html#ftn.fn-rare-resolutions" class="footnoteref">a</a>]</sup></td><td>MPEG-1</td><td>1856 kbps</td><td>48000 Hz</td><td>MP2,AC-3,PCM</td><td>1536 kbps (max)</td><td>25</td><td>4:3, 16:9</td></tr><tr><td>PAL SVCD</td><td>480x576</td><td>MPEG-2</td><td>2600 kbps</td><td>44100 Hz</td><td>MP2</td><td>384 kbps (max)</td><td>25</td><td>4:3</td></tr><tr><td>PAL VCD</td><td>352x288</td><td>MPEG-1</td><td>1152 kbps</td><td>44100 Hz</td><td>MP2</td><td>224 kbps</td><td>25</td><td>4:3</td></tr></tbody><tbody class="footnotes"><tr><td colspan="9"><div class="footnote"><p><sup>[<a name="ftn.fn-rare-resolutions" href="#fn-rare-resolutions" class="para">a</a>] </sup>
 
20
  These resolutions are rarely used for DVDs because
 
21
  they are fairly low quality.</p></div></td></tr></tbody></table></div><p>
 
22
If your movie has 2.35:1 aspect (most recent action movies), you will
 
23
have to add black borders or crop the movie down to 16:9 to make a DVD or VCD.
 
24
If you add black borders, try to align them at 16-pixel boundaries in
 
25
order to minimize the impact on encoding performance.
 
26
Thankfully DVD has sufficiently excessive bitrate that you do not have
 
27
to worry too much about encoding efficiency, but SVCD and VCD are
 
28
highly bitrate-starved and require effort to obtain acceptable quality.
 
29
</p></div><div class="sect3" title="11.8.1.2. GOP Size Constraints"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-constraints-gop"></a>11.8.1.2. GOP Size Constraints</h4></div></div></div><p>
 
30
DVD, VCD, and SVCD also constrain you to relatively low
 
31
GOP (Group of Pictures) sizes.
 
32
For 30 fps material the largest allowed GOP size is 18.
 
33
For 25 or 24 fps, the maximum is 15.
 
34
The GOP size is set using the <tt class="option">keyint</tt> option.
 
35
</p></div><div class="sect3" title="11.8.1.3. Bitrate Constraints"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-constraints-bitrate"></a>11.8.1.3. Bitrate Constraints</h4></div></div></div><p>
 
36
VCD video is required to be CBR at 1152 kbps.
 
37
This highly limiting constraint also comes along with an extremely low vbv
 
38
buffer size of 327 kilobits.
 
39
SVCD allows varying video bitrates up to 2500 kbps, and a somewhat less
 
40
restrictive vbv buffer size of 917 kilobits is allowed.
 
41
DVD video bitrates may range anywhere up to 9800 kbps (though typical
 
42
bitrates are about half that), and the vbv buffer size is 1835 kilobits.
 
43
</p></div></div><div class="sect2" title="11.8.2. Output Options"><div class="titlepage"><div><div><h3 class="title"><a name="menc-feat-vcd-dvd-output"></a>11.8.2. Output Options</h3></div></div></div><p>
 
44
<span class="application">MEncoder</span> has options to control the output
 
45
format.
 
46
Using these options we can instruct it to create the correct type of
 
47
file.
 
48
</p><p>
 
49
The options for VCD and SVCD are called xvcd and xsvcd, because they
 
50
are extended formats.
 
51
They are not strictly compliant, mainly because the output does not
 
52
contain scan offsets.
 
53
If you need to generate an SVCD image, you should pass the output file to
 
54
<a class="ulink" href="http://www.gnu.org/software/vcdimager/vcdimager.html" target="_top">vcdimager</a>.
 
55
</p><p>
 
56
VCD:
 
57
</p><pre class="screen">-of mpeg -mpegopts format=xvcd</pre><p>
 
58
</p><p>
 
59
SVCD:
 
60
</p><pre class="screen">-of mpeg -mpegopts format=xsvcd</pre><p>
 
61
</p><p>
 
62
DVD (with timestamps on every frame, if possible):
 
63
</p><pre class="screen">-of mpeg -mpegopts format=dvd:tsaf</pre><p>
 
64
</p><p>
 
65
DVD with NTSC Pullup:
 
66
</p><pre class="screen">-of mpeg -mpegopts format=dvd:tsaf:telecine -ofps 24000/1001</pre><p>
 
67
This allows 24000/1001 fps progressive content to be encoded at 30000/1001
 
68
fps whilst maintaining DVD-compliance.
 
69
</p><div class="sect3" title="11.8.2.1. Aspect Ratio"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-output-aspect"></a>11.8.2.1. Aspect Ratio</h4></div></div></div><p>
 
70
The aspect argument of <tt class="option">-lavcopts</tt> is used to encode
 
71
the aspect ratio of the file.
 
72
During playback the aspect ratio is used to restore the video to the
 
73
correct size.
 
74
</p><p>
 
75
16:9 or "Widescreen"
 
76
</p><pre class="screen">-lavcopts aspect=16/9</pre><p>
 
77
</p><p>
 
78
4:3 or "Fullscreen"
 
79
</p><pre class="screen">-lavcopts aspect=4/3</pre><p>
 
80
</p><p>
 
81
2.35:1 or "Cinemascope" NTSC
 
82
</p><pre class="screen">-vf scale=720:368,expand=720:480 -lavcopts aspect=16/9</pre><p>
 
83
To calculate the correct scaling size, use the expanded NTSC width of
 
84
854/2.35 = 368
 
85
</p><p>
 
86
2.35:1 or "Cinemascope" PAL
 
87
</p><pre class="screen">-vf scale=720:432,expand=720:576 -lavcopts aspect=16/9</pre><p>
 
88
To calculate the correct scaling size, use the expanded PAL width of
 
89
1024/2.35 = 432
 
90
</p></div><div class="sect3" title="11.8.2.2. Maintaining A/V sync"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-a-v-sync"></a>11.8.2.2. Maintaining A/V sync</h4></div></div></div><p>
 
91
In order to maintain audio/video synchronization throughout the encode,
 
92
<span class="application">MEncoder</span> has to drop or duplicate frames.
 
93
This works rather well when muxing into an AVI file, but is almost
 
94
guaranteed to fail to maintain A/V sync with other muxers such as MPEG.
 
95
This is why it is necessary to append the
 
96
<tt class="option">harddup</tt> video filter at the end of the filter chain
 
97
to avoid this kind of problem.
 
98
You can find more technical information about <tt class="option">harddup</tt>
 
99
in the section
 
100
<a class="link" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-muxing-filter-issues" title="11.1.12.1. Improving muxing and A/V sync reliability">Improving muxing and A/V sync reliability</a>
 
101
or in the manual page.
 
102
</p></div><div class="sect3" title="11.8.2.3. Sample Rate Conversion"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-output-srate"></a>11.8.2.3. Sample Rate Conversion</h4></div></div></div><p>
 
103
If the audio sample rate in the original file is not the same as
 
104
required by the target format, sample rate conversion is required.
 
105
This is achieved using the <tt class="option">-srate</tt> option and
 
106
the <tt class="option">-af lavcresample</tt> audio filter together.
 
107
</p><p>
 
108
DVD:
 
109
</p><pre class="screen">-srate 48000 -af lavcresample=48000</pre><p>
 
110
</p><p>
 
111
VCD and SVCD:
 
112
</p><pre class="screen">-srate 44100 -af lavcresample=44100</pre><p>
 
113
</p></div></div><div class="sect2" title="11.8.3. Using libavcodec for VCD/SVCD/DVD Encoding"><div class="titlepage"><div><div><h3 class="title"><a name="menc-feat-vcd-dvd-lavc"></a>11.8.3. Using libavcodec for VCD/SVCD/DVD Encoding</h3></div></div></div><div class="sect3" title="11.8.3.1. Introduction"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-lavc-intro"></a>11.8.3.1. Introduction</h4></div></div></div><p>
 
114
<code class="systemitem">libavcodec</code> can be used to
 
115
create VCD/SVCD/DVD compliant video by using the appropriate options.
 
116
</p></div><div class="sect3" title="11.8.3.2. lavcopts"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-lavc-options"></a>11.8.3.2. lavcopts</h4></div></div></div><p>
 
117
This is a list of fields in <tt class="option">-lavcopts</tt> that you may
 
118
be required to change in order to make a complaint movie for VCD, SVCD,
 
119
or DVD:
 
120
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
 
121
  <span class="bold"><strong>acodec</strong></span>:
 
122
  <tt class="option">mp2</tt> for VCD, SVCD, or PAL DVD;
 
123
  <tt class="option">ac3</tt> is most commonly used for DVD.
 
124
  PCM audio may also be used for DVD, but this is mostly a big waste of
 
125
  space.
 
126
  Note that MP3 audio is not compliant for any of these formats, but
 
127
  players often have no problem playing it anyway.
 
128
</p></li><li class="listitem"><p>
 
129
  <span class="bold"><strong>abitrate</strong></span>:
 
130
  224 for VCD; up to 384 for SVCD; up to 1536 for  DVD, but commonly
 
131
  used values range from 192 kbps for stereo to 384 kbps for 5.1 channel
 
132
  sound.
 
133
</p></li><li class="listitem"><p>
 
134
  <span class="bold"><strong>vcodec</strong></span>:
 
135
  <tt class="option">mpeg1video</tt> for VCD;
 
136
  <tt class="option">mpeg2video</tt> for SVCD;
 
137
  <tt class="option">mpeg2video</tt> is usually used for DVD but you may also use
 
138
  <tt class="option">mpeg1video</tt> for CIF resolutions.
 
139
</p></li><li class="listitem"><p>
 
140
  <span class="bold"><strong>keyint</strong></span>:
 
141
  Used to set the GOP size.
 
142
  18 for 30fps material, or 15 for 25/24 fps material.
 
143
  Commercial producers seem to prefer keyframe intervals of 12.
 
144
  It is possible to make this much larger and still retain compatibility
 
145
  with most players.
 
146
  A <tt class="option">keyint</tt> of 25 should never cause any problems.
 
147
</p></li><li class="listitem"><p>
 
148
  <span class="bold"><strong>vrc_buf_size</strong></span>:
 
149
  327 for VCD, 917 for SVCD, and 1835 for DVD.
 
150
</p></li><li class="listitem"><p>
 
151
  <span class="bold"><strong>vrc_minrate</strong></span>:
 
152
  1152, for VCD. May be left alone for SVCD and DVD.
 
153
</p></li><li class="listitem"><p>
 
154
  <span class="bold"><strong>vrc_maxrate</strong></span>:
 
155
  1152 for VCD; 2500 for SVCD; 9800 for DVD.
 
156
  For SVCD and DVD, you might wish to use lower values depending on your
 
157
  own personal preferences and requirements.
 
158
</p></li><li class="listitem"><p>
 
159
  <span class="bold"><strong>vbitrate</strong></span>:
 
160
  1152 for VCD;
 
161
  up to 2500 for SVCD;
 
162
  up to 9800 for DVD.
 
163
  For the latter two formats, vbitrate should be set based on personal
 
164
  preference.
 
165
  For instance, if you insist on fitting 20 or so hours on a DVD, you
 
166
  could use vbitrate=400.
 
167
  The resulting video quality would probably be quite bad.
 
168
  If you are trying to squeeze out the maximum possible quality on a DVD,
 
169
  use vbitrate=9800, but be warned that this could constrain you to less
 
170
  than an hour of video on a single-layer DVD.
 
171
</p></li><li class="listitem"><p>
 
172
  <span class="bold"><strong>vstrict</strong></span>:
 
173
  <tt class="option">vstrict</tt>=0 should be used to create DVDs.
 
174
  Without this option, <span class="application">MEncoder</span> creates a
 
175
  stream that cannot be correctly decoded by some standalone DVD
 
176
  players.
 
177
</p></li></ul></div></div><div class="sect3" title="11.8.3.3. Examples"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-lavc-examples"></a>11.8.3.3. Examples</h4></div></div></div><p>
 
178
This is a typical minimum set of <tt class="option">-lavcopts</tt> for
 
179
encoding video:
 
180
</p><p>
 
181
VCD:
 
182
</p><pre class="screen">
 
183
-lavcopts vcodec=mpeg1video:vrc_buf_size=327:vrc_minrate=1152:\
 
184
vrc_maxrate=1152:vbitrate=1152:keyint=15:acodec=mp2
 
185
</pre><p>
 
186
</p><p>
 
187
SVCD:
 
188
</p><pre class="screen">
 
189
-lavcopts vcodec=mpeg2video:vrc_buf_size=917:vrc_maxrate=2500:vbitrate=1800:\
 
190
keyint=15:acodec=mp2
 
191
</pre><p>
 
192
</p><p>
 
193
DVD:
 
194
</p><pre class="screen">
 
195
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
 
196
keyint=15:vstrict=0:acodec=ac3
 
197
</pre><p>
 
198
</p></div><div class="sect3" title="11.8.3.4. Advanced Options"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-lavc-advanced"></a>11.8.3.4. Advanced Options</h4></div></div></div><p>
 
199
For higher quality encoding, you may also wish to add quality-enhancing
 
200
options to lavcopts, such as <tt class="option">trell</tt>,
 
201
<tt class="option">mbd=2</tt>, and others.
 
202
Note that <tt class="option">qpel</tt> and <tt class="option">v4mv</tt>, while often
 
203
useful with MPEG-4, are not usable with MPEG-1 or MPEG-2.
 
204
Also, if you are trying to make a very high quality DVD encode, it may
 
205
be useful to add <tt class="option">dc=10</tt> to lavcopts.
 
206
Doing so may help reduce the appearance of blocks in flat-colored areas.
 
207
Putting it all together, this is an example of a set of lavcopts for a
 
208
higher quality DVD:
 
209
</p><p>
 
210
</p><pre class="screen">
 
211
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:\
 
212
keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:\
 
213
vqmin=1:lmin=1:dc=10:vstrict=0
 
214
</pre><p>
 
215
</p></div></div><div class="sect2" title="11.8.4. Encoding Audio"><div class="titlepage"><div><div><h3 class="title"><a name="menc-feat-vcd-dvd-audio"></a>11.8.4. Encoding Audio</h3></div></div></div><p>
 
216
VCD and SVCD support MPEG-1 layer II audio, using one of
 
217
<code class="systemitem">toolame</code>,
 
218
<code class="systemitem">twolame</code>,
 
219
or <code class="systemitem">libavcodec</code>'s MP2 encoder.
 
220
The libavcodec MP2 is far from being as good as the other two libraries,
 
221
however it should always be available to use.
 
222
VCD only supports constant bitrate audio (CBR) whereas SVCD supports
 
223
variable bitrate (VBR), too.
 
224
Be careful when using VBR because some bad standalone players might not
 
225
support it too well.
 
226
</p><p>
 
227
For DVD audio, <code class="systemitem">libavcodec</code>'s
 
228
AC-3 codec is used.
 
229
</p><div class="sect3" title="11.8.4.1. toolame"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-audio-toolame"></a>11.8.4.1. toolame</h4></div></div></div><p>
 
230
For VCD and SVCD:
 
231
</p><pre class="screen">-oac toolame -toolameopts br=224</pre><p>
 
232
</p></div><div class="sect3" title="11.8.4.2. twolame"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-audio-twolame"></a>11.8.4.2. twolame</h4></div></div></div><p>
 
233
For VCD and SVCD:
 
234
</p><pre class="screen">-oac twolame -twolameopts br=224</pre><p>
 
235
</p></div><div class="sect3" title="11.8.4.3. libavcodec"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-audio-lavc"></a>11.8.4.3. libavcodec</h4></div></div></div><p>
 
236
For DVD with 2 channel sound:
 
237
</p><pre class="screen">-oac lavc -lavcopts acodec=ac3:abitrate=192</pre><p>
 
238
</p><p>
 
239
For DVD with 5.1 channel sound:
 
240
</p><pre class="screen">-channels 6 -oac lavc -lavcopts acodec=ac3:abitrate=384</pre><p>
 
241
</p><p>
 
242
For VCD and SVCD:
 
243
</p><pre class="screen">-oac lavc -lavcopts acodec=mp2:abitrate=224</pre><p>
 
244
</p></div></div><div class="sect2" title="11.8.5. Putting it all Together"><div class="titlepage"><div><div><h3 class="title"><a name="menc-feat-vcd-dvd-all"></a>11.8.5. Putting it all Together</h3></div></div></div><p>
 
245
This section shows some complete commands for creating VCD/SVCD/DVD
 
246
compliant videos.
 
247
</p><div class="sect3" title="11.8.5.1. PAL DVD"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-pal-dvd"></a>11.8.5.1. PAL DVD</h4></div></div></div><p>
 
248
</p><pre class="screen">
 
249
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
 
250
  -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \
 
251
  -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
 
252
keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 \
 
253
  -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
 
254
</pre><p>
 
255
</p></div><div class="sect3" title="11.8.5.2. NTSC DVD"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-ntsc-dvd"></a>11.8.5.2. NTSC DVD</h4></div></div></div><p>
 
256
</p><pre class="screen">
 
257
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
 
258
  -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 \
 
259
  -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
 
260
keyint=18:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 30000/1001 \
 
261
  -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
 
262
</pre><p>
 
263
</p></div><div class="sect3" title="11.8.5.3. PAL AVI Containing AC-3 Audio to DVD"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-pal-ac3-copy"></a>11.8.5.3. PAL AVI Containing AC-3 Audio to DVD</h4></div></div></div><p>
 
264
If the source already has AC-3 audio, use -oac copy instead of re-encoding it.
 
265
</p><pre class="screen">
 
266
mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
 
267
  -vf scale=720:576,harddup -ofps 25 \
 
268
  -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
 
269
keyint=15:vstrict=0:aspect=16/9 -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
 
270
</pre><p>
 
271
</p></div><div class="sect3" title="11.8.5.4. NTSC AVI Containing AC-3 Audio to DVD"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-ntsc-ac3-copy"></a>11.8.5.4. NTSC AVI Containing AC-3 Audio to DVD</h4></div></div></div><p>
 
272
If the source already has AC-3 audio, and is NTSC @ 24000/1001 fps:
 
273
</p><pre class="screen">
 
274
mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf:telecine \
 
275
  -vf scale=720:480,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:\
 
276
  vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:aspect=16/9 -ofps 24000/1001 \
 
277
  -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
 
278
</pre><p>
 
279
</p></div><div class="sect3" title="11.8.5.5. PAL SVCD"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-pal-svcd"></a>11.8.5.5. PAL SVCD</h4></div></div></div><p>
 
280
</p><pre class="screen">
 
281
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \
 
282
    scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
 
283
    vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:\
 
284
vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224:aspect=16/9 -ofps 25 \
 
285
    -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
 
286
  </pre><p>
 
287
</p></div><div class="sect3" title="11.8.5.6. NTSC SVCD"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-ntsc-svcd"></a>11.8.5.6. NTSC SVCD</h4></div></div></div><p>
 
288
</p><pre class="screen">
 
289
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd  -vf \
 
290
    scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
 
291
    vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:\
 
292
vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224:aspect=16/9 -ofps 30000/1001 \
 
293
    -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
 
294
</pre><p>
 
295
</p></div><div class="sect3" title="11.8.5.7. PAL VCD"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-pal-vcd"></a>11.8.5.7. PAL VCD</h4></div></div></div><p>
 
296
</p><pre class="screen">
 
297
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
 
298
    scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
 
299
    vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:\
 
300
vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224:aspect=16/9 -ofps 25 \
 
301
    -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
 
302
</pre><p>
 
303
</p></div><div class="sect3" title="11.8.5.8. NTSC VCD"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-vcd-dvd-all-ntsc-vcd"></a>11.8.5.8. NTSC VCD</h4></div></div></div><p>
 
304
</p><pre class="screen">
 
305
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
 
306
    scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
 
307
    vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:\
 
308
vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224:aspect=16/9 -ofps 30000/1001 \
 
309
    -o <em class="replaceable"><code>movie.mpg</code></em> <em class="replaceable"><code>movie.avi</code></em>
 
310
</pre><p>
 
311
</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">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="encoding-guide.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="faq.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">11.7. Using <span class="application">MEncoder</span> to create
 
312
<span class="application">QuickTime</span>-compatible files </td><td width="20%" align="center"><a accesskey="h" href="index.html">起始页</a></td><td width="40%" align="right" valign="top"> 第 12 章 Frequently Asked Questions</td></tr></table></div></body></html>