Rename "ARM" section to "ARM Linux".
[mplayer/glamo.git] / DOCS / xml / en / ports.xml
blob761297366df51bc24c5880ce4d376bdba1950076
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- $Revision$ -->
3 <chapter id="ports" xreflabel="Ports">
4 <title>Ports</title>
6 <para>
7 Binary packages of <application>MPlayer</application> are available from several
8 sources. We have a list of places to get
9 <ulink url="http://www.mplayerhq.hu/design7/projects.html#unofficial_packages">unofficial packages</ulink>
10 for various systems on our homepage.
11 However, <emphasis role="bold">none of these packages are supported</emphasis>.
12 Report problems to the authors, not to us.
13 </para>
15 <sect1 id="linux">
16 <title>Linux</title>
18 <!-- ********** -->
20 <sect2 id="debian">
21 <title>Debian packaging</title>
23 <para>
24 To build a Debian package, run the following command in the
25 <application>MPlayer</application> source directory:
27 <screen>fakeroot debian/rules binary</screen>
29 If you want to pass custom options to configure, you can set up the
30 <envar>DEB_BUILD_OPTIONS</envar> environment variable. For instance,
31 if you want GUI and OSD menu support you would use:
33 <screen>DEB_BUILD_OPTIONS="--enable-gui --enable-menu" fakeroot debian/rules binary</screen>
35 You can also pass some variables to the Makefile. For example, if you want
36 to compile with gcc 3.4 even if it's not the default compiler:
38 <screen>CC=gcc-3.4 DEB_BUILD_OPTIONS="--enable-gui" fakeroot debian/rules binary</screen>
40 To clean up the source tree run the following command:
42 <screen>fakeroot debian/rules clean</screen>
44 As root you can then install the <filename>.deb</filename> package as usual:
46 <screen>dpkg -i ../mplayer_<replaceable>version</replaceable>.deb</screen>
47 </para>
48 </sect2>
50 <!-- ********** -->
52 <sect2 id="rpm">
53 <title>RPM packaging</title>
55 <para>
56 Dominik Mierzejewski maintains the official RPM packages of
57 <application>MPlayer</application> for Fedora and CentOS/RHEL. They are available
58 from <ulink url="http://rpmfusion.org/">RPMFusion repository</ulink>.
59 </para>
60 </sect2>
62 <!-- ********** -->
64 <sect2 id="arm_linux">
65 <title>ARM Linux</title>
67 <para>
68 <application>MPlayer</application> works on Linux PDAs with ARM CPU e.g. Sharp
69 Zaurus, Compaq Ipaq. The easiest way to obtain
70 <application>MPlayer</application> is to get it from one of the
71 <ulink url="http://www.openzaurus.org">OpenZaurus</ulink> package feeds.
72 If you want to compile it yourself, you should look at the
73 <ulink url="http://openzaurus.bkbits.net:8080/buildroot/src/packages/mplayer?nav=index.html|src/.|src/packages">mplayer</ulink>
74 and the
75 <ulink url="http://openzaurus.bkbits.net:8080/buildroot/src/packages/libavcodec?nav=index.html|src/.|src/packages">libavcodec</ulink>
76 directory in the OpenZaurus distribution buildroot. These always have the latest
77 Makefile and patches used for building a SVN <application>MPlayer</application>.
78 If you need a GUI frontend, you can use xmms-embedded.
79 </para>
80 </sect2>
81 </sect1>
84 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
87 <sect1 id="bsd">
88 <title>*BSD</title>
90 <para>
91 <application>MPlayer</application> runs on all known BSD flavors.
92 There are ports/pkgsrc/fink/etc versions of <application>MPlayer</application>
93 available that are probably easier to use than our raw sources.
94 </para>
96 <para>
97 If <application>MPlayer</application> complains about not finding
98 <filename>/dev/cdrom</filename> or <filename>/dev/dvd</filename>,
99 create an appropriate symbolic link:
100 <screen>ln -s /dev/<replaceable>your_cdrom_device</replaceable> /dev/cdrom</screen>
101 </para>
103 <para>
104 To use Win32 DLLs with <application>MPlayer</application> you will need to
105 re-compile the kernel with "<envar>option USER_LDT</envar>"
106 (unless you run FreeBSD-CURRENT,
107 where this is the default).
108 </para>
110 <!-- ********** -->
112 <sect2 id="freebsd">
113 <title>FreeBSD</title>
115 <para>
116 If your CPU has SSE, recompile your kernel with
117 "<envar>options CPU_ENABLE_SSE</envar>" (FreeBSD-STABLE or kernel
118 patches required).
119 </para>
120 </sect2>
122 <!-- ********** -->
124 <sect2 id="openbsd">
125 <title>OpenBSD</title>
127 <para>
128 Due to limitations in different versions of gas (relocation vs MMX), you
129 will need to compile in two steps: First make sure that the non-native as
130 is first in your <envar>$PATH</envar> and do a <command>gmake -k</command>, then
131 make sure that the native version is used and do <command>gmake</command>.
132 </para>
134 <para>
135 As of OpenBSD 3.4 the hack above is no longer needed.
136 </para>
137 </sect2>
139 <!-- ********** -->
141 <sect2 id="darwin">
142 <title>Darwin</title>
144 <para>
145 See the <link linkend="macos">Mac OS</link> section.
146 </para>
147 </sect2>
148 </sect1>
151 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
154 <sect1 id="unix">
155 <title>Commercial Unix</title>
157 <para>
158 <application>MPlayer</application> has been ported to a number of commercial
159 Unix variants. Since the development environments on these systems tend to be
160 different from those found on free Unixes, you may have to make some manual
161 adjustments to make the build work.
162 </para>
164 <!-- ********** -->
166 <sect2 id="solaris">
167 <title>Solaris</title>
169 <para>
170 Solaris still has broken, POSIX-incompatible system tools and shell in default
171 locations. Until a bold step out of the computing stone age is made, you will
172 have to add <filename>/usr/xpg4/bin</filename> to your
173 <systemitem>PATH</systemitem>.
174 </para>
176 <para>
177 <application>MPlayer</application> should work on Solaris 2.6 or newer.
178 Use the SUN audio driver with the <option>-ao sun</option> option for sound.
179 </para>
181 <para>
182 On <emphasis role="bold">UltraSPARCs</emphasis>,
183 <application>MPlayer</application> takes advantage of their
184 <emphasis role="bold">VIS</emphasis> extensions
185 (equivalent to MMX), currently only in
186 <systemitem class="library">libmpeg2</systemitem>,
187 <systemitem class="library">libvo</systemitem>
188 and <systemitem class="library">libavcodec</systemitem>, but not in
189 <systemitem class="library">mp3lib</systemitem>. You can watch a VOB file
190 on a 400MHz CPU. You'll need
191 <ulink url="http://www.sun.com/sparc/vis/mediaLib.html"><systemitem class="library">mLib</systemitem></ulink>
192 installed.
193 </para>
195 <para><emphasis role="bold">Caveat:</emphasis></para>
196 <itemizedlist>
197 <listitem><para>
198   <emphasis role="bold">mediaLib</emphasis> is
199   <emphasis role="bold">currently disabled</emphasis> by default in
200   <application>MPlayer</application> because of brokenness. SPARC users
201   who build MPlayer with mediaLib support have reported a thick,
202   green-tint on video encoded and decoded with libavcodec. You may enable
203   it if you wish with:
204   <screen>./configure --enable-mlib</screen>
205   You do this at your own risk. x86 users should
206   <emphasis role="bold">never</emphasis> use mediaLib, as this will
207   result in very poor MPlayer performance.
208 </para></listitem>
209 </itemizedlist>
211 <para>
212 On Solaris SPARC, you need the GNU C/C++ Compiler; it does not matter if
213 GNU C/C++ compiler is configured with or without the GNU assembler.
214 </para>
216 <para>
217 On Solaris x86, you need the GNU assembler and the GNU C/C++ compiler,
218 configured to use the GNU assembler! The <application>MPlayer</application>
219 code on the x86 platform makes heavy use of MMX, SSE and 3DNOW! instructions
220 that cannot be compiled using Sun's assembler
221 <filename>/usr/ccs/bin/as</filename>.
222 </para>
224 <para>
225 The <filename>configure</filename> script tries to find out, which assembler
226 program is used by your "gcc" command (in case the autodetection
227 fails, use the
228 <option>--as=<replaceable>/wherever/you/have/installed/gnu-as</replaceable></option>
229 option to tell the <filename>configure</filename> script where it can find GNU
230 "as" on your system).
231 </para>
233 <para>Solutions to common problems:</para>
234 <itemizedlist>
235 <listitem><para>
236   Error message from <filename>configure</filename> on a Solaris x86 system
237   using GCC without GNU assembler:
238   <screen>
239 % configure
241 Checking assembler (/usr/ccs/bin/as) ... , failed
242 Please upgrade(downgrade) binutils to 2.10.1...<!--
243   --></screen>
244   (Solution: Install and use a gcc configured with
245   <option>--with-as=gas</option>)
246 </para>
248 <para>
249 Typical error you get when building with a GNU C compiler that does not
250 use GNU as:
251 <screen>
252 % gmake
254 gcc -c -Iloader -Ilibvo -O4 -march=i686 -mcpu=i686 -pipe -ffast-math
255      -fomit-frame-pointer  -I/usr/local/include   -o mplayer.o mplayer.c
256 Assembler: mplayer.c
257 "(stdin)", line 3567 : Illegal mnemonic
258 "(stdin)", line 3567 : Syntax error
259 ... more "Illegal mnemonic" and "Syntax error" errors ...
260 </screen>
261 </para>
262 </listitem>
264 <listitem><para>
265   <application>MPlayer</application> may segfault when decoding
266   and encoding video that uses the win32codecs:
267   <screen>
269 Trying to force audio codec driver family acm...
270 Opening audio decoder: [acm] Win32/ACM decoders
271 sysi86(SI86DSCR): Invalid argument
272 Couldn't install fs segment, expect segfault
275 MPlayer interrupted by signal 11 in module: init_audio_codec
276 ...<!--
277   --></screen>
278   This is because of a change to sysi86() in Solaris 10 and pre-Solaris
279   Nevada b31 releases. This has been fixed in Solaris Nevada b32;
280   however, Sun has yet to backport the fix to Solaris 10. The MPlayer
281   Project has made Sun aware of the problem and a patch is currently in
282   progress for Solaris 10. More information about this bug can be found
283   at:
284   <ulink url="http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6308413"/>.
285 </para></listitem>
287 <listitem><para>
288 Due to bugs in Solaris 8,
289 you may not be able to play DVD discs larger than 4 GB:
290 </para>
292 <itemizedlist>
293 <listitem><para>
294   The sd(7D) driver on Solaris 8 x86 has a bug when accessing a disk block >4GB
295   on a device using a logical blocksize != DEV_BSIZE
296   (i.e. CD-ROM and DVD media).
297   Due to a 32Bit int overflow, a disk address modulo 4GB is accessed
298   (<ulink url="http://groups.yahoo.com/group/solarisonintel/message/22516"/>).
299   This problem does not exist in the SPARC version of Solaris 8.
300 </para></listitem>
302 <listitem><para>
303   A similar bug is present in the hsfs(7FS) file system code (AKA ISO9660),
304   hsfs may not not support partitions/disks larger than 4GB, all data is
305   accessed modulo 4GB
306   (<ulink url="http://groups.yahoo.com/group/solarisonintel/message/22592"/>).
307   The hsfs problem can be fixed by installing
308   patch 109764-04 (SPARC) / 109765-04 (x86).
309 </para></listitem>
310 </itemizedlist>
311 </listitem>
312 </itemizedlist>
313 </sect2>
315 <!-- ********** -->
317 <sect2 id="hp-ux">
318 <title>HP-UX</title>
320 <para>
321 Joe Page hosts a detailed HP-UX <application>MPlayer</application>
322 <ulink url="http://users.rcn.com/joepage/mplayer_on_hpux11.htm">HOWTO</ulink>
323 by Martin Gansser on his homepage. With these instructions the build should
324 work out of the box. The following information is taken from this HOWTO.
325 </para>
327 <para>
328 You need GCC 3.4.0 or later and SDL 1.2.7 or later.
329 HP cc will not produce a working program, prior GCC versions are buggy.
330 For OpenGL functionality you need to install Mesa and the gl and gl2 video
331 output drivers should work, speed may be very bad, depending on the CPU speed,
332 though. A good replacement for the rather poor native HP-UX sound system is
333 GNU esound.
334 </para>
336 <para>
337 Create the DVD device
338 scan the SCSI bus with:
340 <screen>
341 # ioscan -fn
343 Class          I            H/W   Path          Driver    S/W State    H/W Type        Description
345 ext_bus 1    8/16/5      c720  CLAIMED INTERFACE  Built-in SCSI
346 target  3    8/16/5.2    tgt   CLAIMED DEVICE
347 disk    4    8/16/5.<emphasis role="bold">2</emphasis>.<emphasis role="bold">0</emphasis>  sdisk CLAIMED DEVICE     <emphasis role="bold">PIONEER DVD-ROM DVD-305</emphasis>
348                          /dev/dsk/c1t2d0 <emphasis role="bold">/dev/rdsk/c1t2d0</emphasis>
349 target  4    8/16/5.7    tgt   CLAIMED DEVICE
350 ctl     <emphasis role="bold">1</emphasis>    8/16/5.7.0  sctl  CLAIMED DEVICE     Initiator
351                          /dev/rscsi/c1t7d0 /dev/rscsi/c1t7l0 /dev/scsi/c1t7l0
353 </screen>
355 The screen output shows a Pioneer DVD-ROM at SCSI address 2.
356 The card instance for hardware path 8/16 is 1.
357 </para>
359 <para>
360 Create a link from the raw device to the DVD device.
361 <screen>
362 ln -s /dev/rdsk/c<replaceable>&lt;SCSI bus instance&gt;</replaceable>t<replaceable>&lt;SCSI target ID&gt;</replaceable>d<replaceable>&lt;LUN&gt;</replaceable> /dev/<replaceable>&lt;device&gt;</replaceable>
363 </screen>
364 Example:
365 <screen>ln -s /dev/rdsk/c1t2d0 /dev/dvd</screen>
366 </para>
368 <para>
369 Below are solutions for some common problems:
371 <itemizedlist>
372 <listitem>
373   <para>
374   Crash at Start with the following error message:
375   <screen>
376 /usr/lib/dld.sl: Unresolved symbol: finite (code) from /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2/../../../libGL.sl<!--
377   --></screen>
378   </para>
379   <para>
380   This means that the function <systemitem>.finite().</systemitem> is not
381   available in the standard HP-UX math library.
382   Instead there is <systemitem>.isfinite().</systemitem>.
383   Solution: Use the latest Mesa depot file.
384   </para>
385 </listitem>
387 <listitem>
388   <para>
389   Crash at playback with the following error message:
390   <screen>
391 /usr/lib/dld.sl: Unresolved symbol: sem_init (code) from /usr/local/lib/libSDL-1.2.sl.0<!--
392   --></screen>
393   </para>
394   <para>
395   Solution: Use the extralibdir option of configure
396   <option>--with-extralibdir="/usr/lib -lrt"</option>
397   </para>
398 </listitem>
400 <listitem>
401   <para>
402   MPlayer segfaults with a message like this:
403   <screen>
404 Pid 10166 received a SIGSEGV for stack growth failure.
405 Possible causes: insufficient memory or swap space, or stack size exceeded maxssiz.
406 Segmentation fault<!--
407   --></screen>
408   </para>
409   <para>
410   Solution:
411   The HP-UX kernel has a default stack size of 8MB(?) per process.(11.0 and
412   newer 10.20 patches let you increase <systemitem>maxssiz</systemitem> up to
413   350MB for 32-bit programs). You need to extend
414   <systemitem>maxssiz</systemitem> and recompile the kernel (and reboot).
415   You can use SAM to do this.
416   (While at it, check out the <systemitem>maxdsiz</systemitem> parameter for
417   the maximum amount of data a program can use.
418   It depends on your applications, if the default of 64MB is enough or not.)
419   </para>
420 </listitem>
421 </itemizedlist>
422 </para>
423 </sect2>
425 <!-- ********** -->
427 <sect2 id="aix">
428 <title>AIX</title>
430 <para>
431 <application>MPlayer</application> builds successfully on AIX 5.1,
432 5.2, and 5.3, using GCC 3.3 or greater. Building
433 <application>MPlayer</application> on AIX 4.3.3 and below is
434 untested. It is highly recommended that you build
435 <application>MPlayer</application> using GCC 3.4 or greater,
436 or if you are building on POWER5, GCC 4.0 is required.
437 </para>
439 <para>
440 CPU detection is still a work in progress.
441 The following architectures have been tested:
442 </para>
444 <itemizedlist>
445   <listitem><para>604e</para></listitem>
446   <listitem><para>POWER3</para></listitem>
447   <listitem><para>POWER4</para></listitem>
448 </itemizedlist>
450 <para>
451 The following architectures are untested, but should still work:
452 <itemizedlist>
453   <listitem><para>POWER</para></listitem>
454   <listitem><para>POWER2</para></listitem>
455   <listitem><para>POWER5</para></listitem>
456 </itemizedlist>
457 </para>
459 <para>
460 Sound via the Ultimedia Services is not supported, as Ultimedia was
461 dropped in AIX 5.1; therefore, the only option is to use the AIX Open
462 Sound System (OSS) drivers from 4Front Technologies at
463 <ulink url="http://www.opensound.com/aix.html">http://www.opensound.com/aix.html</ulink>.
464 4Front Technologies freely provides OSS drivers for AIX 5.1 for
465 non-commercial use; however, there are currently no sound output
466 drivers for AIX 5.2 or 5.3. This means <emphasis role="bold">AIX 5.2
467 and 5.3 are not capable of MPlayer audio output, presently.</emphasis>
468 </para>
470 <para>Solutions to common problems:</para>
472 <itemizedlist>
473 <listitem>
474 <para>
475   If you encounter this error message from <filename>./configure</filename>:
476   <screen>
477 $ ./configure
479 Checking for iconv program ... no
480 No working iconv program found, use
481 --charset=US-ASCII to continue anyway.
482 Messages in the GTK-2 interface will be broken then.<!--
483   --></screen>
484   This is because AIX uses non-standard character set names; therefore,
485   converting MPlayer output to another character set is currently not
486   supported. The solution is to use:
487   <screen>$ ./configure --charset=noconv</screen>
488   </para>
489 </listitem>
490 </itemizedlist>
491 </sect2>
493 <!-- ********** -->
495 <sect2 id="qnx">
496 <title>QNX</title>
498 <para>
499 You'll need to download and install SDL for QNX. Then run
500 <application>MPlayer</application> with <option>-vo sdl:driver=photon</option>
501 and <option>-ao sdl:nto</option> options, it should be fast.
502 </para>
504 <para>
505 The <option>-vo x11</option> output will be even slower than on Linux,
506 since QNX has only X <emphasis>emulation</emphasis> which is very slow.
507 </para>
508 </sect2>
509 </sect1>
512 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
515 <sect1 id="windows">
516 <title>Windows</title>
518 <para>
519 Yes, <application>MPlayer</application> runs on Windows under
520 <ulink url="http://www.cygwin.com/"><application>Cygwin</application></ulink>
522 <ulink url="http://www.mingw.org/"><application>MinGW</application></ulink>.
523 It does not have an official GUI yet, but the command line version
524 is completely functional. You should check out the
525 <ulink url="http://lists.mplayerhq.hu/mailman/listinfo/mplayer-cygwin/">MPlayer-cygwin</ulink>
526 mailing list for help and latest information.
527 Official Windows binaries can be found on the
528 <ulink url="http://www.mplayerhq.hu/design7/dload.html">download page</ulink>.
529 Installer packages and simple GUI frontends are available from external
530 sources, we have collected then in the Windows section of our
531 <ulink url="http://www.mplayerhq.hu/design7/projects.html#windows">projects page</ulink>.
532 </para>
534 <para>
535 If you wish to avoid using the command line, a simple trick is
536 to put a shortcut on your desktop that contains something like the
537 following in the execute section:
538 <screen><replaceable>c:\path\to\</replaceable>mplayer.exe %1</screen>
539 This will make <application>MPlayer</application> play any movie that is
540 dropped on the shortcut. Add <option>-fs</option> for fullscreen mode.
541 </para>
543 <para>
544 Best results are achieved with the native DirectX video output driver
545 (<option>-vo directx</option>). Alternatives are OpenGL and SDL, but OpenGL
546 performance varies greatly between systems and SDL is known to
547 distort video or crash on some systems. If the image is
548 distorted, try turning off hardware acceleration with
549 <option>-vo directx:noaccel</option>. Download
550 <ulink url="http://www.mplayerhq.hu/MPlayer/contrib/win32/dx7headers.tgz">DirectX 7 header files</ulink>
551 to compile the DirectX video output driver. Furthermore you need to have
552 DirectX 7 or later installed for the DirectX video output driver to work.
553 </para>
555 <para>
556 <link linkend="vidix">VIDIX</link> now works under Windows as
557 <option>-vo winvidix</option>, although it is still experimental
558 and needs a bit of manual setup. Download
559 <ulink url="http://www.mplayerhq.hu/MPlayer/releases/win32/dhahelperwin/dhahelper.sys">dhahelper.sys</ulink> or
560 <ulink url="http://www.mplayerhq.hu/MPlayer/releases/win32/dhahelperwin/withmtrr/dhahelper.sys">dhahelper.sys (with MTRR support)</ulink>
561 and copy it to the <filename class="directory">vidix/dhahelperwin</filename>
562 directory in your <application>MPlayer</application> source tree.
563 Open a console and type
564 <screen>make install-dhahelperwin</screen>
565 as Administrator. After that you will have to reboot.
566 </para>
568 <para>
569 For best results <application>MPlayer</application> should use a
570 colorspace that your video card supports in hardware. Unfortunately many
571 Windows graphics drivers wrongly report some colorspaces as supported in
572 hardware. To find out which, try
573 <screen>
574 mplayer -benchmark -nosound -frames 100 -vf format=<replaceable>colorspace</replaceable> <replaceable>movie</replaceable>
575 </screen>
576 where <replaceable>colorspace</replaceable> can be any colorspace
577 printed by the <option>-vf format=fmt=help</option> option. If you
578 find a colorspace your card handles particularly bad
579 <option>-vf noformat=<replaceable>colorspace</replaceable></option>
580 will keep it from being used. Add this to your config file to permanently
581 keep it from being used.
582 </para>
584 <para>There are special codec packages for Windows available on our
585   <ulink url="http://www.mplayerhq.hu/design7/dload.html">download page</ulink>
586   to allow playing formats for which there is no native support yet.
587   Put the codecs somewhere in your path or pass
588   <option>--codecsdir=<replaceable>c:/path/to/your/codecs</replaceable></option>
589   (alternatively
590   <option>--codecsdir=<replaceable>/path/to/your/codecs</replaceable></option>
591   only on <application>Cygwin</application>) to <filename>configure</filename>.
592   We have had some reports that Real DLLs need to be writable by the user
593   running <application>MPlayer</application>, but only on some systems (NT4).
594   Try making them writable if you have problems.
595   </para>
597 <para>
598 You can play VCDs by playing the <filename>.DAT</filename> or
599 <filename>.MPG</filename> files that Windows exposes on VCDs. It works like
600 this (adjust for the drive letter of your CD-ROM):
601 <screen>mplayer <replaceable>d:/mpegav/avseq01.dat</replaceable></screen>
602 Alternatively, you can play a VCD track directly by using:
603 <screen>mplayer vcd://<replaceable>&lt;track&gt;</replaceable> -cdrom-device <replaceable>d:</replaceable>
604 </screen>
605 DVDs also work, adjust <option>-dvd-device</option> for the drive letter
606 of your DVD-ROM:
607 <screen>
608 mplayer dvd://<replaceable>&lt;title&gt;</replaceable> -dvd-device <replaceable>d:</replaceable>
609 </screen>
610 The <application>Cygwin</application>/<application>MinGW</application>
611 console is rather slow. Redirecting output or using the
612 <option>-quiet</option> option has been reported to improve performance on
613 some systems. Direct rendering (<option>-dr</option>) may also help.
614 If playback is jerky, try
615 <option>-autosync 100</option>. If some of these options help you, you
616 may want to put them in your config file.
617 </para>
619 <note>
620 <para>
621 If you have a Pentium 4 and are experiencing a crash using the
622 RealPlayer codecs, you may need to disable hyperthreading support.
623 </para>
624 </note>
626 <!-- ********** -->
628 <sect2 id="cygwin">
629 <title><application>Cygwin</application></title>
631 <para>
632 You need to run <application>Cygwin</application> 1.5.0 or later in
633 order to compile <application>MPlayer</application>.
634 </para>
636 <para>
637 DirectX header files need to be extracted to
638 <filename class="directory">/usr/include/</filename> or
639 <filename class="directory">/usr/local/include/</filename>.
640 </para>
642 <para>
643 Instructions and files for making SDL run under
644 <application>Cygwin</application> can be found on the
645 <ulink url="http://www.libsdl.org/extras/win32/cygwin/">libsdl site</ulink>.
646 </para>
647 </sect2>
649 <!-- ********** -->
651 <sect2 id="mingw">
652 <title><application>MinGW</application></title>
654 <para>
655 You need <application>MinGW</application> 3.1.0 or later and MSYS 1.0.9 or
656 later. Tell the MSYS postinstall that <application>MinGW</application> is
657 installed.
658 </para>
660 <para>
661 Extract DirectX header files to
662 <filename class="directory">/mingw/include/</filename>.
663 </para>
665 <para>
666 MOV compressed header support requires
667 <ulink url="http://www.gzip.org/zlib/">zlib</ulink>,
668 which <application>MinGW</application> does not provide by default.
669 Configure it with <option>--prefix=/mingw</option> and install
670 it before compiling <application>MPlayer</application>.
671 </para>
673 <para>
674 Complete instructions for building <application>MPlayer</application>
675 and necessary libraries can be found in the
676 <ulink url="http://www.mplayerhq.hu/MPlayer/contrib/win32/MPlayer-MinGW-Howto.txt">MPlayer MinGW HOWTO</ulink>.
677 </para>
678 </sect2>
679 </sect1>
682 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
685 <sect1 id="macos">
686 <title>Mac OS</title>
688 <para>
689 <application>MPlayer</application> does not work on Mac OS versions before
690 10, but should compile out-of-the-box on Mac OS X 10.2 and up.
691 The preferred compiler is the Apple version of
692 GCC 3.x or later.
693 You can get the basic compilation environment by installing Apple's
694 <ulink url="http://developer.apple.com/tools/download/">Xcode</ulink>.
695 If you have Mac OS X 10.3.9 or later and QuickTime 7
696 you can use the <option>macosx</option> video output driver.
697 </para>
699 <para>
700 Unfortunately, this basic environment will not allow you to take advantage
701 of all the nice features of <application>MPlayer</application>.
702 For instance, in order to have OSD support compiled in, you will
703 need to have <systemitem class="library">fontconfig</systemitem>
704 and <systemitem class="library">freetype</systemitem> libraries
705 installed on your machine. Contrary to other Unixes such as most
706 Linux and BSD variants, OS X does not have a package system
707 that comes with the system.
708 </para>
710 <para>
711 There are at least two to choose from:
712 <ulink url="http://fink.sourceforge.net/">Fink</ulink> and
713 <ulink url="http://www.macports.org/">MacPorts</ulink>.
714 Both of them provide about the same service (i.e. a lot of packages to
715 choose from, dependency resolution, the ability to simply add/update/remove
716 packages, etc...).
717 Fink offers both precompiled binary packages or building everything from
718 source, whereas MacPorts only offers building from source.
719 The author of this guide chose MacPorts for the simple fact that its basic
720 setup was more lightweight.
721 Later examples will be based on MacPorts.
722 </para>
724 <para>
725 For instance, to compile <application>MPlayer</application> with OSD support:
726 <screen>sudo port install pkg-config</screen>
727 This will install <application>pkg-config</application>, which is a system for
728 managing library compile/link flags.
729 <application>MPlayer</application>'s <systemitem>configure</systemitem> script
730 uses it to properly detect libraries.
731 Then you can install <application>fontconfig</application> in a
732 similar way:
733 <screen>sudo port install fontconfig</screen>
734 Then you can proceed with launching <application>MPlayer</application>'s
735 <systemitem>configure</systemitem> script (note the
736 <systemitem>PKG_CONFIG_PATH</systemitem> and <systemitem>PATH</systemitem>
737 environment variables so that <systemitem>configure</systemitem> finds the
738 libraries installed with MacPorts):
739 <screen>
740 PKG_CONFIG_PATH=/opt/local/lib/pkgconfig/ PATH=$PATH:/opt/local/bin/ ./configure
741 </screen>
742 </para>
744 <!-- ********** -->
746 <sect2 id="osx_gui">
747 <title>MPlayer OS X GUI</title>
749 <para>
750 You can get a native GUI for <application>MPlayer</application> together with
751 precompiled <application>MPlayer</application> binaries for Mac OS X from the
752 <ulink url="http://mplayerosx.sf.net/">MPlayerOSX</ulink> project, but be
753 warned: that project is not active anymore.
754 </para>
756 <para>
757 Fortunately, <application>MPlayerOSX</application> has been taken over
758 by a member of the <application>MPlayer</application> team.
759 Preview releases are available from our
760 <ulink url="http://mplayerhq.hu/dload.html">download page</ulink>
761 and an official release should arrive soon.
762 </para>
764 <para>
765 In order to build <application>MPlayerOSX</application> from source
766 yourself, you need the <systemitem>mplayerosx</systemitem>, the
767 <systemitem>main</systemitem> and a copy of the
768 <systemitem>main</systemitem> SVN module named
769 <systemitem>main_noaltivec</systemitem>.
770 <systemitem>mplayerosx</systemitem> is the GUI frontend,
771 <systemitem>main</systemitem> is MPlayer and
772 <systemitem>main_noaltivec</systemitem> is MPlayer built without AltiVec
773 support.
774 </para>
776 <para>
777 To check out SVN modules use:
778 <screen>
779 svn checkout svn://svn.mplayerhq.hu/mplayerosx/trunk/ mplayerosx
780 svn checkout svn://svn.mplayerhq.hu/mplayer/trunk/ main
781 </screen>
782 </para>
784 <para>
785 In order to build <application>MPlayerOSX</application> you will need to
786 set up something like this:
787 <screen>
788 MPlayer_source_directory
789    |
790    |--->main           (MPlayer Subversion source)
791    |
792    |--->main_noaltivec (MPlayer Subversion source configured with --disable-altivec)
793    |
794    \--->mplayerosx     (MPlayer OS X Subversion source)
795 </screen>
796 You first need to build main and main_noaltivec.
797 </para>
799 <para>
800 To begin with, in order to ensure maximum backwards compatibility, set an
801 environment variable:
802 <screen>export MACOSX_DEPLOYMENT_TARGET=10.3</screen>
803 </para>
805 <para>
806 Then, configure:
807 </para>
809 <para>
810 If you configure for a G4 or later CPU with AltiVec support, do as follows:
811 <screen>
812 ./configure --disable-gl --disable-x11
813 </screen>
814 If you configure for a G3-powered machine without AltiVec, use:
815 <screen>
816 ./configure --disable-gl --disable-x11 --disable-altivec
817 </screen>
818 You may need to edit <filename>config.mak</filename> and change
819 <systemitem>-mcpu</systemitem> and <systemitem>-mtune</systemitem>
820 from <systemitem>74XX</systemitem> to <systemitem>G3</systemitem>.
821 </para>
823 <para>
824 Continue with
825 <screen>make</screen>
826 then go to the mplayerosx directory and type
827 <screen>make dist</screen>
828 This will create a compressed <systemitem>.dmg</systemitem> archive
829 with the ready to use binary.
830 </para>
832 <para>
833 You can also use the <application>Xcode</application> 2.1 project;
834 the old project for <application>Xcode</application> 1.x does
835 not work anymore.
836 </para>
837 </sect2>
838 </sect1>
840 </chapter>