9675
|
1 <?xml version="1.0" encoding="iso-8859-1"?>
|
|
2 <sect1 id="install">
|
|
3 <title>Installation</title>
|
|
4
|
|
5 <para>
|
|
6 In this section I'll try to guide you through the compiling and configuring
|
|
7 process of <application>MPlayer</application>. It's not easy, but it won't
|
|
8 necessarily be hard. If you experience a different behavior than what I
|
|
9 explain, please search through this documentation and you'll find your
|
|
10 answers. If you see links, please follow them and read carefully what they
|
|
11 contain. It will take some time, but it DOES worth it.
|
|
12 </para>
|
|
13
|
|
14 <para>
|
|
15 You need a fairly recent system. On Linux, 2.4.x kernels are recommended.
|
|
16 </para>
|
|
17
|
|
18
|
|
19 <sect2 id="softreq">
|
|
20 <title>Software requirements</title>
|
|
21
|
|
22 <itemizedlist>
|
|
23 <listitem><para>
|
|
24 <emphasis role="bold">binutils</emphasis> - suggested version is <emphasis role="bold">2.11.x</emphasis>.
|
|
25 This program is responsible for generating MMX/ 3DNow!/etc instructions,
|
|
26 thus very important.
|
|
27 </para></listitem>
|
|
28 <listitem><para>
|
|
29 <emphasis role="bold">gcc</emphasis> - suggested versions are: <emphasis role="bold">2.95.3</emphasis>
|
|
30 (maybe <emphasis role="bold">2.95.4</emphasis>) and <emphasis role="bold">3.2+</emphasis>.
|
|
31 <emphasis role="bold">Never</emphasis> use 2.96 or 3.0.x! They generate faulty code for
|
|
32 <application>MPlayer</application>. If you decide to change gcc from
|
|
33 2.96, then don't decide in favor of 3.0.x just because it's newer! Early
|
|
34 releases of 3.0.x were even more buggy than 2.96. So downgrade to 2.95.x
|
|
35 (downgrade <systemitem class="library">libstdc++</systemitem> too, other
|
|
36 programs may need it) or don't up/downgrade at all (but in this case, be
|
|
37 prepared for runtime problems). If you vote for 3.x.x, try to use the
|
|
38 latest version, early releases had various bugs, so be sure you use at
|
|
39 least 3.1, it's tested and working. For detailed information about gcc 2.96's
|
|
40 bugs (that are still NOT fixed, they have been WORKED AROUND in
|
|
41 <application>MPlayer</application>!),see the <link linkend="gcc-296">gcc 2.96</link>
|
|
42 section and the <xref linkend="faq"/>.
|
|
43 </para></listitem>
|
|
44 <listitem><para>
|
|
45 <emphasis role="bold">XFree86</emphasis> - suggested version is <emphasis role="bold">always the
|
|
46 newest</emphasis> (4.2.1). Normally, everyone wants this, as starting
|
|
47 with XFree86 4.0.2, it contains the <link linkend="xv">XVideo</link>
|
|
48 extension (somewhere referred to as <emphasis role="bold">Xv</emphasis>)
|
|
49 which is needed to enable the hardware YUV acceleration (fast image display)
|
|
50 on cards that support it.
|
|
51 Make sure its <emphasis role="bold">development package</emphasis> is installed,
|
|
52 too, otherwise it won't work.
|
|
53 For some video cards you don't need XFree86. See list below.
|
|
54 </para></listitem>
|
|
55 <listitem><para>
|
|
56 <emphasis role="bold">make</emphasis> - suggested version is
|
|
57 <emphasis role="bold">always the newest</emphasis> (at least 3.79.x). This
|
|
58 usually isn't important.
|
|
59 </para></listitem>
|
|
60 <listitem><para>
|
|
61 <emphasis role="bold">SDL</emphasis> - it's not mandatory, but can help in
|
|
62 some cases (bad audio, video cards that lag strangely with the xv driver).
|
|
63 Always use the newest (beginning from 1.2.x).
|
|
64 </para></listitem>
|
|
65 <listitem><para>
|
|
66 <emphasis role="bold">libjpeg</emphasis> - optional JPEG decoder, used by the <option>-mf</option>
|
|
67 option and some QT MOV files. Useful for both MPlayer and MEncoder if
|
|
68 you plan to work with jpeg files.
|
|
69 </para></listitem>
|
|
70 <listitem><para>
|
|
71 <emphasis role="bold">libpng</emphasis> - recommended and default (M)PNG decoder. Required for GUI.
|
|
72 Useful for both <application>MPlayer</application> and
|
|
73 <application>MEncoder</application>.
|
|
74 </para></listitem>
|
|
75 <listitem><para>
|
|
76 <emphasis role="bold">lame</emphasis> - recommended, needed for encoding MP3 audio with
|
|
77 <application>MEncoder</application>, suggested version is
|
|
78 <emphasis>always the newest</emphasis> (at least 3.90).
|
|
79 </para></listitem>
|
|
80 <listitem><para>
|
|
81 <emphasis role="bold">libogg</emphasis> - optional, needed for playing OGG file format.
|
|
82 </para></listitem>
|
|
83 <listitem><para>
|
|
84 <emphasis role="bold">libvorbis</emphasis> - optional, needed for playing OGG Vorbis audio.
|
|
85 </para></listitem>
|
|
86 <listitem><para>
|
|
87 <emphasis role="bold"><ulink url="http://www.live.com/mplayer/">LIVE.COM Streaming Media</ulink></emphasis>
|
|
88 - optional, needed for playing RTSP/RTP streams.
|
|
89 </para></listitem>
|
|
90 <listitem><para>
|
|
91 <emphasis role="bold">directfb</emphasis> - optional, from
|
|
92 <ulink url="http://www.directfb.org"/>
|
|
93 </para></listitem>
|
|
94 <listitem><para>
|
|
95 <emphasis role="bold">cdparanoia</emphasis> - optional, for CDDA support
|
|
96 </para></listitem>
|
|
97 <listitem><para>
|
|
98 <emphasis role="bold">libfreetype</emphasis> - optional, for TTF fonts
|
|
99 support. At least 2.0.9 is required.
|
|
100 </para></listitem>
|
|
101 <listitem><para>
|
|
102 <emphasis role="bold">libxmms</emphasis> - optional, for XMMS input plugin
|
|
103 support. At least 1.2.7 is required.
|
|
104 </para></listitem>
|
|
105 </itemizedlist>
|
|
106 </sect2>
|
|
107
|
|
108
|
|
109 <sect2>
|
|
110 <title>Codecs</title>
|
|
111
|
|
112 <itemizedlist>
|
|
113 <listitem><para>
|
|
114 <emphasis role="bold">libavcodec</emphasis>: This codec package is capable
|
|
115 of decoding H263/MJPEG/RV10/DivX3/DivX4/DivX5/MP41/MP42/WMV1 encoded video
|
|
116 streams and WMA (Windows Media Audio) v1/v2 audio streams, on multiple
|
|
117 platforms. It is also known to be the fastest for this task. See the
|
|
118 <link linkend="ffmpeg">this section</link> section for details. Features:
|
|
119 <itemizedlist>
|
|
120 <listitem><simpara>
|
|
121 gain decoding of videos mentioned above, on non-x86 machines
|
|
122 </simpara></listitem>
|
|
123 <listitem><simpara>
|
|
124 encoding with most of the mentioned codecs
|
|
125 </simpara></listitem>
|
|
126 <listitem><simpara>
|
|
127 this codec is the <emphasis role="bold">fastest codec available</emphasis> for
|
|
128 DivX/3/4/5 and other MPEG4 types. Recommended!
|
|
129 </simpara></listitem>
|
|
130 </itemizedlist>
|
|
131 </para></listitem>
|
|
132 <listitem><para>
|
|
133 <emphasis role="bold">Win32 codecs</emphasis>: If you plan to use
|
|
134 <application>MPlayer</application> on x86 architecture, you will possibly need
|
|
135 them. Download the Win32 codecs from our
|
|
136 <ulink url="http://www.mplayerhq.hu/MPlayer/releases/codecs/">codecs page</ulink>
|
|
137 and install them to <filename class="directory">/usr/lib/win32</filename>
|
|
138 <emphasis role="bold">BEFORE</emphasis> compiling <application>MPlayer</application>,
|
|
139 otherwise no Win32 support will be compiled!
|
|
140 <note><para>The avifile project has similar codecs package, but it
|
|
141 differs from ours, so if you want to use all supported codecs, then use
|
|
142 our package (do not worry, avifile works with it without problems).</para>
|
|
143 </note>
|
|
144 Features:
|
|
145 <itemizedlist>
|
|
146 <listitem><simpara>
|
|
147 you need this if you want to play or encode for example movies recorded
|
|
148 with various hardware compressors, like tuner cards, digital cameras
|
|
149 (example: DV, ATI VCR, MJPEG)
|
|
150 </simpara></listitem>
|
|
151 <listitem><simpara>
|
|
152 needed if you want to play <emphasis role="bold">WMV8, WMV9/WMA9 movies</emphasis>.
|
|
153 </simpara></listitem>
|
|
154 <listitem><simpara>
|
|
155 Not needed for old ASF's with MP41 or MP42 video (though VoxWare audio is
|
|
156 frequent for these files - it's done by the Win32 codec), or WMV7. Also not
|
|
157 needed for WMA (Windows Media Audio), libavcodec has opensource decoder for that.
|
|
158 </simpara></listitem>
|
|
159 </itemizedlist>
|
|
160 </para></listitem>
|
|
161 <listitem><para>
|
|
162 <emphasis role="bold">QuickTime codecs</emphasis>: on x86 platforms these
|
|
163 codecs can be used to decode Sorenson v1/v3, RPZA, and other QuickTime video,
|
|
164 and QDesign audio streams. Installation instructions can be found in the
|
|
165 <link linkend="sorenson">Sorenson video codec</link> section.
|
|
166 </para></listitem>
|
|
167 <listitem><para>
|
|
168 <emphasis role="bold">DivX4/DivX5</emphasis>: information about this codec is
|
|
169 available in the <link linkend="divx4-5">DivX4/DivX5</link>. You possibly
|
|
170 don't want this codec as <emphasis role="bold">libavcodec</emphasis> (see
|
|
171 above) is much faster and has better quality than this, for both decoding
|
|
172 and encoding. Features:
|
|
173 <itemizedlist>
|
|
174 <listitem><simpara>
|
|
175 1 pass or 2 pass encoding with <link linkend="mencoder">MEncoder</link>
|
|
176 </simpara></listitem>
|
|
177 <listitem><simpara>
|
|
178 can play old <emphasis role="bold">DivX3</emphasis> movies much faster than
|
|
179 the Win32 DLL but slower than <emphasis role="bold">libavcodec</emphasis>!
|
|
180 </simpara></listitem>
|
|
181 <listitem><simpara>
|
|
182 it's closed-source, and only a x86 version is available.
|
|
183 </simpara></listitem>
|
|
184 </itemizedlist>
|
|
185 </para></listitem>
|
|
186 <listitem><para>
|
|
187 <emphasis role="bold">XviD</emphasis>: Open source encoding alternative to
|
|
188 Divx4Linux. Features:
|
|
189 <itemizedlist>
|
|
190 <listitem><simpara>
|
|
191 1 pass or 2 pass encoding with <link linkend="mencoder">MEncoder</link>
|
|
192 </simpara></listitem>
|
|
193 <listitem><simpara>
|
|
194 it's open-source, so it's multiplatform.
|
|
195 </simpara></listitem>
|
|
196 <listitem><simpara>
|
|
197 it's about 2 times faster than divx4 when encoding - about the same
|
|
198 quality
|
|
199 </simpara></listitem>
|
|
200 </itemizedlist>
|
|
201 </para></listitem>
|
|
202 <listitem><para>
|
|
203 The <emphasis role="bold"><link linkend="xanim">XAnim codecs</link></emphasis>
|
|
204 are the best (full screen, hardware YUV zoom) for decoding
|
|
205 <emphasis role="bold">3ivx</emphasis> and Indeo 3/4/5 movies, and some old
|
|
206 formats. And they are multiplatform, so this is the only way to play Indeo on
|
|
207 non-x86 platforms (well, apart from using XAnim:). But for example Cinepak movies
|
|
208 are best played with <application>MPlayer</application>'s own Cinepak decoder!
|
|
209 </para></listitem>
|
|
210 <listitem><para>
|
|
211 For <emphasis role="bold">Ogg Vorbis</emphasis> audio decoding you need to
|
|
212 install <systemitem class="library">libvorbis</systemitem> properly. Use
|
|
213 deb/rpm packages if available, or compile from
|
|
214 <ulink url="http://ogg.org/ogg/vorbis/download/vorbis_nightly_cvs.tgz">source</ulink>
|
|
215 (this is a nightly updated tarball of Vorbis CVS).
|
|
216 </para></listitem>
|
|
217 <listitem><para>
|
|
218 <application>MPlayer</application> can use the libraries of RealPlayer 8
|
|
219 or RealONE to play files with <emphasis role="bold">RealVideo 2.0-4.0</emphasis>
|
|
220 video, and Sipro/Cook audio. See <link linkend="realmedia">RealMedia file format</link>
|
|
221 section for installation instructions and more information.
|
|
222 </para></listitem>
|
|
223 </itemizedlist>
|
|
224 </sect2>
|
|
225
|
|
226
|
|
227 <sect2 id="video-cards">
|
|
228 <title>Video cards</title>
|
|
229
|
|
230 <para>
|
|
231 There are generally two kind of video cards. One kind (the newer cards) has
|
|
232 <emphasis role="bold">hardware scaling and YUV acceleration</emphasis> support,
|
|
233 the other cards don't.
|
|
234 </para>
|
|
235
|
|
236
|
|
237 <sect3 id="yuv-cards">
|
|
238 <title>YUV cards</title>
|
|
239
|
|
240 <para>
|
|
241 They can display and scale (zoom) the picture to any size that fits in
|
|
242 their memory, with <emphasis role="bold">small CPU usage</emphasis> (even when
|
|
243 zooming), thus fullscreen is nice and very fast.
|
|
244
|
|
245 <itemizedlist>
|
|
246 <listitem><para>
|
|
247 <emphasis role="bold">Matrox G200/G400/G450/G550 cards</emphasis>: although a
|
|
248 <link linkend="vidix">Vidix driver</link> is provided, it is recommended to
|
|
249 use the mga_vid module instead, for it works much better.
|
|
250 Please see the <link linkend="mga_vid">mga_vid</link> section about its
|
|
251 installation and usage. It is important to do these steps
|
|
252 <emphasis>before</emphasis> compiling <application>MPlayer</application>,
|
|
253 otherwise no mga_vid support will be built. Also check out the
|
|
254 <link linkend="tvout-mga-g400">Matrox TV-out</link> section. If you
|
|
255 <emphasis role="bold"> If you don't use Linux</emphasis>, your only
|
|
256 possibility is the VIDIX driver: read <link linkend="vidix">VIDIX</link> section.
|
|
257 </para></listitem>
|
|
258 <listitem><para>
|
|
259 <emphasis role="bold">3Dfx Voodoo3/Banshee cards</emphasis>: please see
|
|
260 <link linkend="tdfxfb">tdfxfb</link> section in order to gain big speedup.
|
|
261 It is important to do these steps <emphasis role="bold">before</emphasis>
|
|
262 compiling <application>MPlayer</application>, otherwise no 3Dfx support will be
|
|
263 built. Also see the <link linkend="tvout-voodoo">3dfx TV-out section</link>.
|
|
264 If you use X, use at least <emphasis role="bold">4.2.0</emphasis>, as 3dfx Xv
|
|
265 driver was broken in 4.1.0, and earlier releases.
|
|
266 </para></listitem>
|
|
267 <listitem><para>
|
|
268 <emphasis role="bold">ATI cards</emphasis>: <link linkend="vidix">VIDIX</link>
|
|
269 driver is provided for the following cards:
|
|
270 <emphasis role="bold">Radeon, Rage128, Mach64</emphasis> (Rage XL/Mobility, Xpert98).
|
|
271 Also see the <link linkend="tvout-ati">ATI cards section</link> of the TV-out documentation,
|
|
272 to know if you card's TV-out is supported under Linux/<application>MPlayer</application>.
|
|
273 </para></listitem>
|
|
274 <listitem><para>
|
|
275 <emphasis role="bold">S3 cards</emphasis>: the Savage and Virge/DX chips have
|
|
276 hardware acceleration. Use as new XFree86 version as possible, older drivers are
|
|
277 buggy. Savage chips have problems with YV12 display, see <link linkend="s3">S3 Xv
|
|
278 section</link> for details. Older, Trio cards have no, or slow hardware
|
|
279 support.
|
|
280 </para></listitem>
|
|
281 <listitem><para>
|
|
282 <emphasis role="bold">nVidia cards</emphasis>: very bad choice for video playing.
|
|
283 If you do not have a GeForce2 (or newer) card, it's not likely to work without bugs.
|
|
284 <emphasis role="bold">the built-in nVidia driver in XFree86 doesn't contain
|
|
285 support for hardware YUV acceleration for all nVidia cards.</emphasis> You have
|
|
286 to download nVidia's closed-source drivers from nVidia.com. See the <link
|
|
287 linkend="nvidia">nVidia Xv driver</link> section for details. Please also check
|
|
288 the <link linkend="tvout-nvidia">nVidia TV-out section</link> if you wish to
|
|
289 use a TV.
|
|
290 </para></listitem>
|
|
291 <listitem><para>
|
|
292 <emphasis role="bold">3DLabs GLINT R3 and Permedia3</emphasis>: a VIDIX driver
|
|
293 is provided (pm3_vid). Please see the <link linkend="vidix">VIDIX</link> section
|
|
294 for details.
|
|
295 </para></listitem>
|
|
296 <listitem><para>
|
|
297 <emphasis role="bold">Other cards</emphasis>: none of the above?
|
|
298 <itemizedlist>
|
|
299 <listitem><simpara>
|
|
300 Try if the XFree86 driver (and your card) supports hardware
|
|
301 acceleration. See the <link linkend="xv">Xv section</link> for details.
|
|
302 </simpara></listitem>
|
|
303 <listitem><simpara>
|
|
304 If it doesn't, then your card's video features aren't supported under
|
|
305 your operating system :( If it does hardware scaling under Windows, it
|
|
306 doesn't mean it will do the same under Linux or other OS, it depends on
|
|
307 the drivers. Most manufacturers don't make Linux drivers nor release chip
|
|
308 specs - so you're unlucky if using their cards.
|
|
309 See <xref linkend="non-yuv-cards"/>.
|
|
310 </simpara></listitem>
|
|
311 </itemizedlist>
|
|
312 </para></listitem>
|
|
313 </itemizedlist>
|
|
314 </para>
|
|
315 </sect3>
|
|
316
|
|
317
|
|
318 <sect3 id="non-yuv-cards" xreflabel="Non-YUV cards">
|
|
319 <title>Non-YUV cards</title>
|
|
320
|
|
321 <para>
|
|
322 Fullscreen playing can be achieved by either enabling <emphasis role="bold">
|
|
323 software scaling</emphasis> (use the <option>-zoom</option> or <option>-vop</option>,
|
|
324 but i warn you: this is slow), or switching to a smaller video mode, for example
|
|
325 352x288. If you don't have YUV acceleration, this latter method is recommended.
|
|
326 Video mode switching can be enabled by using the <option>-vm</option> option and
|
|
327 it works with the following drivers:
|
|
328 <itemizedlist>
|
|
329 <listitem><simpara>
|
|
330 <emphasis role="bold">using</emphasis> XFree86: see details in <link linkend="dga">DGA driver</link> and
|
|
331 <link linkend="x11">X11 driver</link> sections. DGA is recommended! Also
|
|
332 try DGA via SDL, sometimes it's better.
|
|
333 </simpara></listitem>
|
|
334 <listitem><simpara>
|
|
335 <emphasis role="bold">not using</emphasis> XFree86: try the drivers in the
|
|
336 following order:
|
|
337 <link linkend="vesa">vesa</link>,
|
|
338 <link linkend="fbdev">fbdev</link>,
|
|
339 <link linkend="svgalib">svgalib</link>,
|
|
340 <link linkend="aalib">aalib</link>.
|
|
341 </simpara></listitem>
|
|
342 </itemizedlist>
|
|
343 </para>
|
|
344 </sect3>
|
|
345
|
|
346 <!-- FIXME: find a more logical organization for this section -->
|
|
347 <sect3 id="cirrus-logic-cards" xreflabel="Cirrus-Logic cards">
|
|
348 <title>Cirrus-Logic cards</title>
|
|
349 <itemizedlist>
|
|
350 <listitem><para>
|
|
351 GD 7548: present on-board and tested in Compaq Armada 41xx notebook series.
|
|
352 <itemizedlist>
|
|
353 <listitem><simpara>
|
|
354 XFree86 3: works in 8/16bpp modes. However, the driver is dramatically slow
|
|
355 and buggy in 800x600@16bpp. <emphasis role="bold">Recommended: 640x480@16bpp</emphasis>
|
|
356 </simpara></listitem>
|
|
357 <listitem><simpara>
|
|
358 XFree86 4: the Xserver freezes soon after start unless acceleration is
|
|
359 disabled, but then the whole thing gets slower than XFree86 3. No XVideo.
|
|
360 </simpara></listitem>
|
|
361 <listitem><simpara>
|
|
362 FBdev: framebuffer can be turned on with the <systemitem>clgenfb</systemitem>
|
|
363 driver in the kernel, though for me it worked only in 8bpp, thus unusable.
|
|
364 The clgenfb source had to be extended with the 7548 ID before compilation.
|
|
365 </simpara></listitem>
|
|
366 <listitem><simpara>
|
|
367 VESA: the card is only VBE 1.2 capable, so VESA output can't be used. Can't
|
|
368 be workarounded with UniVBE.
|
|
369 </simpara></listitem>
|
|
370 <listitem><simpara>
|
|
371 SVGAlib: detects an older Cirrus chip. Usable but slow with
|
|
372 <option>-bpp 8</option>.
|
|
373 </simpara></listitem>
|
|
374 </itemizedlist>
|
|
375 </para></listitem>
|
|
376 </itemizedlist>
|
|
377 </sect3>
|
|
378 </sect2>
|
|
379
|
|
380
|
|
381 <sect2 id="sounc-cards">
|
|
382 <title>Sound cards</title>
|
|
383
|
|
384 <itemizedlist>
|
|
385 <listitem><simpara>
|
|
386 <emphasis role="bold">Soundblaster Live!</emphasis>: with this card you can use
|
|
387 4 or 6 (5.1) channels AC3 decoding instead of 2. Read the
|
|
388 <link linkend="swac3">Software AC3 decoding</link> section. For hardware AC3
|
|
389 passthrough you <emphasis role="bold">must</emphasis> use ALSA 0.9 oss emulation!
|
|
390 </simpara></listitem>
|
|
391 <listitem><simpara>
|
|
392 <emphasis role="bold">C-Media with SP/DIF out</emphasis>: hardware AC3
|
|
393 passthrough is possible with these cards, see
|
|
394 <link linkend="hwac3">Hardware AC3 decoding</link> section.
|
|
395 </simpara></listitem>
|
|
396 <listitem><simpara>
|
|
397 Features of <emphasis role="bold">other cards</emphasis> aren't supported by
|
|
398 <application>MPlayer</application>. <emphasis role="bold">It's very recommended
|
|
399 to read the <link linkend="audio-dev">sound card</link> section!</emphasis>
|
|
400 </simpara></listitem>
|
|
401 </itemizedlist>
|
|
402 </sect2>
|
|
403
|
|
404
|
|
405 <sect2>
|
|
406 <title>Features</title>
|
|
407
|
|
408 <itemizedlist>
|
|
409 <listitem><para>
|
|
410 Decide if you need GUI. If you do, see the <link linkend="gui">GUI
|
|
411 section</link> before compiling.
|
|
412 </para></listitem>
|
|
413 <listitem><para>
|
|
414 If you want to install <application>MEncoder</application> (our great
|
|
415 all-purpose encoder), see the <link linkend="mencoder">MEncoder section</link>.
|
|
416 </para></listitem>
|
|
417 <listitem><para>
|
|
418 If you have a V4L compatible <emphasis role="bold">TV tuner</emphasis> card,
|
|
419 and wish to watch/grab and encode movies with <application>MPlayer</application>,
|
|
420 read the <link linkend="tv-input">TV input</link> section.
|
|
421 </para></listitem>
|
|
422 <listitem><para>
|
|
423 There is a neat <emphasis role="bold">OSD Menu</emphasis> support ready to be
|
|
424 used. Check the <link linkend="subosd">OSD menu</link> section.
|
|
425 </para></listitem>
|
|
426 </itemizedlist>
|
|
427
|
|
428 <para>
|
|
429 Then build <application>MPlayer</application>:
|
|
430 <screen>
|
|
431 ./configure
|
|
432 make
|
|
433 make install</screen>
|
|
434 </para>
|
|
435
|
|
436 <para>
|
|
437 At this point, <application>MPlayer</application> is ready to use. The
|
|
438 directory <filename class="directory">$PREFIX/share/mplayer</filename>
|
|
439 contains the <filename>codecs.conf</filename> file, which is used to tell
|
|
440 the program all the codecs and their capabilities. This file should always
|
|
441 be kept up to date together with the main binary. Check if you have
|
|
442 <filename>codecs.conf</filename> in your home directory
|
|
443 (<filename>~/.mplayer/codecs.conf</filename>) left from old
|
|
444 <application>MPlayer</application> versions, and remove it.
|
|
445 </para>
|
|
446
|
|
447 <para>
|
|
448 Debian users can build a .deb package for themselves, it's very simple.
|
|
449 Just exec
|
|
450 <screen>fakeroot debian/rules binary</screen>
|
|
451 in <application>MPlayer</application>'s root directory. See
|
|
452 <link linkend="debian">Debian packaging</link> for detailled instructions.
|
|
453 </para>
|
|
454
|
|
455 <para>
|
|
456 <emphasis role="bold">Always browse the output of</emphasis>
|
|
457 <filename>./configure</filename>, and the
|
|
458 <filename>configure.log</filename> file, they contain information about
|
|
459 what will be built, and what will not. You may also want to view
|
|
460 <filename>config.h</filename> and <filename>config.mak</filename> files.
|
|
461 If you have some libraries installed, but not detected by
|
|
462 <filename>./configure</filename>, then check if you also have the proper
|
|
463 header files (usually the -dev packages) and their version matches. The
|
|
464 <filename>configure.log</filename> file usually tells you what is missing.
|
|
465 </para>
|
|
466
|
|
467 <para>
|
|
468 Though not mandatory, the fonts should be installed in order to gain OSD,
|
|
469 and subtitle functionality. The recommended method is installing a TTF
|
|
470 font file and telling MPlayer to use it. See the <link linkend="subosd">Subtitles
|
|
471 and OSD</link> section for details.
|
|
472 </para>
|
|
473
|
|
474 </sect2>
|
|
475 </sect1>
|
|
476
|
|
477 <!-- ********** -->
|
|
478
|
|
479 <sect1 id="gui">
|
|
480 <title>What about the GUI?</title>
|
|
481
|
|
482 <para>
|
|
483 The GUI needs GTK 1.2.x (it isn't fully GTK, but the panels are). The skins
|
|
484 are stored in PNG format, so GTK, <systemitem class="library">libpng</systemitem>
|
|
485 (and their devel stuff, usualy called <systemitem class="library">gtk-dev</systemitem>
|
|
486 and <systemitem class="library">libpng-dev</systemitem>) has to be installed.
|
|
487 You can build it by specifying <option>--enable-gui</option> during
|
|
488 <filename>./configure</filename>. Then, to turn on GUI mode, you either
|
|
489 <itemizedlist>
|
|
490 <listitem><para>
|
|
491 specify <literal>gui=yes</literal> in your config file
|
|
492 </para></listitem>
|
|
493 <listitem><para>
|
|
494 execute
|
|
495 <screen>ln -s $PREFIX/bin/mplayer $PREFIX/bin/gmplayer</screen>
|
|
496 and call <command>gmplayer</command> instead.
|
|
497 </para></listitem>
|
|
498 </itemizedlist>
|
|
499 </para>
|
|
500
|
|
501 <para>
|
|
502 Currently you can't use the <option>-gui</option> option on the command
|
|
503 line, due to technical reasons.
|
|
504 </para>
|
|
505
|
|
506 <para>
|
|
507 As <application>MPlayer</application> doesn't have a skin included, you
|
|
508 have to download them if you want to use the GUI. See the <ulink
|
|
509 url="http://www.mplayerhq.hu/homepage/dload.html">download page</ulink>.
|
|
510 They should be extracted to the usual system-wide directory (<filename
|
|
511 class="directory">$PREFIX/share/mplayer/Skin</filename>), or to <filename
|
|
512 class="directory">$HOME/.mplayer/Skin</filename>.
|
|
513 <application>MPlayer</application> by default looks in these directories
|
|
514 for a directory named <filename class="directory">default</filename>, but
|
|
515 you can use the <option>-skin <replaceable>newskin</replaceable></option>
|
|
516 option, or the <literal>skin=newskin</literal> config file directive to use
|
|
517 the skin in <filename class="directory">*/Skin/newskin</filename>
|
|
518 directory.
|
|
519 </para>
|
|
520 </sect1>
|
|
521
|
|
522 <!-- ********** -->
|
|
523
|
|
524 <sect1 id="subosd">
|
|
525 <title>Subtitles and OSD</title>
|
|
526
|
|
527 <para>
|
|
528 MPlayer can display subtitles along with movie files. Currently the
|
|
529 following formats are supported:
|
|
530 <itemizedlist>
|
|
531 <listitem><para>VobSub</para></listitem>
|
|
532 <listitem><para>OGM</para></listitem>
|
|
533 <listitem><para>CC (closed caption)</para></listitem>
|
|
534 <listitem><para>Microdvd</para></listitem>
|
|
535 <listitem><para>SubRip</para></listitem>
|
|
536 <listitem><para>SubViewer</para></listitem>
|
|
537 <listitem><para>Sami</para></listitem>
|
|
538 <listitem><para>VPlayer</para></listitem>
|
|
539 <listitem><para>RT</para></listitem>
|
|
540 <listitem><para>SSA</para></listitem>
|
|
541 <listitem><para><link linkend="mpsub">MPsub</link></para></listitem>
|
|
542 <listitem><para>AQTitle</para></listitem>
|
|
543 <listitem><para>JACOsub</para></listitem>
|
|
544 </itemizedlist>
|
|
545 </para>
|
|
546
|
|
547 <para>
|
|
548 MPlayer can dump the previously listed subtitle formats
|
|
549 (<emphasis role="bold">except the three first</emphasis>) into the following
|
|
550 destination formats, with the given options:
|
|
551 <itemizedlist>
|
|
552 <listitem><para>MPsub: <option>-dumpmpsub</option></para></listitem>
|
|
553 <listitem><para>SubRip: <option>-dumpsrtsub</option></para></listitem>
|
|
554 <listitem><para>Microdvd: <option>-dumpmicrodvdsub</option></para></listitem>
|
|
555 <listitem><para>JACOsub: <option>-dumpjacosub</option></para></listitem>
|
|
556 <listitem><para>Sami: <option>-dumpsami</option></para></listitem>
|
|
557 </itemizedlist>
|
|
558 </para>
|
|
559
|
|
560 <para>
|
|
561 The command line options differ slightly for the different formats:
|
|
562 </para>
|
|
563
|
|
564 <formalpara>
|
|
565 <title>VobSub subtitles</title>
|
|
566 <para>
|
|
567 VobSub subtitles consist of a big (some megabytes) <filename>.SUB</filename> file,
|
|
568 and optional <filename>.IDX</filename> and/or <filename>.IFO</filename>
|
|
569 files. If you have files like <filename>sample.sub</filename>,
|
|
570 <filename>sample.ifo</filename> (optional), <filename>sample.idx</filename> -
|
|
571 you have to pass <application>MPlayer</application> the
|
|
572 <option>-vobsub sample [-vobsubid <replaceable>id</replaceable>]</option> options
|
|
573 (full path optional). The <option>-vobsubid</option> option is like
|
|
574 <option>-sid</option> for DVDs, you can choose between subtitle tracks
|
|
575 (languages) with it. In case that <option>-vobsubid</option> is omitted,
|
|
576 <application>MPLayer</application> will try to use the languages given by the
|
|
577 <option>-slang</option> option and fall back to the <systemitem>langidx</systemitem>
|
|
578 in the <filename>.IDX</filename> file to set the subtitle language. If it fails,
|
|
579 there will be no subtitles.
|
|
580 </para>
|
|
581 </formalpara>
|
|
582
|
|
583 <formalpara>
|
|
584 <title>Other subtitles</title>
|
|
585 <para>
|
|
586 The other formats consist of a single text file containing timing,
|
|
587 placement and text information. Usage: If you have a file like
|
|
588 <filename>sample.txt</filename>, you have to pass the option <option>-sub
|
|
589 sample.txt</option> (full path optional).
|
|
590 </para>
|
|
591 </formalpara>
|
|
592
|
|
593 <variablelist>
|
|
594 <title>Adjusting subtitle timing and placement:</title>
|
|
595 <varlistentry>
|
|
596 <term><option>-subdelay <replaceable>sec</replaceable></option></term>
|
|
597 <listitem><simpara>
|
|
598 Delays subtitles by <option><replaceable>sec</replaceable></option> seconds.
|
|
599 Can be negative.
|
|
600 </simpara></listitem>
|
|
601 </varlistentry>
|
|
602 <varlistentry>
|
|
603 <term><option>-subfps <replaceable>RATE</replaceable></option></term>
|
|
604 <listitem><simpara>
|
|
605 Specify frame/sec rate of subtitle file (float number).
|
|
606 </simpara></listitem>
|
|
607 </varlistentry>
|
|
608 <varlistentry>
|
|
609 <term><option>-subpos <replaceable>0-100</replaceable></option></term>
|
|
610 <listitem><simpara>
|
|
611 Specify the position of subtitles.
|
|
612 </simpara></listitem>
|
|
613 </varlistentry>
|
|
614 </variablelist>
|
|
615
|
|
616 <para>
|
|
617 If you experience a growing delay between the movie and the subtitles when
|
|
618 using a MicroDVD subtitle file, most likely the frame rate of the movie and
|
|
619 the subtitle file are different. Please note that the MicroDVD subtitle
|
|
620 format uses absolute frame numbers for its timing, and therefore the
|
|
621 <option>-subfps</option> option cannot be used with this format. As
|
|
622 <application>MPlayer</application> has no way to guess the frame rate of
|
|
623 the subtitle file, you have to manually convert the frame rate. There is a
|
|
624 little perl script in the <filename class="directory">contrib</filename>
|
|
625 directory of the MPlayer FTP site to do this conversion for you.
|
|
626 </para>
|
|
627
|
|
628 <para>
|
|
629 About DVD subtitles, read the <link linkend="dvd">DVD section</link>.
|
|
630 </para>
|
|
631
|
|
632
|
|
633 <sect2 id="mpsub">
|
|
634 <title>MPlayer's own subtitle format</title>
|
|
635
|
|
636 <para>
|
|
637 <application>MPlayer</application> introduces a new subtitle format called
|
|
638 <emphasis role="bold">MPsub</emphasis>. It was designed by Gabucino. Basically
|
|
639 its main feature is being <emphasis>dynamically</emphasis> time-based (although
|
|
640 it has frame-based mode too). Example (from <ulink
|
|
641 url="../../tech/mpsub.sub">DOCS/tech/mpsub.sub</ulink>):
|
|
642 <programlisting>
|
|
643 # first number : wait this much after previous subtitle disappeared
|
|
644 # second number : display the current subtitle for this many seconds
|
|
645
|
|
646 15 3
|
|
647 A long long, time ago...
|
|
648
|
|
649 0 3
|
|
650 in a galaxy far away...
|
|
651
|
|
652 0 3
|
|
653 Naboo was under an attack.<!--
|
|
654 --></programlisting>
|
|
655 </para>
|
|
656
|
|
657 <para>
|
|
658 So you see, the main goal was to <emphasis role="bold">make subtitle
|
|
659 editing/timing/joining/cutting easy</emphasis>. And, if you - say - get an
|
|
660 SSA subtitle but it's badly timed/delayed to your version of the movie, you
|
|
661 simply do a
|
|
662 <screen>mplayer dummy.avi -sub source.ssa -dumpmpsub</screen>
|
|
663 A <filename>dump.mpsub</filename> file will be created in the
|
|
664 current directory, which will contain the source subtitle's text, but in
|
|
665 <emphasis role="bold">MPsub</emphasis> format. Then you can freely add/subtract
|
|
666 seconds to/from the subtitle.
|
|
667 </para>
|
|
668
|
|
669 <para>
|
|
670 Subtitles are displayed with a technique called <emphasis role="bold">'OSD',
|
|
671 On Screen Display</emphasis>.OSD is used to display current time, volume bar,
|
|
672 seek bar etc.
|
|
673 </para>
|
|
674 </sect2>
|
|
675
|
|
676
|
|
677 <sect2 id="mpsub-install">
|
|
678 <title>Installing OSD and subtitles</title>
|
|
679
|
|
680 <para>
|
|
681 You need an MPlayer font package to be able to use OSD/SUB feature.
|
|
682 There are many ways to get it:
|
|
683 </para>
|
|
684
|
|
685 <itemizedlist>
|
|
686 <listitem><para>
|
|
687 Download ready-to-use font packages from MPlayer site. Note: currently
|
|
688 available fonts are limited for ISO 8859-1/2 support, but there are some
|
|
689 other (including Korean, Russian, ISO 8859-8 etc) fonts at contrib/font
|
|
690 section of FTP, made by users.
|
|
691 </para><para>
|
|
692 <!-- FIXME: this para should be before the list -->
|
|
693 Font should have appropriate <filename>font.desc</filename> file which
|
|
694 maps unicode font positions to the actual code page of the subtitles
|
|
695 text. Other solution is to have subtitles encoded in UTF8 encoding and
|
|
696 use <option>-utf8</option> option or just name the subtitles file
|
|
697 <filename><video_name>.utf</filename> and have it in the same dir
|
|
698 as the video file. Recoding from different codepages to UTF8 could be
|
|
699 <!-- FIXME: iconv (Debian) konwert (Red Hat) instead? -->
|
|
700 done by using <command>konwert</command> (Debian) or
|
|
701 <command>iconv</command> (Red Hat) programs.
|
|
702 </para><para>
|
|
703
|
|
704 <table>
|
|
705 <title>Some URLs</title>
|
|
706 <tgroup cols="2">
|
|
707 <thead>
|
|
708 <row><entry>URL</entry><entry>Comment</entry></row>
|
|
709 </thead>
|
|
710 <tbody>
|
|
711 <row><entry>
|
|
712 <ulink url="ftp://ftp.mplayerhq.hu/MPlayer/releases/"></ulink>
|
|
713 </entry><entry>
|
|
714 ISO fonts
|
|
715 </entry></row>
|
|
716 <row><entry>
|
|
717 <ulink url="ftp://ftp.mplayerhq.hu/MPlayer/contrib/fonts/"></ulink>
|
|
718 </entry><entry>
|
|
719 various fonts by users
|
|
720 </entry></row>
|
|
721 <row><entry>
|
|
722 <ulink url="http://realtime.ssu.ac.kr/~lethean/mplayer"></ulink>
|
|
723 </entry><entry>
|
|
724 Korean fonts and RAW plugin
|
|
725 </entry></row>
|
|
726 </tbody>
|
|
727 </tgroup>
|
|
728 </table>
|
|
729
|
|
730 </para></listitem>
|
|
731 <listitem><para>
|
|
732 Use the font generator tool at <filename
|
|
733 class="directory">TOOLS/subfont-c</filename>. It's a complete tool to
|
|
734 convert from TTF/Type1/etc font to mplayer font pkg. (read
|
|
735 <filename>TOOLS/subfont-c/README</filename> for details)
|
|
736 </para></listitem>
|
|
737 <listitem><para>
|
|
738 Use the font generator GIMP plugin at <filename
|
|
739 class="directory">TOOLS/subfont-GIMP</filename> (note: you must have HSI
|
|
740 RAW plugin too, see URL below)
|
|
741 <!-- FIXME: where's that URL? -->
|
|
742 </para></listitem>
|
|
743 <listitem><para>
|
|
744 using a TrueType (TTF) font, by the means of the <systemitem class="library">freetype</systemitem>
|
|
745 library. Version 2.0.9 or greater is mandatory! Then you have two methods:
|
|
746 <itemizedlist>
|
|
747 <listitem><para>
|
|
748 use the <option>-font /path/to/arial.ttf</option> option to specify a
|
|
749 TrueType font file on every occasion
|
|
750 </para></listitem>
|
|
751 <listitem><para>
|
|
752 create a symlink:<screen>ln -s /path/to/arial.ttf ~/.mplayer/subfont.ttf</screen>
|
|
753 </para></listitem>
|
|
754 </itemizedlist>
|
|
755 </para></listitem>
|
|
756 </itemizedlist>
|
|
757
|
|
758 <para>
|
|
759 If you chose non-TTF fonts, UNZIP the file you downloaded to <filename
|
|
760 class="directory">~/.mplayer</filename> or <filename
|
|
761 class="directory">$PREFIX/share/mplayer</filename>. Then rename or symlink
|
|
762 one of the extracted directories to <filename>font</filename>, for example:
|
|
763
|
|
764 <screen>ln -s ~/.mplayer/arial-24 ~/.mplayer/font</screen>
|
|
765
|
|
766 Now you have to see a timer at the upper left corner of the movie (switch
|
|
767 it off with the <keycap>o</keycap> key).
|
|
768 </para>
|
|
769
|
|
770 <para>
|
|
771 OSD has 4 states (switch with <keycap>o</keycap>):
|
|
772
|
|
773 <orderedlist>
|
|
774 <listitem><simpara>
|
|
775 volume bar + seek bar (default)
|
|
776 </simpara></listitem>
|
|
777 <listitem><simpara>
|
|
778 volume bar + seek bar + timer + file position percentage on seeking
|
|
779 </simpara></listitem>
|
|
780 <listitem><simpara>
|
|
781 volume bar + seek bar + timer + total duration of the media
|
|
782 </simpara></listitem>
|
|
783 <listitem><simpara>
|
|
784 subtitles only
|
|
785 </simpara></listitem>
|
|
786 </orderedlist>
|
|
787
|
|
788 You can change default behaviour by setting <varname>osdlevel</varname>
|
|
789 variable in config file, or the <option>-osdlevel</option> command line option.
|
|
790
|
|
791 </para>
|
|
792 </sect2>
|
|
793
|
|
794
|
|
795 <sect2 id="osdmenu">
|
|
796 <title>OSD menu</title>
|
|
797
|
|
798 <para>
|
|
799 MPlayer has a completely user definiable OSD Menu interface.
|
|
800 </para>
|
|
801
|
|
802 <note><simpara>
|
|
803 the Preferences menu is currently UNIMPLEMENTED!
|
|
804 </simpara></note>
|
|
805
|
|
806 <orderedlist>
|
|
807 <title>Installation</title>
|
|
808 <listitem><simpara>
|
|
809 compile <application>MPlayer</application> by passing the <option>--enable-menu</option>
|
|
810 to <filename>./configure</filename>
|
|
811 </simpara></listitem>
|
|
812 <listitem><simpara>
|
|
813 make sure you have an OSD font installed
|
|
814 </simpara></listitem>
|
|
815 <listitem><simpara>
|
|
816 copy <filename>etc/menu.conf</filename> to your
|
|
817 <filename class="directory">.mplayer</filename> directory
|
|
818 </simpara></listitem>
|
|
819 <listitem><simpara>
|
|
820 copy <filename>etc/input.conf</filename> to your
|
|
821 <filename class="directory">.mplayer</filename> directory, or to the system-wide
|
|
822 <application>MPlayer</application> config dir (default:
|
|
823 <filename class="directory">/usr/local/etc/mplayer</filename>)
|
|
824 </simpara></listitem>
|
|
825 <listitem><simpara>
|
|
826 check and edit <filename>input.conf</filename> to enable menu movement keys
|
|
827 (it is described there).
|
|
828 </simpara></listitem>
|
|
829 <listitem><para>
|
|
830 start <application>MPlayer</application> by the following example:
|
|
831 <screen>$ mplayer -menu file.avi</screen>
|
|
832 </para></listitem>
|
|
833 <listitem><simpara>
|
|
834 push any menu key you defined
|
|
835 </simpara></listitem>
|
|
836 </orderedlist>
|
|
837
|
|
838 </sect2>
|
|
839 </sect1>
|
|
840
|
|
841 <!-- ********** -->
|
|
842
|
|
843 <sect1 id="rtc">
|
|
844 <title>RTC</title>
|
|
845 <para>
|
|
846 There are three timing methods in MPlayer.
|
|
847
|
|
848 <itemizedlist>
|
|
849 <listitem><simpara>
|
|
850 <emphasis role="bold">To use the old method</emphasis>, you don't have to do
|
|
851 anything. It uses <systemitem>usleep()</systemitem> to tune
|
|
852 A/V sync, with +/- 10ms accuracy. However sometimes the sync has to be
|
|
853 tuned even finer.
|
|
854 </simpara></listitem>
|
|
855 <listitem><para>
|
|
856 <emphasis role="bold">The new timer</emphasis> code uses PC's RTC (Real Time Clock)
|
|
857 for this task, because it has precise 1ms timers. It is automagically enabled
|
|
858 when available, but requires root privileges, a <emphasis>setuid root</emphasis>
|
|
859 <application>MPlayer</application> binary or a properly set up kernel.
|
|
860 If you are running kernel 2.4.19pre8 or later you can adjust the maximum RTC
|
|
861 frequency for normal users through the /proc filesystem. Use this command to
|
|
862 enable RTC for normal users:
|
|
863 <screen>echo 1024 > /proc/sys/dev/rtc/max-user-freq</screen>
|
|
864 If you do not have such a new kernel, you can also change one line in
|
|
865 <filename>drivers/char/rtc.c</filename> and recompile your kernel.
|
|
866 Find the section that reads
|
|
867 <programlisting>
|
|
868 * We don't really want Joe User enabling more
|
|
869 * than 64Hz of interrupts on a multi-user machine.
|
|
870 */
|
|
871 if ((rtc_freq > 64) && (!capable(CAP_SYS_RESOURCE)))
|
|
872 </programlisting>
|
|
873 and change the 64 to 1024. You should really know what you are doing, though.
|
|
874 You can see the new timer's efficiency in the status line.
|
|
875 The power management functions of some notebook BIOSes with speedstep CPUs
|
|
876 interact badly with RTC. Audio and video may get out of sync. Plugging the
|
|
877 external power connector in before you power up your notebook seems to help.
|
|
878 You can always turn off RTC support with the <option>-nortc</option> option.
|
|
879 In some hardware combinations (confirmed during usage of non-DMA DVD drive
|
|
880 on an ALi1541 board) usage of the RTC timer causes skippy playback. It's
|
|
881 recommended to use the third method in these cases.
|
|
882 </para></listitem>
|
|
883 <listitem><simpara>
|
|
884 <emphasis role="bold">The third timer code</emphasis> is turned on with the
|
|
885 <option>-softsleep</option> option. It has the efficiency of the RTC, but it
|
|
886 doesn't use RTC. On the other hand, it requires more CPU.
|
|
887 </simpara></listitem>
|
|
888 </itemizedlist>
|
|
889 <note><para><emphasis role="bold">NEVER install a setuid root
|
|
890 <application>MPlayer</application> binary on a multiuser system!</emphasis>
|
|
891 It's a clear way for everyone to become root.
|
|
892 </para></note>
|
|
893 </para>
|
|
894 </sect1>
|