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