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