Mercurial > mplayer.hg
annotate DOCS/xml/en/mencoder.xml @ 21732:893e314fff49
Reformatting round continued
author | torinthiel |
---|---|
date | Sat, 23 Dec 2006 23:20:42 +0000 |
parents | 8e7fd27dd79c |
children | 089c303ef2c9 |
rev | line source |
---|---|
20535 | 1 <?xml version="1.0" encoding="utf-8"?> |
10913
49b1a67e7381
Add revision keyword to english xml files, to ease translation synchronization
lumag
parents:
10869
diff
changeset
|
2 <!-- $Revision$ --> |
9675 | 3 <chapter id="mencoder"> |
16080
baae7cdb0726
re-organize MEncoder doc in a more sensible way: splitting "basic mencoder usage" and "encoding with mencoder".
gpoirier
parents:
16020
diff
changeset
|
4 <title>Basic usage of <application>MEncoder</application></title> |
9675 | 5 |
6 <para> | |
7 For the complete list of available <application>MEncoder</application> options | |
8 and examples, please see the man page. For a series of hands-on examples and | |
9 detailed guides on using several encoding parameters, read the | |
10 <ulink url="../../tech/encoding-tips.txt">encoding-tips</ulink> that were | |
15029 | 11 collected from several mailing list threads on MPlayer-users. Search the |
19679 | 12 <ulink url="http://lists.mplayerhq.hu/pipermail/mplayer-users/">archives</ulink> |
9675 | 13 for a wealth of discussions about all aspects of and problems related to |
14 encoding with <application>MEncoder</application>. | |
15 </para> | |
16 | |
21450 | 17 |
18 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> | |
19 | |
20 | |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
21 <sect1 id="menc-feat-selecting-codec"> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
22 <title>Selecting codecs and container formats</title> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
23 |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
24 <para> |
21449 | 25 Audio and video codecs for encoding are selected with the |
26 <option>-oac</option> and <option>-ovc</option> options, respectively. | |
27 Type for instance: | |
28 <screen>mencoder -ovc help</screen> | |
29 to list all video codecs supported by the version of | |
30 <application>MEncoder</application> on your machine. | |
31 The following choices are available: | |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
32 </para> |
21450 | 33 |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
34 <para> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
35 Audio Codecs: |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
36 <informaltable frame="all"> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
37 <tgroup cols="2"> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
38 <thead> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
39 <row><entry>Audio codec name</entry><entry>Description</entry></row> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
40 </thead> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
41 <tbody> |
21521 | 42 <row> |
43 <entry>mp3lame</entry> | |
44 <entry>encode to VBR, ABR or CBR MP3 with LAME</entry> | |
45 </row> | |
46 <row> | |
47 <entry>lavc</entry> | |
21732 | 48 <entry>use one of <link linkend="menc-feat-enc-libavcodec-audio-codecs"><systemitem class="library">libavcodec</systemitem>'s audio codecs</link></entry> |
21521 | 49 </row> |
50 <row> | |
51 <entry>faac</entry> | |
52 <entry>FAAC AAC audio encoder</entry> | |
53 </row> | |
54 <row> | |
55 <entry>toolame</entry> | |
56 <entry>MPEG Audio Layer 2 encoder</entry> | |
57 </row> | |
58 <row> | |
59 <entry>twolame</entry> | |
60 <entry>MPEG Audio Layer 2 encoder based on tooLAME</entry> | |
61 </row> | |
62 <row> | |
63 <entry>pcm</entry> | |
64 <entry>uncompressed PCM audio</entry> | |
65 </row> | |
66 <row> | |
67 <entry>copy</entry> | |
68 <entry>do not reencode, just copy compressed frames</entry> | |
69 </row> | |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
70 </tbody> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
71 </tgroup> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
72 </informaltable> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
73 </para> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
74 |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
75 <para> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
76 Video codecs: |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
77 <informaltable frame="all"> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
78 <tgroup cols="2"> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
79 <thead> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
80 <row><entry>Video codec name</entry><entry>Description</entry></row> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
81 </thead> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
82 <tbody> |
21521 | 83 <row> |
84 <entry>lavc</entry> | |
21732 | 85 <entry>use one of <link linkend="menc-feat-enc-libavcodec-video-codecs"><systemitem class="library">libavcodec</systemitem>'s video codecs</link></entry> |
21521 | 86 </row> |
87 <row> | |
88 <entry>xvid</entry> | |
89 <entry>Xvid, MPEG-4 Advanced Simple Profile (ASP) codec</entry> | |
90 </row> | |
91 <row> | |
92 <entry>x264</entry> | |
93 <entry>x264, MPEG-4 Advanced Video Coding (AVC), AKA H.264 codec</entry> | |
94 </row> | |
95 <row> | |
96 <entry>nuv</entry> | |
97 <entry>nuppel video, used by some realtime applications</entry> | |
98 </row> | |
99 <row> | |
100 <entry>raw</entry> | |
101 <entry>uncompressed video frames</entry> | |
102 </row> | |
103 <row> | |
104 <entry>copy</entry> | |
105 <entry>do not reencode, just copy compressed frames</entry> | |
106 </row> | |
107 <row> | |
108 <entry>frameno</entry> | |
109 <entry>used for 3-pass encoding (not recommended)</entry> | |
110 </row> | |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
111 </tbody> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
112 </tgroup> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
113 </informaltable> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
114 </para> |
21450 | 115 |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
116 <para> |
21449 | 117 Output container formats are selected with the <option>-of</option> |
118 option. | |
119 Type: | |
120 <screen>mencoder -of help</screen> | |
121 to list all containers supported by the version of | |
122 <application>MEncoder</application> on your machine. | |
123 The following choices are available: | |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
124 </para> |
21450 | 125 |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
126 <para> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
127 Container formats: |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
128 <informaltable frame="all"> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
129 <tgroup cols="2"> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
130 <thead> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
131 <row><entry>Container format name</entry><entry>Description</entry></row> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
132 </thead> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
133 <tbody> |
21521 | 134 <row> |
135 <entry>lavf</entry> | |
136 <entry>one of the containers supported by | |
137 <systemitem class="library">libavformat</systemitem></entry> | |
138 </row> | |
139 <row> | |
140 <entry>avi</entry> | |
141 <entry>Audio-Video Interleaved</entry> | |
142 </row> | |
143 <row> | |
144 <entry>mpeg</entry> | |
145 <entry>MPEG-1 and MPEG-2 PS</entry> | |
146 </row> | |
147 <row> | |
148 <entry>rawvideo</entry> | |
149 <entry>raw video stream (no muxing - one video stream only)</entry> | |
150 </row> | |
151 <row> | |
152 <entry>rawaudio</entry> | |
153 <entry>raw audio stream (no muxing - one audio stream only)</entry> | |
154 </row> | |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
155 </tbody> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
156 </tgroup> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
157 </informaltable> |
21449 | 158 The AVI container is the native container format for |
159 <application>MEncoder</application>, which means that it's the one that | |
160 is best handled, and the one for which <application>MEncoder</application> | |
161 was designed. | |
162 As noted above, other container formats are usable, but you may | |
163 experience problems when using them. | |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
164 </para> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
165 |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
166 <para> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
167 <systemitem class="library">libavformat</systemitem> containers: |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
168 </para> |
21450 | 169 |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
170 <para> |
21449 | 171 If you selected <systemitem class="library">libavformat</systemitem> |
172 to do the muxing of the output file (by using the <option>-of lavf</option>), | |
173 the appropriate container format will be determined by the file extension | |
174 of the output file. | |
175 You may force a particular container format with | |
176 <systemitem class="library">libavformat</systemitem>'s | |
177 <option>format</option> option. | |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
178 |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
179 <informaltable frame="all"> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
180 <tgroup cols="2"> |
21450 | 181 <thead><row> |
182 <entry><systemitem class="library">libavformat</systemitem> container name</entry> | |
183 <entry>Description</entry> | |
184 </row></thead> | |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
185 <tbody> |
21521 | 186 <row> |
187 <entry>mpg</entry> | |
188 <entry>MPEG-1 and MPEG-2 PS</entry> | |
189 </row> | |
190 <row> | |
191 <entry>asf</entry> | |
192 <entry>Advanced Streaming Format</entry> | |
193 </row> | |
194 <row> | |
195 <entry>avi</entry> | |
196 <entry>Audio-Video Interleaved</entry> | |
197 </row> | |
198 <row> | |
199 <entry>wav</entry> | |
200 <entry>Waveform Audio</entry> | |
201 </row> | |
202 <row> | |
203 <entry>swf</entry> | |
204 <entry>Macromedia Flash</entry> | |
205 </row> | |
206 <row> | |
207 <entry>flv</entry> | |
208 <entry>Macromedia Flash video</entry> | |
209 </row> | |
210 <row> | |
211 <entry>rm</entry> | |
212 <entry>RealMedia</entry> | |
213 </row> | |
214 <row> | |
215 <entry>au</entry> | |
216 <entry>SUN AU</entry> | |
217 </row> | |
218 <row> | |
219 <entry>nut</entry> | |
220 <entry>NUT open container (experimental and not yet spec-compliant)</entry> | |
221 </row> | |
222 <row> | |
223 <entry>mov</entry> | |
224 <entry>QuickTime</entry> | |
225 </row> | |
226 <row> | |
227 <entry>mp4</entry> | |
228 <entry>MPEG-4 format</entry> | |
229 </row> | |
230 <row> | |
231 <entry>dv</entry> | |
232 <entry>Sony Digital Video container</entry> | |
233 </row> | |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
234 </tbody> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
235 </tgroup> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
236 </informaltable> |
21449 | 237 As you can see, <systemitem class="library">libavformat</systemitem> |
238 allows <application>MEncoder</application> to mux into a considerable | |
239 variety of containers. | |
240 Unfortunately, as <application>MEncoder</application> was not designed | |
241 from the beginning to support container formats other than AVI, | |
242 your should really be paranoid about the resulting file. | |
243 Please check to be sure that the audio/video synchronization is OK | |
244 and that the file can be played correctly by players other than | |
245 <application>MPlayer</application>. | |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
246 </para> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
247 |
21521 | 248 <example> |
249 <title>encode to Macromedia Flash format</title> | |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
250 <para> |
21449 | 251 Creating a Macromedia Flash video suitable for playback in a web browser |
252 with the Macromedia Flash plugin: | |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
253 <screen> |
21408 | 254 mencoder <replaceable>input.avi</replaceable> -o <replaceable>output.flv</replaceable> -of lavf \ |
255 -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc \ | |
256 -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 | |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
257 </screen> |
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
258 </para> |
21521 | 259 </example> |
16746
14a22bff8228
List the different containers supported by MEncoder, as well as a nice example of how to produce flash videos. + a bit a clean-up.
gpoirier
parents:
16560
diff
changeset
|
260 |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
261 </sect1> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
262 |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
263 |
21450 | 264 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
265 | |
266 | |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
267 <sect1 id="menc-feat-selecting-input"> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
268 <title>Selecting input file or device</title> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
269 |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
270 <para> |
21449 | 271 <application>MEncoder</application> can encode from files or directly |
272 from a DVD or VCD disc. | |
273 Simply include the filename on the command line to encode from a file, | |
274 or <option>dvd://</option><replaceable>titlenumber</replaceable> or | |
275 <option>vcd://</option><replaceable>tracknumber</replaceable> to encode | |
276 from a DVD title or VCD track. | |
277 If you have already copied a DVD to your hard drive (you can use a tool | |
278 such as <application>dvdbackup</application>, available on most systems), | |
279 and wish to encode from the copy, you should still use the | |
280 <option>dvd://</option> syntax, along with <option>-dvd-device</option> | |
281 followed by the path to the copied DVD root. | |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
282 |
21449 | 283 The <option>-dvd-device</option> and <option>-cdrom-device</option> |
284 options can also be used to override the paths to the device nodes | |
285 for reading directly from disc, if the defaults of | |
286 <filename>/dev/dvd</filename> and <filename>/dev/cdrom</filename> do | |
287 not work on your system. | |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
288 </para> |
21450 | 289 |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
290 <para> |
21449 | 291 When encoding from DVD, it is often desirable to select a chapter or |
292 range of chapters to encode. | |
293 You can use the <option>-chapter</option> option for this purpose. | |
294 For example, <option>-chapter</option> <replaceable>1-4</replaceable> | |
295 will only encode chapters 1 through 4 from the DVD. | |
296 This is especially useful if you will be making a 1400 MB encode | |
297 targetted for two CDs, since you can ensure the split occurs exactly | |
298 at a chapter boundary rather than in the middle of a scene. | |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
299 </para> |
21450 | 300 |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
301 <para> |
21449 | 302 If you have a supported TV capture card, you can also encode from the |
303 TV-in device. | |
304 Use <option>tv://</option><replaceable>channelnumber</replaceable> as | |
305 the filename, and <option>-tv</option> to configure various capture | |
306 settings. | |
307 DVB input works similarly. | |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
308 </para> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
309 </sect1> |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
310 |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
311 |
21450 | 312 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
313 | |
314 | |
12400
903ac68f2bc8
divx --> lavc, spelling, more sensible section name
diego
parents:
12399
diff
changeset
|
315 <sect1 id="menc-feat-mpeg4"> |
21596 | 316 <title>Encoding two pass MPEG-4 ("DivX")</title> |
9675 | 317 |
318 <para> | |
21521 | 319 The name comes from the fact that this method encodes the file |
320 <emphasis>twice</emphasis>. The first encoding (dubbed pass) creates some | |
321 temporary files (<filename>*.log</filename>) with a size of few megabytes, do | |
322 not delete them yet (you can delete the AVI or rather just not create any video | |
323 by redirecting it into <filename>/dev/null</filename>). | |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
324 In the second pass, the two pass output |
9675 | 325 file is created, using the bitrate data from the temporary files. The |
326 resulting file will have much better image quality. If this is the first | |
327 time you heard about this, you should consult some guides available on the | |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
328 net. |
9675 | 329 </para> |
330 | |
20035 | 331 <example id="copy_audio_track"> |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
332 <title>copy audio track</title> |
9675 | 333 <para> |
21596 | 334 Two pass encode of the second track a DVD to an MPEG-4 ("DivX") |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
335 AVI while copying the audio track. |
9675 | 336 <screen> |
17039 | 337 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o /dev/null |
21408 | 338 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 \ |
339 -oac copy -o <replaceable>output.avi</replaceable> | |
9675 | 340 </screen> |
341 </para> | |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
342 </example> |
9675 | 343 |
20035 | 344 <example id="encode_audio_track"> |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
345 <title>encode audio track</title> |
9675 | 346 <para> |
21596 | 347 Two pass encode of a DVD to an MPEG-4 ("DivX") AVI while encoding |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
348 the audio track to MP3. |
16534
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
349 Be careful using this method as it may lead to audio/video desync in |
cf10f859d829
Lists main A/V codecs supported by MEncoder, talks about how to select an imput file for encoding.
gpoirier
parents:
16228
diff
changeset
|
350 some cases. |
9675 | 351 <screen> |
21408 | 352 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 \ |
353 -oac mp3lame -lameopts vbr=3 -o /dev/null | |
354 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 \ | |
355 -oac mp3lame -lameopts vbr=3 -o <replaceable>output.avi</replaceable> | |
9675 | 356 </screen> |
357 </para> | |
358 </example> | |
359 </sect1> | |
360 | |
19260 | 361 |
21450 | 362 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
363 | |
364 | |
19260 | 365 <sect1 id="menc-feat-handheld-psp"> |
366 <title>Encoding to Sony PSP video format</title> | |
367 | |
368 <para> | |
21449 | 369 <application>MEncoder</application> supports encoding to Sony PSP's video |
370 format, but, depending on the revision of the PSP software, the constraints | |
371 may differ. | |
372 You should be safe if you respect the following constraints: | |
19260 | 373 <itemizedlist> |
374 <listitem><para> | |
375 <emphasis role="bold">Bitrate</emphasis>: it should not exceed 1500kbps, | |
376 however, past versions supported pretty much any bitrate as long as the | |
377 header claimed it was not too high. | |
378 </para></listitem> | |
379 <listitem><para> | |
380 <emphasis role="bold">Dimensions</emphasis>: the width and height of the | |
381 PSP video should be multiples of 16, and the product width * height must | |
382 be <= 64000. | |
383 Under some circumstances, it may be possible for the PSP to play higher | |
384 resolutions. | |
385 </para></listitem> | |
386 <listitem><para> | |
20037 | 387 <emphasis role="bold">Audio</emphasis>: its samplerate should be 24kHz |
388 for MPEG-4 videos, and 48kHz for H.264. | |
19260 | 389 </para></listitem> |
390 </itemizedlist> | |
391 </para> | |
392 | |
20035 | 393 <example id="encode_for_psp"> |
394 <title>encode for PSP</title> | |
19260 | 395 <para> |
396 <screen> | |
21409 | 397 mencoder -ofps 30000/1001 -af lavcresample=24000 -vf harddup -of lavf \ |
21449 | 398 -oac lavc -ovc lavc -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=aac \ |
399 -lavfopts format=psp:i_certify_that_my_video_stream_does_not_use_b_frames \ | |
400 <replaceable>input.video</replaceable> -o <replaceable>output.psp</replaceable> | |
19260 | 401 </screen> |
21449 | 402 Note that you can set the title of the video with |
403 <option>-info name=<replaceable>MovieTitle</replaceable></option>. | |
19260 | 404 </para> |
405 </example> | |
406 </sect1> | |
407 | |
408 | |
21450 | 409 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
410 | |
411 | |
9675 | 412 <sect1 id="menc-feat-mpeg"> |
413 <title>Encoding to MPEG format</title> | |
21732 | 414 |
9675 | 415 <para> |
416 <application>MEncoder</application> can create MPEG (MPEG-PS) format output | |
16157
809452f0da6e
Fix outdated "Encoding to MPEG format" (MEncoder improved a lot :-) )
gpoirier
parents:
16080
diff
changeset
|
417 files. |
809452f0da6e
Fix outdated "Encoding to MPEG format" (MEncoder improved a lot :-) )
gpoirier
parents:
16080
diff
changeset
|
418 Usually, when you are using MPEG-1 or MPEG-2 video, it is because you are |
809452f0da6e
Fix outdated "Encoding to MPEG format" (MEncoder improved a lot :-) )
gpoirier
parents:
16080
diff
changeset
|
419 encoding for a constrained format such as SVCD, VCD, or DVD. |
809452f0da6e
Fix outdated "Encoding to MPEG format" (MEncoder improved a lot :-) )
gpoirier
parents:
16080
diff
changeset
|
420 The specific requirements for these formats are explained in the |
809452f0da6e
Fix outdated "Encoding to MPEG format" (MEncoder improved a lot :-) )
gpoirier
parents:
16080
diff
changeset
|
421 <link linkend="menc-feat-vcd-dvd"> VCD and DVD creation guide</link> |
809452f0da6e
Fix outdated "Encoding to MPEG format" (MEncoder improved a lot :-) )
gpoirier
parents:
16080
diff
changeset
|
422 section. |
9675 | 423 </para> |
424 | |
425 <para> | |
12578 | 426 To change <application>MEncoder</application>'s output file format, |
11540 | 427 use the <option>-of mpeg</option> option. |
9675 | 428 </para> |
429 | |
16550
2b0df753ddd3
Creating a MPEG-1 file suitable for exchange, taken from the example posted by James Courtier-Dutton on mplayer-users
gpoirier
parents:
16549
diff
changeset
|
430 <informalexample> |
9675 | 431 <para> |
432 Example: | |
433 <screen> | |
21408 | 434 mencoder <replaceable>input.avi</replaceable> -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video \ |
435 -oac copy <replaceable>other_options</replaceable> -o <replaceable>output.mpg</replaceable> | |
9675 | 436 </screen> |
16560 | 437 Creating an MPEG-1 file suitable to be played on systems with minimal |
438 multimedia support, such as default Windows installs: | |
16550
2b0df753ddd3
Creating a MPEG-1 file suitable for exchange, taken from the example posted by James Courtier-Dutton on mplayer-users
gpoirier
parents:
16549
diff
changeset
|
439 <screen> |
21408 | 440 mencoder <replaceable>input.avi</replaceable> -of mpeg -mpegopts format=mpeg1:tsaf:muxrate=2000 \ |
441 -o <replaceable>output.mpg</replaceable> -oac lavc -lavcoptc acodec=mp2:abitrate=224 -ovc lavc \ | |
442 -lavcopts vcodec=mpeg1video:vbitrate=1152:keyint=15:mbd=2:aspect=4/3 | |
16550
2b0df753ddd3
Creating a MPEG-1 file suitable for exchange, taken from the example posted by James Courtier-Dutton on mplayer-users
gpoirier
parents:
16549
diff
changeset
|
443 </screen> |
21063 | 444 Same, but using <systemitem class="library">libavformat</systemitem> MPEG muxer: |
445 <screen> | |
21408 | 446 mencoder <replaceable>input.avi</replaceable> -o <replaceable>VCD.mpg</replaceable> -ofps 25 -vf scale=352:288,harddup -of lavf \ |
447 -lavfopts format=mpg:i_certify_that_my_video_stream_does_not_use_b_frames \ | |
448 -oac lavc -lavcopts acodec=mp2:abitrate=224 -ovc lavc \ | |
21409 | 449 -lavcopts vcodec=mpeg1video:vrc_buf_size=327:keyint=15:vrc_maxrate=1152:vbitrate=1152:vmax_b_frames=0 |
21063 | 450 </screen> |
9675 | 451 </para> |
16550
2b0df753ddd3
Creating a MPEG-1 file suitable for exchange, taken from the example posted by James Courtier-Dutton on mplayer-users
gpoirier
parents:
16549
diff
changeset
|
452 </informalexample> |
2b0df753ddd3
Creating a MPEG-1 file suitable for exchange, taken from the example posted by James Courtier-Dutton on mplayer-users
gpoirier
parents:
16549
diff
changeset
|
453 |
18022
b5b16f92b842
Add a note explaining that it's okay to use a different target bitrate on the various passes of a video encode
gpoirier
parents:
17594
diff
changeset
|
454 <note><title>Hint:</title> |
b5b16f92b842
Add a note explaining that it's okay to use a different target bitrate on the various passes of a video encode
gpoirier
parents:
17594
diff
changeset
|
455 <para> |
21449 | 456 If for some reason the video quality of the second pass did not |
457 satisfy you, you may re-run your video encode with a different target | |
458 bitrate, provided that you saved the statistics file of the previous | |
459 pass. | |
460 This is possible because the statistics file's primary goal is to | |
461 record the complexity of each frame, which doesn't depend heavily on | |
462 bitrate. You should note, though, that you'll get the best results if | |
463 all passes are run with target bitrates that do not differ very much. | |
18022
b5b16f92b842
Add a note explaining that it's okay to use a different target bitrate on the various passes of a video encode
gpoirier
parents:
17594
diff
changeset
|
464 </para> |
b5b16f92b842
Add a note explaining that it's okay to use a different target bitrate on the various passes of a video encode
gpoirier
parents:
17594
diff
changeset
|
465 </note> |
21450 | 466 </sect1> |
18022
b5b16f92b842
Add a note explaining that it's okay to use a different target bitrate on the various passes of a video encode
gpoirier
parents:
17594
diff
changeset
|
467 |
21450 | 468 |
469 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> | |
470 | |
9675 | 471 |
472 <sect1 id="menc-feat-rescale"> | |
473 <title>Rescaling movies</title> | |
474 | |
475 <para> | |
476 Often the need to resize movie images' size emerges. Its reasons can be | |
17039 | 477 many: decreasing file size, network bandwidth, etc. Most people even do |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
478 rescaling when converting DVDs or SVCDs to DivX AVI. If you wish to rescale, |
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
479 read the <link linkend="aspect">Preserving aspect ratio</link> section. |
9675 | 480 </para> |
481 | |
482 <para> | |
483 The scaling process is handled by the <literal>scale</literal> video filter: | |
9677 | 484 <option>-vf scale=<replaceable>width</replaceable>:<replaceable>height</replaceable></option>. |
9675 | 485 Its quality can be set with the <option>-sws</option> option. |
15329 | 486 If it is not specified, <application>MEncoder</application> will use 2: bicubic. |
9675 | 487 </para> |
488 | |
489 <para> | |
490 Usage: | |
491 <screen> | |
21408 | 492 mencoder <replaceable>input.mpg</replaceable> -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell \ |
493 -vf scale=640:480 -o <replaceable>output.avi</replaceable> | |
9675 | 494 </screen> |
495 </para> | |
496 </sect1> | |
497 | |
498 | |
21450 | 499 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
500 | |
501 | |
9675 | 502 <sect1 id="menc-feat-streamcopy"> |
503 <title>Stream copying</title> | |
504 | |
505 <para> | |
506 <application>MEncoder</application> can handle input streams in two ways: | |
507 <emphasis role="bold">encode</emphasis> or <emphasis role="bold">copy</emphasis> | |
508 them. This section is about <emphasis role="bold">copying</emphasis>. | |
509 </para> | |
510 | |
511 <itemizedlist> | |
512 <listitem><para> | |
513 <emphasis role="bold">Video stream</emphasis> (option <option>-ovc copy</option>): | |
514 nice stuff can be done :) Like, putting (not converting!) FLI or VIVO or | |
14024 | 515 MPEG-1 video into an AVI file! Of course only |
9675 | 516 <application>MPlayer</application> can play such files :) And it probably |
517 has no real life value at all. Rationally: video stream copying can be | |
518 useful for example when only the audio stream has to be encoded (like, | |
519 uncompressed PCM to MP3). | |
21449 | 520 </para></listitem> |
9675 | 521 <listitem><para> |
522 <emphasis role="bold">Audio stream</emphasis> (option <option>-oac copy</option>): | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
523 straightforward. It is possible to take an external audio file (MP3, |
10429 | 524 WAV) and mux it into the output stream. Use the |
9675 | 525 <option>-audiofile <replaceable>filename</replaceable></option> option |
526 for this. | |
21449 | 527 </para></listitem> |
9675 | 528 </itemizedlist> |
16228 | 529 |
530 <para> | |
21449 | 531 Using <option>-oac copy</option> to copy from one container format to |
532 another may require the use of <option>-fafmttag</option> to keep the | |
533 audio format tag of the original file. | |
534 For example, if you are converting an NSV file with AAC audio to an AVI | |
535 container, the audio format tag will be incorrect and it will have to | |
536 be changed. For a list of audio format tags, check | |
537 <filename>codecs.conf</filename>. | |
16228 | 538 </para> |
539 | |
540 <para> | |
541 Example: | |
542 <screen> | |
21408 | 543 mencoder <replaceable>input.nsv</replaceable> -oac copy -fafmttag 0x706D \ |
544 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -o <replaceable>output.avi</replaceable> | |
16228 | 545 </screen> |
546 </para> | |
21450 | 547 </sect1> |
16228 | 548 |
21450 | 549 |
550 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> | |
9675 | 551 |
552 | |
553 <sect1 id="menc-feat-enc-images"> | |
21446 | 554 <title>Encoding from multiple input image files (JPEG, PNG, TGA, etc.)</title> |
9675 | 555 |
556 <para> | |
557 <application>MEncoder</application> is capable of creating movies from one | |
21521 | 558 or more JPEG, PNG, TGA, or other image files. With simple framecopy it can |
559 create MJPEG (Motion JPEG), MPNG (Motion PNG) or MTGA (Motion TGA) files. | |
9675 | 560 </para> |
561 | |
562 <orderedlist> | |
563 <title>Explanation of the process:</title> | |
564 <listitem><para> | |
21521 | 565 <application>MEncoder</application> <emphasis>decodes</emphasis> the input |
566 image(s) with <systemitem class="library">libjpeg</systemitem> (when decoding | |
567 PNGs, it will use <systemitem class="library">libpng</systemitem>). | |
21449 | 568 </para></listitem> |
9675 | 569 <listitem><para> |
570 <application>MEncoder</application> then feeds the decoded image to the | |
20860 | 571 chosen video compressor (DivX4, Xvid, FFmpeg msmpeg4, etc.). |
21449 | 572 </para></listitem> |
9675 | 573 </orderedlist> |
574 | |
575 <formalpara> | |
576 <title>Examples</title> | |
577 <para> | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
578 The explanation of the <option>-mf</option> option is in the man page. |
9675 | 579 |
580 <informalexample> | |
581 <para> | |
14024 | 582 Creating an MPEG-4 file from all the JPEG files in the current directory: |
9675 | 583 <screen> |
21408 | 584 mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc lavc \ |
585 -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o <replaceable>output.avi</replaceable> | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
586 </screen> |
9675 | 587 </para> |
588 </informalexample> | |
589 | |
590 <informalexample> | |
591 <para> | |
14024 | 592 Creating an MPEG-4 file from some JPEG files in the current directory: |
9675 | 593 <screen> |
21408 | 594 mencoder mf://<replaceable>frame001.jpg,frame002.jpg</replaceable> -mf w=800:h=600:fps=25:type=jpg \ |
595 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o <replaceable>output.avi</replaceable> | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
596 </screen> |
9675 | 597 </para> |
598 </informalexample> | |
599 | |
600 <informalexample> | |
601 <para> | |
21521 | 602 Creating an MPEG-4 file from explicit list of JPEG files (list.txt in current |
603 directory contains the list of files to use as source, one per line): | |
17049
4b04284b7a92
How to create a MPEG4 video from an explicit list of files, based on a patch by devik <devik AH cdi POIS cz>
gpoirier
parents:
17039
diff
changeset
|
604 <screen> |
4b04284b7a92
How to create a MPEG4 video from an explicit list of files, based on a patch by devik <devik AH cdi POIS cz>
gpoirier
parents:
17039
diff
changeset
|
605 mencoder mf://<replaceable>@list.txt</replaceable> -mf w=800:h=600:fps=25:type=jpg \ |
21408 | 606 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o <replaceable>output.avi</replaceable> |
17049
4b04284b7a92
How to create a MPEG4 video from an explicit list of files, based on a patch by devik <devik AH cdi POIS cz>
gpoirier
parents:
17039
diff
changeset
|
607 </screen> |
4b04284b7a92
How to create a MPEG4 video from an explicit list of files, based on a patch by devik <devik AH cdi POIS cz>
gpoirier
parents:
17039
diff
changeset
|
608 </para> |
4b04284b7a92
How to create a MPEG4 video from an explicit list of files, based on a patch by devik <devik AH cdi POIS cz>
gpoirier
parents:
17039
diff
changeset
|
609 </informalexample> |
4b04284b7a92
How to create a MPEG4 video from an explicit list of files, based on a patch by devik <devik AH cdi POIS cz>
gpoirier
parents:
17039
diff
changeset
|
610 |
21728
8e7fd27dd79c
Mention that you can use different image formats with mf://
torinthiel
parents:
21596
diff
changeset
|
611 You can mix different types of images, regardless of the method you use |
8e7fd27dd79c
Mention that you can use different image formats with mf://
torinthiel
parents:
21596
diff
changeset
|
612 — individual filenames, wildcard or file with list — provided of |
8e7fd27dd79c
Mention that you can use different image formats with mf://
torinthiel
parents:
21596
diff
changeset
|
613 course they have the same dimensions. |
8e7fd27dd79c
Mention that you can use different image formats with mf://
torinthiel
parents:
21596
diff
changeset
|
614 So you can e.g. take title frame from PNG file, |
8e7fd27dd79c
Mention that you can use different image formats with mf://
torinthiel
parents:
21596
diff
changeset
|
615 and then put a slideshow of your JPEG photos. |
8e7fd27dd79c
Mention that you can use different image formats with mf://
torinthiel
parents:
21596
diff
changeset
|
616 |
17049
4b04284b7a92
How to create a MPEG4 video from an explicit list of files, based on a patch by devik <devik AH cdi POIS cz>
gpoirier
parents:
17039
diff
changeset
|
617 <informalexample> |
4b04284b7a92
How to create a MPEG4 video from an explicit list of files, based on a patch by devik <devik AH cdi POIS cz>
gpoirier
parents:
17039
diff
changeset
|
618 <para> |
9675 | 619 Creating a Motion JPEG (MJPEG) file from all the JPEG files in the current |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
620 directory: |
9675 | 621 <screen> |
14093
3bf74bf969ff
Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents:
14024
diff
changeset
|
622 mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc copy -oac copy -o <replaceable>output.avi</replaceable> |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
623 </screen> |
9675 | 624 </para> |
625 </informalexample> | |
626 | |
627 <informalexample> | |
628 <para> | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
629 Creating an uncompressed file from all the PNG files in the current directory: |
9675 | 630 <screen> |
17039 | 631 mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc raw -oac copy -o <replaceable>output.avi</replaceable> |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
632 </screen> |
9675 | 633 </para> |
634 </informalexample> | |
635 | |
636 <note><para> | |
21521 | 637 Width must be integer multiple of 4, it is a limitation of the RAW RGB AVI |
638 format. | |
9675 | 639 </para></note> |
640 | |
641 <informalexample> | |
642 <para> | |
643 Creating a Motion PNG (MPNG) file from all the PNG files in the current | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
644 directory: |
9675 | 645 <screen> |
21449 | 646 mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc copy -oac copy -o <replaceable>output.avi</replaceable><!-- |
9675 | 647 --></screen> |
648 </para> | |
649 </informalexample> | |
650 | |
651 <informalexample> | |
652 <para> | |
653 Creating a Motion TGA (MTGA) file from all the TGA files in the current | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
654 directory: |
9675 | 655 <screen> |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
656 mencoder mf://*.tga -mf w=800:h=600:fps=25:type=tga -ovc copy -oac copy -o <replaceable>output.avi</replaceable><!-- |
9675 | 657 --></screen> |
658 </para> | |
659 </informalexample> | |
660 </para> | |
661 </formalpara> | |
662 </sect1> | |
663 | |
664 | |
21450 | 665 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
666 | |
667 | |
9675 | 668 <sect1 id="menc-feat-extractsub"> |
12615 | 669 <title>Extracting DVD subtitles to VOBsub file</title> |
9675 | 670 |
671 <para> | |
672 <application>MEncoder</application> is capable of extracting subtitles from | |
12615 | 673 a DVD into VOBsub formatted files. They consist of a pair of files ending in |
9675 | 674 <filename>.idx</filename> and <filename>.sub</filename> and are usually |
675 packaged in a single <filename>.rar</filename> archive. | |
676 <application>MPlayer</application> can play these with the | |
677 <option>-vobsub</option> and <option>-vobsubid</option> options. | |
678 </para> | |
679 | |
680 <para> | |
681 You specify the basename (i.e without the <filename>.idx</filename> or | |
682 <filename>.sub</filename> extension) of the output files with | |
683 <option>-vobsubout</option> and the index for this subtitle in the | |
684 resulting files with <option>-vobsuboutindex</option>. | |
685 </para> | |
686 | |
687 <para> | |
688 If the input is not from a DVD you should use <option>-ifo</option> to | |
689 indicate the <filename>.ifo</filename> file needed to construct the | |
690 resulting <filename>.idx</filename> file. | |
691 </para> | |
692 | |
693 <para> | |
694 If the input is not from a DVD and you do not have the | |
695 <filename>.ifo</filename> file you will need to use the | |
696 <option>-vobsubid</option> option to let it know what language id to put in | |
697 the <filename>.idx</filename> file. | |
698 </para> | |
699 | |
700 <para> | |
701 Each run will append the running subtitle if the <filename>.idx</filename> | |
702 and <filename>.sub</filename> files already exist. So you should remove any | |
703 before starting. | |
704 </para> | |
705 | |
20035 | 706 <example id="copying_two_subtitles_from_a_dvd_while_doing_two_pass_encoding"> |
14421 | 707 <title>Copying two subtitles from a DVD while doing two pass encoding</title> |
9675 | 708 <screen> |
21408 | 709 rm <replaceable>subtitles.idx</replaceable> <replaceable>subtitles.sub</replaceable> |
710 mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 \ | |
711 -vobsubout <replaceable>subtitles</replaceable> -vobsuboutindex 0 -sid 2 | |
712 mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 \ | |
713 -vobsubout <replaceable>subtitles</replaceable> -vobsuboutindex 1 -sid 5<!-- | |
9675 | 714 --></screen> |
715 </example> | |
716 | |
20035 | 717 <example id="copying_a_french_subtitle_from_an_mpeg_file"> |
21378 | 718 <title>Copying a French subtitle from an MPEG file</title> |
9675 | 719 <screen> |
21408 | 720 rm <replaceable>subtitles.idx</replaceable> <replaceable>subtitles.sub</replaceable> |
721 mencoder <replaceable>movie.mpg</replaceable> -ifo <replaceable>movie.ifo</replaceable> -vobsubout <replaceable>subtitles</replaceable> -vobsuboutindex 0 \ | |
722 -vobsuboutid fr -sid 1 -nosound -ovc copy | |
15492 | 723 </screen> |
9675 | 724 </example> |
21450 | 725 </sect1> |
9675 | 726 |
21450 | 727 |
728 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> | |
729 | |
9675 | 730 |
731 <sect1 id="aspect"> | |
732 <title>Preserving aspect ratio</title> | |
21732 | 733 |
9675 | 734 <para> |
14024 | 735 DVDs and SVCDs (i.e. MPEG-1/2) files contain an aspect ratio value, which |
15329 | 736 describes how the player should scale the video stream, so humans will not |
9675 | 737 have egg heads (ex.: 480x480 + 4:3 = 640x480). However when encoding to AVI |
17039 | 738 (DivX) files, you have to be aware that AVI headers do not store this value. |
10065
422876da049e
Error in the aspect ratio calculation, plus typos and rewordings.
diego
parents:
9677
diff
changeset
|
739 Rescaling the movie is disgusting and time consuming, there has to be a better |
422876da049e
Error in the aspect ratio calculation, plus typos and rewordings.
diego
parents:
9677
diff
changeset
|
740 way! |
9675 | 741 </para> |
742 | |
743 <para>There is</para> | |
744 | |
745 <para> | |
18254 | 746 MPEG-4 has a unique feature: the video stream can contain its needed aspect |
21521 | 747 ratio. Yes, just like MPEG-1/2 (DVD, SVCD) and H.263 files. Regretfully, there |
748 are few video players apart from <application>MPlayer</application> that | |
749 support this MPEG-4 attribute. | |
9675 | 750 </para> |
751 | |
752 <para> | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
753 This feature can be used only with |
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
754 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>'s |
10869 | 755 <systemitem>mpeg4</systemitem> codec. Keep in mind: although |
756 <application>MPlayer</application> will correctly play the created file, | |
18245
2a5ea72115f8
Other players apart from MPlayer support MPEG-4 aspect now, closes #482.
diego
parents:
18029
diff
changeset
|
757 other players may use the wrong aspect ratio. |
9675 | 758 </para> |
759 | |
760 <para> | |
761 You seriously should crop the black bands over and below the movie image. | |
10065
422876da049e
Error in the aspect ratio calculation, plus typos and rewordings.
diego
parents:
9677
diff
changeset
|
762 See the man page for the usage of the <systemitem>cropdetect</systemitem> and |
9675 | 763 <systemitem>crop</systemitem> filters. |
764 </para> | |
765 | |
766 <para> | |
10869 | 767 Usage |
21408 | 768 <screen>mencoder <replaceable>sample-svcd.mpg</replaceable> -vf crop=714:548:0:14 -oac copy -ovc lavc \ |
769 -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect -o <replaceable>output.avi</replaceable></screen> | |
9675 | 770 </para> |
10869 | 771 </sect1> |
772 | |
9675 | 773 </chapter> |