annotate DOCS/xml/en/mencoder.xml @ 16095:4d6bd248f7b9

formatting fixes galore
author diego
date Tue, 26 Jul 2005 01:06:10 +0000
parents baae7cdb0726
children 809452f0da6e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
1 <?xml version="1.0" encoding="iso-8859-1"?>
10913
49b1a67e7381 Add revision keyword to english xml files, to ease translation synchronization
lumag
parents: 10869
diff changeset
2 <!-- $Revision$ -->
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
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
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
5
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
6 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
7 For the complete list of available <application>MEncoder</application> options
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
8 and examples, please see the man page. For a series of hands-on examples and
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
9 detailed guides on using several encoding parameters, read the
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
10 <ulink url="../../tech/encoding-tips.txt">encoding-tips</ulink> that were
15029
b0dd473ed38a correct spelling for mailing list names
diego
parents: 15010
diff changeset
11 collected from several mailing list threads on MPlayer-users. Search the
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
12 <ulink url="http://mplayerhq.hu/pipermail/mplayer-users/">archives</ulink>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
13 for a wealth of discussions about all aspects of and problems related to
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
14 encoding with <application>MEncoder</application>.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
15 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
16
12400
903ac68f2bc8 divx --> lavc, spelling, more sensible section name
diego
parents: 12399
diff changeset
17 <sect1 id="menc-feat-mpeg4">
14421
4a70b65cd2ae consistent "two pass" spelling
diego
parents: 14131
diff changeset
18 <title>Encoding two pass MPEG-4 (&quot;DivX&quot;)</title>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
19
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
20 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
21 The name comes from the fact that this method encodes the file <emphasis>twice</emphasis>.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
22 The first encoding (dubbed pass) creates some temporary files
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
23 (<filename>*.log</filename>) with a size of few megabytes, do not delete
14421
4a70b65cd2ae consistent "two pass" spelling
diego
parents: 14131
diff changeset
24 them yet (you can delete the AVI). In the second pass, the two pass output
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
25 file is created, using the bitrate data from the temporary files. The
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
26 resulting file will have much better image quality. If this is the first
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
27 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
28 net.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
29 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
30
12484
58056bc98dd9 Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents: 12400
diff changeset
31 <example>
58056bc98dd9 Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents: 12400
diff changeset
32 <title>copy audio track</title>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
33 <para>
14421
4a70b65cd2ae consistent "two pass" spelling
diego
parents: 14131
diff changeset
34 Two pass encode of a DVD to an MPEG-4 (&quot;DivX&quot;) AVI while copying
12484
58056bc98dd9 Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents: 12400
diff changeset
35 the audio track.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
36 <screen>
11710
d37d4bc38f26 <replaceable> tags by Qba <jim85@wp.pl>
wight
parents: 11680
diff changeset
37 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o <replaceable>movie.avi</replaceable>
d37d4bc38f26 <replaceable> tags by Qba <jim85@wp.pl>
wight
parents: 11680
diff changeset
38 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac copy -o <replaceable>movie.avi</replaceable>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
39 </screen>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
40 </para>
12484
58056bc98dd9 Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents: 12400
diff changeset
41 </example>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
42
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
43 <example>
12484
58056bc98dd9 Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents: 12400
diff changeset
44 <title>encode audio track</title>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
45 <para>
14421
4a70b65cd2ae consistent "two pass" spelling
diego
parents: 14131
diff changeset
46 Two pass encode of a DVD to an MPEG-4 (&quot;DivX&quot;) AVI while encoding
12484
58056bc98dd9 Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents: 12400
diff changeset
47 the audio track to MP3.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
48 <screen>
12484
58056bc98dd9 Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents: 12400
diff changeset
49 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac mp3lame -lameopts vbr=3 -o <replaceable>movie.avi</replaceable>
58056bc98dd9 Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents: 12400
diff changeset
50 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac mp3lame -lameopts vbr=3 -o <replaceable>movie.avi</replaceable>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
51 </screen>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
52 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
53 </example>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
54 </sect1>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
55
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
56 <sect1 id="menc-feat-mpeg">
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
57 <title>Encoding to MPEG format</title>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
58 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
59 <application>MEncoder</application> can create MPEG (MPEG-PS) format output
15329
4c039fa37dbf Removes all English's short forms.
gpoirier
parents: 15326
diff changeset
60 files. It is probably useful only with
11822
359eaf957bf1 Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents: 11820
diff changeset
61 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>'s
10869
364d43cee33e sync with HTML
diego
parents: 10429
diff changeset
62 <emphasis>mpeg1video</emphasis> codec, because players - except
14024
0d9e27059495 MPEG-X spelling
diego
parents: 13523
diff changeset
63 <application>MPlayer</application> - expect MPEG-1 video, and MPEG-1 layer 2 (MP2)
10869
364d43cee33e sync with HTML
diego
parents: 10429
diff changeset
64 audio streams in MPEG files.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
65 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
66
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
67 <para>
11680
f2f7c22847b3 added capital letter at the beginning of the sentence
paszczi
parents: 11540
diff changeset
68 This feature is not very useful right now, aside that it probably has many bugs,
11540
d480f7e36b74 <application> attack
wight
parents: 11271
diff changeset
69 but the more importantly because <application>MEncoder</application> currently
14024
0d9e27059495 MPEG-X spelling
diego
parents: 13523
diff changeset
70 cannot encode MPEG-1 layer 2 (MP2) audio, which all other players expect in MPEG files.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
71 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
72
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
73 <para>
12578
3f543ec01d1e 's should be outside of <application> tags.
diego
parents: 12484
diff changeset
74 To change <application>MEncoder</application>'s output file format,
11540
d480f7e36b74 <application> attack
wight
parents: 11271
diff changeset
75 use the <option>-of mpeg</option> option.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
76 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
77
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
78 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
79 Example:
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
80 <screen>
11710
d37d4bc38f26 <replaceable> tags by Qba <jim85@wp.pl>
wight
parents: 11680
diff changeset
81 mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -oac copy <replaceable>other_options</replaceable> <replaceable>media.avi</replaceable> -o <replaceable>output.mpg</replaceable>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
82 </screen>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
83 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
84 </sect1>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
85
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
86 <sect1 id="menc-feat-rescale">
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
87 <title>Rescaling movies</title>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
88
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
89 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
90 Often the need to resize movie images' size emerges. Its reasons can be
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
91 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
92 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
93 read the <link linkend="aspect">Preserving aspect ratio</link> section.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
94 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
95
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
96 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
97 The scaling process is handled by the <literal>scale</literal> video filter:
9677
142c42fa0986 sync with HTML
nicolas
parents: 9675
diff changeset
98 <option>-vf scale=<replaceable>width</replaceable>:<replaceable>height</replaceable></option>.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
99 Its quality can be set with the <option>-sws</option> option.
15329
4c039fa37dbf Removes all English's short forms.
gpoirier
parents: 15326
diff changeset
100 If it is not specified, <application>MEncoder</application> will use 2: bicubic.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
101 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
102
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
103 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
104 Usage:
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
105 <screen>
12484
58056bc98dd9 Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents: 12400
diff changeset
106 mencoder <replaceable>input.mpg</replaceable> -ovc lavc -lavcopts vcodec=mpeg4 -vf scale=640:480 -o <replaceable>output.avi</replaceable>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
107 </screen>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
108 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
109 </sect1>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
110
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
111
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
112 <sect1 id="menc-feat-streamcopy">
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
113 <title>Stream copying</title>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
114
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
115 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
116 <application>MEncoder</application> can handle input streams in two ways:
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
117 <emphasis role="bold">encode</emphasis> or <emphasis role="bold">copy</emphasis>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
118 them. This section is about <emphasis role="bold">copying</emphasis>.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
119 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
120
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
121 <itemizedlist>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
122 <listitem><para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
123 <emphasis role="bold">Video stream</emphasis> (option <option>-ovc copy</option>):
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
124 nice stuff can be done :) Like, putting (not converting!) FLI or VIVO or
14024
0d9e27059495 MPEG-X spelling
diego
parents: 13523
diff changeset
125 MPEG-1 video into an AVI file! Of course only
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
126 <application>MPlayer</application> can play such files :) And it probably
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
127 has no real life value at all. Rationally: video stream copying can be
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
128 useful for example when only the audio stream has to be encoded (like,
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
129 uncompressed PCM to MP3).
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
130 </para></listitem>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
131 <listitem><para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
132 <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
133 straightforward. It is possible to take an external audio file (MP3,
10429
diego
parents: 10184
diff changeset
134 WAV) and mux it into the output stream. Use the
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
135 <option>-audiofile <replaceable>filename</replaceable></option> option
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
136 for this.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
137 </para></listitem>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
138 </itemizedlist>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
139 </sect1>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
140
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
141
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
142 <sect1 id="menc-feat-enc-images">
12399
9403b245fcda Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents: 11913
diff changeset
143 <title>Encoding from multiple input image files (JPEG, PNG, TGA, SGI)</title>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
144
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
145 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
146 <application>MEncoder</application> is capable of creating movies from one
12758
250ce1b2ef8f improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents: 12615
diff changeset
147 or more JPEG, PNG or TGA files. With simple framecopy it can create MJPEG
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
148 (Motion JPEG), MPNG (Motion PNG) or MTGA (Motion TGA) files.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
149 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
150
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
151 <orderedlist>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
152 <title>Explanation of the process:</title>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
153 <listitem><para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
154 <application>MEncoder</application> <emphasis>decodes</emphasis> the input image(s) with
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
155 <systemitem class="library">libjpeg</systemitem> (when decoding PNGs, it
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
156 will use <systemitem class="library">libpng</systemitem>).
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
157 </para></listitem>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
158 <listitem><para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
159 <application>MEncoder</application> then feeds the decoded image to the
12399
9403b245fcda Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents: 11913
diff changeset
160 chosen video compressor (DivX4, XviD, FFmpeg msmpeg4, etc.).
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
161 </para></listitem>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
162 </orderedlist>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
163
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
164 <formalpara>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
165 <title>Examples</title>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
166 <para>
12399
9403b245fcda Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents: 11913
diff changeset
167 The explanation of the <option>-mf</option> option is in the man page.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
168
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
169 <informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
170 <para>
14024
0d9e27059495 MPEG-X spelling
diego
parents: 13523
diff changeset
171 Creating an MPEG-4 file from all the JPEG files in the current directory:
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
172 <screen>
14093
3bf74bf969ff Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents: 14024
diff changeset
173 mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -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
174 </screen>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
175 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
176 </informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
177
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
178 <informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
179 <para>
14024
0d9e27059495 MPEG-X spelling
diego
parents: 13523
diff changeset
180 Creating an MPEG-4 file from some JPEG files in the current directory:
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
181 <screen>
14093
3bf74bf969ff Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents: 14024
diff changeset
182 mencoder mf://<replaceable>frame001.jpg,frame002.jpg</replaceable> -mf w=800:h=600:fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -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
183 </screen>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
184 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
185 </informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
186
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
187 <informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
188 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
189 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
190 directory:
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
191 <screen>
14093
3bf74bf969ff Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents: 14024
diff changeset
192 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
193 </screen>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
194 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
195 </informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
196
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
197 <informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
198 <para>
12399
9403b245fcda Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents: 11913
diff changeset
199 Creating an uncompressed file from all the PNG files in the current directory:
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
200 <screen>
12399
9403b245fcda Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents: 11913
diff changeset
201 mencoder mf:// -mf w=800:h=600:fps=25:type=png -ovc raw -oac copy -o <replaceable>output.avi</replaceable>
9403b245fcda Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents: 11913
diff changeset
202 </screen>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
203 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
204 </informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
205
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
206 <note><para>
15329
4c039fa37dbf Removes all English's short forms.
gpoirier
parents: 15326
diff changeset
207 Width must be integer multiple of 4, it is a limitation of the RAW RGB AVI format.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
208 </para></note>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
209
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
210 <informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
211 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
212 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
213 directory:
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
214 <screen>
14093
3bf74bf969ff Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents: 14024
diff changeset
215 mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc copy -oac copy -o <replaceable>output.avi</replaceable> <!--
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
216 --></screen>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
217 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
218 </informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
219
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
220 <informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
221 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
222 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
223 directory:
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
224 <screen>
12399
9403b245fcda Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents: 11913
diff changeset
225 mencoder mf://*.tga -mf w=800:h=600:fps=25:type=tga -ovc copy -oac copy -o <replaceable>output.avi</replaceable><!--
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
226 --></screen>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
227 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
228 </informalexample>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
229
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
230 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
231 </formalpara>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
232 </sect1>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
233
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
234
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
235 <sect1 id="menc-feat-extractsub">
12615
84e078fd64b4 uniform VOBsub spelling
diego
parents: 12599
diff changeset
236 <title>Extracting DVD subtitles to VOBsub file</title>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
237
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
238 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
239 <application>MEncoder</application> is capable of extracting subtitles from
12615
84e078fd64b4 uniform VOBsub spelling
diego
parents: 12599
diff changeset
240 a DVD into VOBsub formatted files. They consist of a pair of files ending in
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
241 <filename>.idx</filename> and <filename>.sub</filename> and are usually
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
242 packaged in a single <filename>.rar</filename> archive.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
243 <application>MPlayer</application> can play these with the
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
244 <option>-vobsub</option> and <option>-vobsubid</option> options.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
245 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
246
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
247 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
248 You specify the basename (i.e without the <filename>.idx</filename> or
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
249 <filename>.sub</filename> extension) of the output files with
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
250 <option>-vobsubout</option> and the index for this subtitle in the
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
251 resulting files with <option>-vobsuboutindex</option>.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
252 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
253
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
254 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
255 If the input is not from a DVD you should use <option>-ifo</option> to
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
256 indicate the <filename>.ifo</filename> file needed to construct the
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
257 resulting <filename>.idx</filename> file.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
258 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
259
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
260 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
261 If the input is not from a DVD and you do not have the
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
262 <filename>.ifo</filename> file you will need to use the
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
263 <option>-vobsubid</option> option to let it know what language id to put in
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
264 the <filename>.idx</filename> file.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
265 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
266
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
267 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
268 Each run will append the running subtitle if the <filename>.idx</filename>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
269 and <filename>.sub</filename> files already exist. So you should remove any
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
270 before starting.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
271 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
272
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
273 <example>
14421
4a70b65cd2ae consistent "two pass" spelling
diego
parents: 14131
diff changeset
274 <title>Copying two subtitles from a DVD while doing two pass encoding</title>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
275 <screen>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
276 rm subtitles.idx subtitles.sub
12776
1154a70ade70 3-pass encoding is evil.
diego
parents: 12758
diff changeset
277 mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -vobsubout subtitles -vobsuboutindex 0 -sid 2
12400
903ac68f2bc8 divx --> lavc, spelling, more sensible section name
diego
parents: 12399
diff changeset
278 mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -vobsubout subtitles -vobsuboutindex 1 -sid 5<!--
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
279 --></screen>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
280 </example>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
281
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
282 <example>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
283 <title>Copying a french subtitle from an MPEG file</title>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
284 <screen>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
285 rm subtitles.idx subtitles.sub
15492
d2073ff48b5b Fixes the vobsub extraction example
gpoirier
parents: 15487
diff changeset
286 mencoder <replaceable>movie.mpg</replaceable> -ifo <replaceable>movie.ifo</replaceable> -vobsubout subtitles -vobsuboutindex 0 -vobsuboutid fr -sid 1 -nosound -ovc copy
d2073ff48b5b Fixes the vobsub extraction example
gpoirier
parents: 15487
diff changeset
287 </screen>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
288 </example>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
289
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
290 </sect1>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
291
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
292 <sect1 id="aspect">
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
293 <title>Preserving aspect ratio</title>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
294 <para>
14024
0d9e27059495 MPEG-X spelling
diego
parents: 13523
diff changeset
295 DVDs and SVCDs (i.e. MPEG-1/2) files contain an aspect ratio value, which
15329
4c039fa37dbf Removes all English's short forms.
gpoirier
parents: 15326
diff changeset
296 describes how the player should scale the video stream, so humans will not
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
297 have egg heads (ex.: 480x480 + 4:3 = 640x480). However when encoding to AVI
15329
4c039fa37dbf Removes all English's short forms.
gpoirier
parents: 15326
diff changeset
298 (DivX) files, you have 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
299 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
300 way!
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
301 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
302
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
303 <para>There is</para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
304
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
305 <para>
14024
0d9e27059495 MPEG-X spelling
diego
parents: 13523
diff changeset
306 MPEG-4 has an unique feature: the video stream can contain its needed aspect
0d9e27059495 MPEG-X spelling
diego
parents: 13523
diff changeset
307 ratio. Yes, just like MPEG-1/2 (DVD, SVCD) and H.263 files. Regretfully, there are
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
308 <emphasis role="bold">no</emphasis> video players outside which support this
14024
0d9e27059495 MPEG-X spelling
diego
parents: 13523
diff changeset
309 attribute of MPEG-4, except <application>MPlayer</application>.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
310 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
311
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
312 <para>
11822
359eaf957bf1 Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents: 11820
diff changeset
313 This feature can be used only with
359eaf957bf1 Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents: 11820
diff changeset
314 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>'s
10869
364d43cee33e sync with HTML
diego
parents: 10429
diff changeset
315 <systemitem>mpeg4</systemitem> codec. Keep in mind: although
364d43cee33e sync with HTML
diego
parents: 10429
diff changeset
316 <application>MPlayer</application> will correctly play the created file,
364d43cee33e sync with HTML
diego
parents: 10429
diff changeset
317 other players will use the wrong aspect ratio.
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
318 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
319
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
320 <para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
321 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
322 See the man page for the usage of the <systemitem>cropdetect</systemitem> and
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
323 <systemitem>crop</systemitem> filters.
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
324 </para>
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
325
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
326 <para>
10869
364d43cee33e sync with HTML
diego
parents: 10429
diff changeset
327 Usage
11710
d37d4bc38f26 <replaceable> tags by Qba <jim85@wp.pl>
wight
parents: 11680
diff changeset
328 <screen>mencoder <replaceable>sample-svcd.mpg</replaceable> -ovc lavc -lavcopts vcodec=mpeg4:autoaspect -vf crop=714:548:0:14 -oac copy -o <replaceable>output.avi</replaceable></screen>
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
329 </para>
10869
364d43cee33e sync with HTML
diego
parents: 10429
diff changeset
330 </sect1>
364d43cee33e sync with HTML
diego
parents: 10429
diff changeset
331
9675
62c5a17038ba XML version of MPlayer's doc
nicolas
parents:
diff changeset
332 </chapter>