1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
|
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter id="install">
<title>Installation</title>
<para>
A quick installation guide can be found in the <filename>README</filename>
file. Please read it first and then come back here for the rest of the gory
details.
</para>
<para>
In this section you will be guided through the compilation and configuration
process of <application>MPlayer</application>. It's not easy, but it won't
necessarily be hard. If you experience a behavior different from this
description, please search through this documentation and you'll find your
answers.
</para>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<sect1 id="softreq">
<title>Software requirements</title>
<itemizedlist>
<listitem><para>
<emphasis role="bold">POSIX system</emphasis> - You need a POSIX-compatible
shell and POSIX-compatible system tools like grep, sed, awk, etc. in your
path.
</para></listitem>
<listitem><para>
<emphasis role="bold">GNU make</emphasis> 3.81 or later
</para></listitem>
<listitem><para>
<emphasis role="bold">binutils</emphasis> - GNU binutils 2.11 or later
is known to work.
</para></listitem>
<listitem><para>
<emphasis role="bold">compiler</emphasis> - We mostly use gcc, the
recommended versions on x86 are 2.95 and 3.4+. On PowerPC, use 4.x+.
icc 10.1+ is also known to work.
</para></listitem>
<listitem><para>
<emphasis role="bold">Xorg/XFree86</emphasis> - recommended version is
4.3 or later. Make sure the
<emphasis role="bold">development packages</emphasis> are installed,
too, otherwise it won't work.
You don't absolutely need X, some video output drivers work without it.
</para></listitem>
<listitem><para>
<emphasis role="bold">FreeType</emphasis> - 2.0.9 or later is required
for the OSD and subtitles
</para></listitem>
<listitem><para>
<emphasis role="bold">ALSA</emphasis> - optional, for ALSA audio output
support. At least 0.9.0rc4 is required.
</para></listitem>
<listitem><para>
<emphasis role="bold">libjpeg</emphasis> -
required for the optional JPEG video output driver
</para></listitem>
<listitem><para>
<emphasis role="bold">libpng</emphasis> -
required for the optional PNG video output driver
</para></listitem>
<listitem><para>
<emphasis role="bold">directfb</emphasis> - optional, 0.9.22 or later
required for the directfb/dfbmga video output drivers
</para></listitem>
<listitem><para>
<emphasis role="bold">lame</emphasis> - 3.90 or later is recommended,
necessary for encoding MP3 audio with <application>MEncoder</application>.
</para></listitem>
<listitem><para>
<emphasis role="bold">zlib</emphasis> - recommended, many codecs use it.
</para></listitem>
<listitem><para>
<emphasis role="bold"><ulink url="http://www.live555.com/mplayer/">LIVE555 Streaming Media</ulink></emphasis>
- optional, needed for some RTSP/RTP streams
</para></listitem>
<listitem><para>
<emphasis role="bold">cdparanoia</emphasis> - optional, for CDDA support
</para></listitem>
<listitem><para>
<emphasis role="bold">libxmms</emphasis> - optional, for XMMS input plugin
support. At least 1.2.7 is required.
</para></listitem>
<listitem><para>
<emphasis role="bold">libsmb</emphasis> - optional, for SMB networking support
</para></listitem>
<listitem><para>
<emphasis role="bold"><ulink url="http://www.underbit.com/products/mad/">libmad</ulink></emphasis>
- optional, for fast integer-only MP3 decoding on FPU-less platforms
</para></listitem>
</itemizedlist>
</sect1>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<sect1 id="features">
<title>Features</title>
<itemizedlist>
<listitem><para>
If you want to install <application>MEncoder</application> (our great
all-purpose encoder), see the
<link linkend="mencoder"><application>MEncoder</application></link> section.
</para></listitem>
<listitem><para>
If you have a V4L compatible <emphasis role="bold">TV tuner</emphasis> card,
and wish to watch/grab and encode movies with
<application>MPlayer</application>,
read the <link linkend="tv-input">TV input</link> section.
</para></listitem>
<listitem><para>
If you have a V4L compatible <emphasis role="bold">radio tuner</emphasis>
card, and wish to listen and capture sound with
<application>MPlayer</application>,
read the <link linkend="radio">radio</link> section.
</para></listitem>
<listitem><para>
There is a neat <emphasis role="bold">OSD Menu</emphasis> support ready to be
used. Check the <link linkend="subosd">OSD menu</link> section.
</para></listitem>
</itemizedlist>
<para>
Then build <application>MPlayer</application>:
<screen>
./configure
make
make install
</screen>
</para>
<para>
At this point, <application>MPlayer</application> is ready to use.
Check if you have a <filename>codecs.conf</filename> file in your home
directory at (<filename>~/.mplayer/codecs.conf</filename>) left from old
<application>MPlayer</application> versions. If you find one, remove it.
</para>
<para>
Debian users can build a .deb package for themselves, it's very simple.
Just exec
<screen>fakeroot debian/rules binary</screen>
in <application>MPlayer</application>'s root directory. See
<link linkend="debian">Debian packaging</link> for detailed instructions.
</para>
<para>
<emphasis role="bold">Always browse the output of</emphasis>
<filename>./configure</filename>, and the
<filename>config.log</filename> file, they contain information about
what will be built, and what will not. You may also want to view
<filename>config.h</filename> and <filename>config.mak</filename> files.
If you have some libraries installed, but not detected by
<filename>./configure</filename>, then check if you also have the proper
header files (usually the -dev packages) and their version matches. The
<filename>config.log</filename> file usually tells you what is missing.
</para>
<para>
Though not mandatory, the fonts should be installed in order to gain OSD,
and subtitle functionality. The recommended method is installing a TTF
font file and telling <application>MPlayer</application> to use it.
See the <link linkend="subosd">Subtitles and OSD</link> section for details.
</para>
</sect1>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<sect1 id="gui">
<title>What about the GUI?</title>
<para>
MPlayer used to have an internal GUI, but it was removed because it was
buggy, unmaintained and there are much better alternatives. See <ulink
url="http://www.mplayerhq.hu/design7/projects.html#mplayer_frontends">the
frontends page</ulink> for a list of existing GUIs.
</para>
</sect1>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<sect1 id="fonts-osd">
<title>Fonts and OSD</title>
<para>
You need to tell <application>MPlayer</application> which font to use to
enjoy OSD and subtitles. Any TrueType font or special bitmap fonts will
work. However, TrueType fonts are recommended as they look far better,
can be properly scaled to the movie size and cope better with different
encodings.
</para>
<!-- ********** -->
<sect2 id="truetype-fonts">
<title>TrueType fonts</title>
<para>
There are two ways to get TrueType fonts to work. The first is to pass
the <option>-font</option> option to specify a TrueType font file on
the command line. This option will be a good candidate to put in your
configuration file (see the manual page for details).
The second is to create a symlink called <filename>subfont.ttf</filename>
to the font file of your choice. Either
<screen>
ln -s <replaceable>/path/to/sample_font.ttf</replaceable> ~/.mplayer/subfont.ttf
</screen>
for each user individually or a system-wide one:
<screen>
ln -s <replaceable>/path/to/sample_font.ttf</replaceable> $PREFIX/share/mplayer/subfont.ttf
</screen>
</para>
<para>
If <application>MPlayer</application> was compiled with
<systemitem class="library">fontconfig</systemitem> support, the above methods
won't work, instead <option>-font</option> expects a
<systemitem class="library">fontconfig</systemitem> font name
and defaults to the sans-serif font. Example:
<screen>
mplayer -font <replaceable>'Bitstream Vera Sans'</replaceable> <replaceable>anime.mkv</replaceable>
</screen>
</para>
<para>
To get a list of fonts known to
<systemitem class="library">fontconfig</systemitem>,
use <command>fc-list</command>.
</para>
</sect2>
<!-- ********** -->
<sect2 id="bitmap-fonts">
<title>bitmap fonts</title>
<para>
If for some reason you wish or need to employ bitmap fonts, download a set
from our homepage. You can choose between various
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/fonts/">ISO fonts</ulink>
and some sets of fonts
<ulink url="http://www.mplayerhq.hu/MPlayer/contrib/fonts/">contributed by users</ulink>
in various encodings.
</para>
<para>
Uncompress the file you downloaded to
<filename class="directory">~/.mplayer</filename> or
<filename class="directory">$PREFIX/share/mplayer</filename>.
Then rename or symlink one of the extracted directories to
<filename class="directory">font</filename>, for example:
<screen>
ln -s <replaceable>~/.mplayer/arial-24</replaceable> ~/.mplayer/font
</screen>
<screen>
ln -s <replaceable>$PREFIX/share/mplayer/arial-24</replaceable> $PREFIX/share/mplayer/font
</screen>
</para>
<para>
Fonts should have an appropriate <filename>font.desc</filename> file
which maps Unicode font positions to the actual code page of the
subtitle text. Another solution is to have UTF-8-encoded subtitles
and use the <option>-utf8</option> option or give the subtitles
file the same name as your video file with a <filename>.utf</filename>
extension and have it in the same directory as the video file.
</para>
</sect2>
<!-- ********** -->
<sect2 id="osdmenu">
<title>OSD menu</title>
<para>
<application>MPlayer</application> has a completely user-definable
OSD Menu interface.
</para>
<note><para>
the Preferences menu is currently UNIMPLEMENTED!
</para></note>
<orderedlist>
<title>Installation</title>
<listitem><para>
compile <application>MPlayer</application> by passing the
<option>--enable-menu</option> to <filename>./configure</filename>
</para></listitem>
<listitem><para>
make sure you have an OSD font installed
</para></listitem>
<listitem><para>
copy <filename>etc/menu.conf</filename> to your
<filename class="directory">.mplayer</filename> directory
</para></listitem>
<listitem><para>
copy <filename>etc/input.conf</filename> to your
<filename class="directory">.mplayer</filename> directory, or to the
system-wide <application>MPlayer</application> config dir (default:
<filename class="directory">/usr/local/etc/mplayer</filename>)
</para></listitem>
<listitem><para>
check and edit <filename>input.conf</filename> to enable menu movement keys
(it is described there).
</para></listitem>
<listitem><para>
start <application>MPlayer</application> by the following example:
<screen>mplayer -menu <replaceable>file.avi</replaceable></screen>
</para></listitem>
<listitem><para>
push any menu key you defined
</para></listitem>
</orderedlist>
</sect2>
</sect1>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<sect1 id="codec-installation">
<title>Codec installation</title>
<!-- ********** -->
<sect2 id="xvid">
<title>Xvid</title>
<para>
<ulink url="http://www.xvid.org">Xvid</ulink> is a free software MPEG-4 ASP
compliant video codec. Note that Xvid is not necessary to decode Xvid-encoded
video. <systemitem class="library">libavcodec</systemitem> is used by
default as it offers better speed.
</para>
<procedure>
<title>Installing <systemitem class="library">Xvid</systemitem></title>
<para>
Like most open source software, it is available in two flavors:
<ulink url="http://www.xvid.org/downloads.html">official releases</ulink>
and the CVS version.
The CVS version is usually stable enough to use, as most of the time it
features fixes for bugs that exist in releases.
Here is what to do to make <systemitem class="library">Xvid</systemitem>
CVS work with <application>MEncoder</application>:
</para>
<step><para>
<screen>cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid login</screen>
</para></step>
<step><para>
<screen>cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid co xvidcore</screen>
</para></step>
<step><para>
<screen>cd xvidcore/build/generic</screen>
</para></step>
<step><para>
<screen>./bootstrap.sh && ./configure</screen>
You may have to add some options (examine the output of
<command>./configure --help</command>).
</para></step>
<step><para>
<screen>make && make install</screen>
</para></step>
<step><para>
Recompile <application>MPlayer</application>.
</para></step>
</procedure>
</sect2>
<!-- ********** -->
<sect2 id="x264">
<title><systemitem class="library">x264</systemitem></title>
<para>
<ulink url="http://developers.videolan.org/x264.html"><systemitem class="library">x264</systemitem></ulink>
is a library for creating H.264 video.
<application>MPlayer</application> sources are updated whenever
an <systemitem class="library">x264</systemitem> API change
occurs, so it is always suggested to use
<application>MPlayer</application> from Subversion.
</para>
<para>
If you have a GIT client installed, the latest x264
sources can be gotten with this command:
<screen>git clone git://git.videolan.org/x264.git</screen>
Then build and install in the standard way:
<screen>./configure && make && make install</screen>
Now rerun <filename>./configure</filename> for
<application>MPlayer</application> to pick up
<systemitem class="library">x264</systemitem> support.
</para>
</sect2>
<!-- ********** -->
<sect2 id="aac">
<title>AAC</title>
<para>
An open source AAC decoder called FAAD2 is available from
<ulink url="http://www.audiocoding.com/downloads.html"/>.
<application>MPlayer</application> includes a copy of it in its source tree.
If you want to use the external library instead, install it and pass
<option>--enable-faad-external</option> to <filename>./configure</filename>.
</para>
<para>
FAAD2 binaries are not available from audiocoding.com, but you can (apt-)get
Debian packages from
<ulink url="http://www.debian-multimedia.org/">Christian Marillat</ulink>,
Mandrake/Mandriva RPMs from the <ulink url="http://plf.zarb.org">P.L.F</ulink>
and Fedora/CentOS/RHEL RPMs from <ulink url="http://rpmfusion.org/">RPMFusion</ulink>.
</para>
<para>
If you choose to build from source, you do not need all of FAAD2 to decode
AAC files, libfaad is enough. Build it like this:
<screen>
cd faad2/
sh bootstrap
./configure
cd libfaad
make
make install
</screen>
</para>
</sect2>
<!-- ********** -->
<sect2 id="amr">
<title>AMR</title>
<para>
MPlayer can use the OpenCORE AMR libraries through FFmpeg.
Download the libraries for AMR-NB and AMR-WB from the
<ulink url="http://sourceforge.net/projects/opencore-amr/">opencore-amr</ulink>
project and install them according to the instructions on that page.
</para>
</sect2>
<sect2 id="xmms">
<title>XMMS</title>
<para>
<application>MPlayer</application> can use <application>XMMS</application> input
plugins to play many file formats. There are plugins for SNES game tunes, SID
tunes (from Commodore 64), many Amiga formats, .xm, .it, VQF, Musepack, Bonk,
shorten and many others. You can find them at the
<ulink url="http://www.xmms.org/plugins.php?category=input">XMMS input plugin page</ulink>.
</para>
<para>
For this feature you need to have <application>XMMS</application> and compile
<application>MPlayer</application> with
<filename>./configure --enable-xmms</filename>.
</para>
</sect2>
</sect1>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<sect1 id="rtc">
<title>RTC</title>
<para>
There are three timing methods in <application>MPlayer</application>.
<itemizedlist>
<listitem><para>
<emphasis role="bold">To use the old method</emphasis>, you don't have to do
anything. It uses <systemitem>usleep()</systemitem> to tune
A/V sync, with +/- 10ms accuracy. However sometimes the sync has to be
tuned even finer.
</para></listitem>
<listitem>
<para>
<emphasis role="bold">The new timer</emphasis> code uses the RTC (RealTime
Clock) for this task, because it has precise 1ms timers.
The <option>-rtc</option> option enables it,
but a properly set up kernel is required.
If you are running kernel 2.4.19pre8 or later you can adjust the maximum RTC
frequency for normal users through the <systemitem class="systemname">/proc
</systemitem> file system. Use one of the following two commands to
enable RTC for normal users:
<screen>echo 1024 > /proc/sys/dev/rtc/max-user-freq</screen>
<screen>sysctl dev/rtc/max-user-freq=1024</screen>
You can make this setting permanent by adding the latter to
<filename>/etc/sysctl.conf</filename>.
</para>
<para>
You can see the new timer's efficiency in the status line.
The power management functions of some notebook BIOSes with speedstep CPUs
interact badly with RTC. Audio and video may get out of sync. Plugging the
external power connector in before you power up your notebook seems to help.
In some hardware combinations (confirmed during usage of non-DMA DVD drive
on an ALi1541 board) usage of the RTC timer causes skippy playback. It's
recommended to use the third method in these cases.
</para>
</listitem>
<listitem><para>
<emphasis role="bold">The third timer code</emphasis> is turned on with the
<option>-softsleep</option> option. It has the efficiency of the RTC, but it
doesn't use RTC. On the other hand, it requires more CPU.
</para></listitem>
</itemizedlist>
</para>
</sect1>
</chapter>
|