comparison DOCS/documentation.html @ 1373:d1d37abe6389

only FAQ and SOUNDCARDS stuff not formatted/missing
author gabucino
date Sat, 21 Jul 2001 13:24:41 +0000
parents 4287b4726732
children 2a4b2dd2fc0a
comparison
equal deleted inserted replaced
1372:e6264cd1a51f 1373:d1d37abe6389
22 </P> 22 </P>
23 <P> 23 <P>
24 <A HREF="#1.1">1.1 Overview +speed</A> 24 <A HREF="#1.1">1.1 Overview +speed</A>
25 <A HREF="#1.2">1.2 History</A> 25 <A HREF="#1.2">1.2 History</A>
26 <A HREF="#1.3">1.3 Installation</A> 26 <A HREF="#1.3">1.3 Installation</A>
27 <A HREF="#1.3.1">1.3.1 Codecs</A>
28 <A HREF="#1.3.2">1.3.2 Drivers</A>
29 <A HREF="#1.3.3">1.3.3 Player</A>
30 <A HREF="#1.3.4">1.3.4 Matrox G400 DualHead Tools</A>
31 <A HREF="#1.3.5">1.3.5 Fonts</A>
32 <A HREF="#1.4">1.4 What about the GUI?</A> 27 <A HREF="#1.4">1.4 What about the GUI?</A>
33 </P> 28 </P>
34 <P> 29 <P>
35 <A HREF="#2">2. Features</A> 30 <A HREF="#2">2. Features</A>
36 </P> 31 </P>
46 </P> 41 </P>
47 <P> 42 <P>
48 <A HREF="#2.2">2.2 Video & Audio output devices</A> 43 <A HREF="#2.2">2.2 Video & Audio output devices</A>
49 <A HREF="#2.2.1">2.2.1 Video output devices</A> 44 <A HREF="#2.2.1">2.2.1 Video output devices</A>
50 <A HREF="#2.2.1.1">2.2.1.1 Xv</A> 45 <A HREF="#2.2.1.1">2.2.1.1 Xv</A>
46 <A HREF="#2.2.1.1.1">2.2.1.1.1 3dfx cards</A>
47 <A HREF="#2.2.1.1.2">2.2.1.1.2 S3 cards</A>
48 <A HREF="#2.2.1.1.3">2.2.1.1.3 nVidia cards</A>
49 <A HREF="#2.2.1.1.4">2.2.1.1.4 ATI cards</A>
51 <A HREF="#2.2.1.2">2.2.1.2 DGA</A> 50 <A HREF="#2.2.1.2">2.2.1.2 DGA</A>
52 <A HREF="#2.2.1.2.1">2.2.1.2.1 Summary</A> 51 <A HREF="#2.2.1.2.1">2.2.1.2.1 Summary</A>
53 <A HREF="#2.2.1.2.2">2.2.1.2.2 What is DGA</A> 52 <A HREF="#2.2.1.2.2">2.2.1.2.2 What is DGA</A>
54 <A HREF="#2.2.1.2.3">2.2.1.2.3 Resolution switching</A> 53 <A HREF="#2.2.1.2.3">2.2.1.2.3 Installing DGA support for MPlayer</A>
55 <A HREF="#2.2.1.2.4">2.2.1.2.4 DGA & MPlayer</A> 54 <A HREF="#2.2.1.2.4">2.2.1.2.4 Resolution switching</A>
56 <A HREF="#2.2.1.2.5">2.2.1.2.5 Features of the DGA driver</A> 55 <A HREF="#2.2.1.2.5">2.2.1.2.5 DGA & MPlayer</A>
57 <A HREF="#2.2.1.2.6">2.2.1.2.6 Speed issues</A> 56 <A HREF="#2.2.1.2.6">2.2.1.2.6 Features of the DGA driver</A>
58 <A HREF="#2.2.1.2.7">2.2.1.2.7 Known bugs</A> 57 <A HREF="#2.2.1.2.7">2.2.1.2.7 Speed issues</A>
59 <A HREF="#2.2.1.2.8">2.2.1.2.8 Future work</A> 58 <A HREF="#2.2.1.2.8">2.2.1.2.8 Known bugs</A>
59 <A HREF="#2.2.1.2.9">2.2.1.2.9 Future work</A>
60 <A HREF="#2.2.1.2.A">2.2.1.2.A Some modelines</A> 60 <A HREF="#2.2.1.2.A">2.2.1.2.A Some modelines</A>
61 <A HREF="#2.2.1.2.B">2.2.1.2.B Bug Reports</A> 61 <A HREF="#2.2.1.2.B">2.2.1.2.B Bug Reports</A>
62 <A HREF="#2.2.1.3">2.2.1.3 SDL</A> 62 <A HREF="#2.2.1.3">2.2.1.3 SDL</A>
63 <A HREF="#2.2.1.4">2.2.1.4 SVGAlib</A> 63 <A HREF="#2.2.1.4">2.2.1.4 SVGAlib</A>
64 <A HREF="#2.2.1.5">2.2.1.5 Framebuffer output (FBdev)</A> 64 <A HREF="#2.2.1.5">2.2.1.5 Framebuffer output (FBdev)</A>
66 <A HREF="#2.2.1.7">2.2.1.7 SiS 6326 framebuffer (sis_vid)</A> 66 <A HREF="#2.2.1.7">2.2.1.7 SiS 6326 framebuffer (sis_vid)</A>
67 <A HREF="#2.2.1.8">2.2.1.8 3dfx YUV support</A> 67 <A HREF="#2.2.1.8">2.2.1.8 3dfx YUV support</A>
68 <A HREF="#2.2.1.9">2.2.1.9 OpenGL output</A> 68 <A HREF="#2.2.1.9">2.2.1.9 OpenGL output</A>
69 <A HREF="#2.2.2">2.2.2 Audio output devices</A> 69 <A HREF="#2.2.2">2.2.2 Audio output devices</A>
70 +SOUNDCARDS 70 +SOUNDCARDS
71 </P>
72 <P>
73 <A HREF="#2.3">2.3 Subtitles and OSD</A>
74 </P> 71 </P>
75 <P> 72 <P>
76 <A HREF="#3">3. Usage</A> 73 <A HREF="#3">3. Usage</A>
77 </P> 74 </P>
78 <P> 75 <P>
124 121
125 <P><PRE> 122 <P><PRE>
126 <A NAME=1>1. Introduction 123 <A NAME=1>1. Introduction
127 124
128 125
129 <A NAME=1.1>1.1. Overview 126 <A NAME=1.1>1.1. Overview
130 127
131 MPlayer is a movie player for LINUX. It plays most MPEG, AVI and ASF files, 128 MPlayer is a movie player for LINUX. It plays most MPEG, AVI and ASF files,
132 supported by many native and Win32 DLL codecs. You can watch VCD, DVD and 129 supported by many native and Win32 DLL codecs. You can watch VCD, DVD and
133 even DivX movies too. The another big feature of mplayer is the wide range of 130 even DivX movies too. The another big feature of mplayer is the wide range of
134 supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, 131 supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev,
187 even more stable than ever, and so on. It's a MUST ! 184 even more stable than ever, and so on. It's a MUST !
188 185
189 186
190 <A NAME=1.3>1.3. Installation 187 <A NAME=1.3>1.3. Installation
191 188
192 189 If you plan to use MPlayer on x86 architecture, you possibly want to use
193 <A NAME=1.3.1>1.3.1. The Codecs (w32codecs.zip) 190 Win32 codecs. Download and unzip w32codecs.zip to /usr/lib/win32 .
194
195 Download and unzip w32codecs.zip to /usr/lib/win32
196 Note: the avifile project has similar codecs package, but it differs 191 Note: the avifile project has similar codecs package, but it differs
197 from our, so if you want to use all supported codecs, then use 192 from our, so if you want to use all supported codecs, then use
198 our package! 193 our package! However, you can use our codecs package with avifile.
199 194
200 195 If you own a Matrox G200/G400/G450 card, then please see the <A HREF="#2.2.1.6">2.2.1.6</A>
201 <A NAME=1.3.2>1.3.2. Drivers (mga_vid.o) 196 section in order to gain big speedup. It is important to do these steps
202 197 _before_ compiling MPlayer, otherwise no Matrox-specific support will be
203 198 built.
204 cd drivers 199
200 Then build MPlayer:
201
202
203 ./configure
205 make 204 make
206 mknod /dev/mga_vid c 178 0 205 make install
207 chmod go+rw /dev/mga_vid 206
208 207
209 208 It is recommended to browse the output of ./configure , it contains info
210 <A NAME=1.3.3>1.3.3. The Player (mplayer) 209 about what will be built, and what won't. You may also want to view
211 210 config.h and config.mak files.
212 ./configure 211
213 [* read messages printed by ./configure, it may be very usefull! *] 212 Though not mandatory, the fonts should be installed in order to gain
214 [* check config.h and config.mak files! *] 213 OSD, and subtitle functionality. Download mp_font3.zip (and optional
215 make 214 language updates) and optional (if exists) language updates.
216 [* check for errors! of none, you should have the ./mplayer binary *] 215
217 make install 216
218 217 mkdir ~/.mplayer/font
219 218 cd ~/.mplayer/font
220 <A NAME=1.3.4>1.3.4. Matrox G400 DH TV-out tools 219 unzip mp_font3.zip
221 220 unzip mp_font3_hu.zip
222 cd TVout 221
223 ./compile.sh 222
224 223 See the <A HREF="#2.3">2.3 section</A> for details.
225
226 <A NAME=1.3.5>1.3.5. Fonts
227
228 Download mp_font3.zip (and optional language updates) and
229 unpack to ~/.mplayer/font/ :
230
231 cd ~/.mplayer
232 mkdir font
233 cd font
234 unzip mp_font3.zip
235 unzip mp_font3_hu.zip
236
237 224
238 <A NAME=1.4>1.4. What about the GUI ? 225 <A NAME=1.4>1.4. What about the GUI ?
239 226
240 I'm not a GUI programmer. I hate GUIs, I like the pure black 80x25 console. 227 I'm not a GUI programmer. I hate GUIs, I like the pure black 80x25 console.
241 So the player has only keyboard control from the controlling console/xterm now. 228 So the player has only keyboard control from the controlling console/xterm now.
250 <A NAME=2.1>2.1. Video Formats, Audio & Video Codecs 237 <A NAME=2.1>2.1. Video Formats, Audio & Video Codecs
251 238
252 239
253 <A NAME=2.1.1>2.1.1. Supported input formats 240 <A NAME=2.1.1>2.1.1. Supported input formats
254 241
255 - VCD (Video CD) directly from CD-ROM or from CDRwin's .bin image file 242 MPlayer can read/play from the following devices/formats:
256 - DVD, directly from your DVD disk, using optional libcss for decryption 243 - VCD (Video CD) directly from CD-ROM or from CDRwin's .bin image file
257 - MPEG 1/2 System Stream (PS/PES/VOB) and Elementary Stream (ES) file formats 244 - DVD, directly from your DVD disk, using optional libcss for decryption
258 - RIFF AVI file format 245 - MPEG 1/2 System Stream (PS/PES/VOB) and Elementary Stream (ES) file
259 - ASF 1.0 file format 246 formats
260 - supports reading from file, stdin, DVD drive or network via HTTP 247 - RIFF AVI file format
248 - ASF 1.0 file format
249 - supports reading from file, stdin, DVD drive or network via HTTP
261 250
262 Note: about quicktime (.mov/.qt) and realmedia (.ra/.rm) support read the FAQ! 251 Note: about quicktime (.mov/.qt) and realmedia (.ra/.rm) support read the FAQ!
263 252
264 253
265 <A NAME=2.1.2>2.1.2. Supported audio & video codecs 254 <A NAME=2.1.2>2.1.2. Supported audio & video codecs
279 - AC3 dolby audio (native code, with 3dnow optimization) 268 - AC3 dolby audio (native code, with 3dnow optimization)
280 - Voxware audio 269 - Voxware audio
281 - alaw, msgsm, pcm and other simple old audio formats 270 - alaw, msgsm, pcm and other simple old audio formats
282 271
283 If you have a codec not listed here, and not supported yet, just 272 If you have a codec not listed here, and not supported yet, just
284 read http://mplayer.sourceforge.net/DOCS/codecs.html and DOCS/CODECS 273 read http://mplayer.sourceforge.net/DOCS/codecs.html
285 to get info about its status and about how to help us adding support for it! 274 to get info about its status and about how to help us adding support for it!
286 275
287 276
288 <A NAME=2.1.2.1>2.1.2.1. OpenDivX 277 <A NAME=2.1.2.1>2.1.2.1. OpenDivX
289 278
279 This section contains information about the DivX/OpenDivX codecs of
280 <A HREF="http://www.projectmayo.com">ProjectMayo</A>. Their first available alpha version was the OpenDivX 4.0
281 alpha 47 and 48. Support for this was/is included in MPlayer, and built by
282 default. We even used its postprocessing code to optionally enhance visual
283 quality of MPEG1/2 movies.
284
285 The new generation of this codec can even decode movies made with the
286 infamous DivX codec! And it's not everything, it's MUCH faster than the
287 traditional Win32 DivX DLL's. See below for configuration. The only
288 disadvantage of this codec is that it's currently closed-source. :(
289
290 The codec can be downloaded from the following URL:
291
292
293 http://download2.projectmayo.com/dnload/divx4linux/divx4linux-20010718.zip
294
295
296 No automatic installing available at this time, so install it manually,
297 EXACTLY as described here. Unpack it, and copy files to their place:
298
299
300 cp libdivxdecore.so.0.0.0 /usr/local/lib/
301 ln -s /usr/local/lib/libdivxdecore.so.0.0.0 /usr/local/lib/libdivxdecore.so.0
302 ln -s /usr/local/lib/libdivxdecore.so.0 /usr/local/lib/libdivxdecore.so
303 ldconfig
304 cp decore.h /usr/local/include/
305
306
307 At the moment MPlayer doesn't contain autodetection for the codec, so you'll
308 have to edit config.h and config.mak manually. But first run ./configure .
309 Change #undef NEW_DECORE to #define NEW_DECORE in config.h
310 Change #define MPEG12_POSTPROC to #undef MPEG12_POSTPROC in config.h
311 Change DECORE_LIBS in config.mak to be:
312
313
314 DECORE_LIBS=-L/usr/local/lib -ldivxdecore
315
316
317 Continue compiling MPlayer as usual.
318
319 Using it is a bit tricky. As it conflicts with the old OpenDivX (it's API is
320 very similar to OpenDivX's), OpenDivX code is disabled, and the OpenDivX
321 driver calls this library too.
322
323 Generally we can pinpoint this issue to that you have two options to use
324 this codec:
325
326
327 -vc odivx : using divx4 codec as a new version of OpenDivX.
328 in this case it produces YV12 image in its own buffer,
329 and MPlayer (libvo) does colorspace conversion.
330
331 -vc divx4 : using divx4 codec's colorspace conversion.
332 in this mode, you can use YUY2/UYVY too.
333
334 The 'odivx' method is usually faster, due to the fact that it transfers
335 image data in YV12 (planar YUV 4:2:0) format, thus requiring much less
336 bandwidth on the bus. For packed YUV modes (YUY2, UYVY) use the 'divx4'
337 method. For RGB modes you can choose freely, their speed is same, maybe
338 differ according to the current bpp.
339
340 Note: it supports postprocessing too, but range of values is strange:
341
342 0 no postproc
343 10 .. 20 postprocessing, normal
344 (like level 2 with divxds)
345 30 .. 60 hard postprocessing, eats many CPU.
346 (like level 4 with divxds)
347
290 348
291 <A NAME=2.1.2.2>2.1.2.2. ffmpeg's DivX/libavcodec 349 <A NAME=2.1.2.2>2.1.2.2. ffmpeg's DivX/libavcodec
292 350
293 351 Beginning with version 0.4.2 , <A HREF="http://ffmpeg.sourceforge.net">ffmpeg</A> contains an <B>opensource</B> DivX codec,
294 <A NAME=2.1.4>2.1.4. Codec importing howto 352 which is compatible with the traditional DivX. MPlayer supports this codec,
353 and this makes it possible to <B>watch DivX movies on non-x86 platforms!</B>
354 To get it compile, you'll need nasm, bison, and flex, above the other
355 devel tools. No manual hacking is needed to build it, ./configure detects
356 if it can be built. At the moment it doesn't support postprocessing, and
357 is under optimization (it's generally a bit faster than the DirectShow
358 DivX codec, now).
359
360 In order to use it, refresh your codecs.conf file, and do as the manpage,
361 or the example.conf says (the -vfm option).
362
363 Note: libavcodec contains other codecs as well, but at the moment we mostly
364 focus on ffdivx.
365
366 <A NAME=2.1.3>2.1.4. Codec importing howto
295 367
296 368
297 <A NAME=2.1.4.1>2.1.4.1. VFW codecs 369 <A NAME=2.1.4.1>2.1.4.1. VFW codecs
298 370
299 VfW (Video for Windows) is the old Video API for Windows. Its codecs have 371 VfW (Video for Windows) is the old Video API for Windows. Its codecs have
300 the .DLL or (rarely) .DRV extension. 372 the .DLL or (rarely) .DRV extension.
301 If MPlayer fails with your AVI: 373 If MPlayer fails with your AVI:
302 374
375
303 UNKNOWN video codec: HFYU (0x55594648) 376 UNKNOWN video codec: HFYU (0x55594648)
377
304 378
305 It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU = 379 It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU =
306 HuffYUV codec, DIV3 = DivX Low Motion, etc...). Now that we know this, we'll 380 HuffYUV codec, DIV3 = DivX Low Motion, etc...). Now that we know this, we'll
307 have to find out which DLL Windows loads in order to play this file. In our 381 have to find out which DLL Windows loads in order to play this file. In our
308 case, the system.ini contains this (with many others): 382 case, the system.ini contains this (with many others):
383
384
309 VIDC.HFYU=huffyuv.dll 385 VIDC.HFYU=huffyuv.dll
386
387
310 So we'll need the huffyuv.dll file. Note that the audio codecs are specified 388 So we'll need the huffyuv.dll file. Note that the audio codecs are specified
311 with the MSACM prefix : 389 with the MSACM prefix :
390
391
312 msacm.l3acm=L3codeca.acm 392 msacm.l3acm=L3codeca.acm
393
394
313 This is the MP3 codec. 395 This is the MP3 codec.
314
315 So, now we have all the info needed (fourcc, codec file, sample AVI), submit 396 So, now we have all the info needed (fourcc, codec file, sample AVI), submit
316 your codec support request in mail, and upload these files to the FTP: 397 your codec support request in mail, and upload these files to the FTP:
317 ftp://thot.banki.hu/MPlayer/incoming/<codecname>/ 398 ftp://thot.banki.hu/MPlayer/incoming/<codecname>/
318 399
319 400
337 If not, bad luck ;) Try guessing. 418 If not, bad luck ;) Try guessing.
338 (for ex. search for : TrueMotion) 419 (for ex. search for : TrueMotion)
339 - if found (in registry), there should be a FriendlyName field, and a CLSID 420 - if found (in registry), there should be a FriendlyName field, and a CLSID
340 field. Write down that 16 byte of CLSID, this is the GUID required by us. 421 field. Write down that 16 byte of CLSID, this is the GUID required by us.
341 422
423
342 NOTE : if searching fails, try to enable all the checkboxes.. you may have 424 NOTE : if searching fails, try to enable all the checkboxes.. you may have
343 false hits, but maybe you'll have the right, too... 425 false hits, but maybe you'll have the right, too...
344 NOTE : dump that M$ shit. 426 NOTE : dump that M$ shit.
427
345 428
346 So, now we have all the info needed (fourcc, GUID, codec file, sample AVI), 429 So, now we have all the info needed (fourcc, GUID, codec file, sample AVI),
347 submit your codec support request in mail, and upload these files to the FTP: 430 submit your codec support request in mail, and upload these files to the FTP:
348 ftp://thot.banki.hu/MPlayer/incoming/<codecname>/ 431 ftp://thot.banki.hu/MPlayer/incoming/<codecname>/
349 432
381 - pgm: PGM files output (for testing purposes or ffmpeg encoding) 464 - pgm: PGM files output (for testing purposes or ffmpeg encoding)
382 - md5: MD5sum output (for MPEG conformance tests) 465 - md5: MD5sum output (for MPEG conformance tests)
383 - odivx:OpenDivX AVI File writer (use -br to set encoding bitrate) 466 - odivx:OpenDivX AVI File writer (use -br to set encoding bitrate)
384 - null: Null output (for speed tests/benchmarking) 467 - null: Null output (for speed tests/benchmarking)
385 468
386 NOTE: check DOCS/VIDEOCARDS for details and requirements! 469 NOTE: check the following subsections for details and requirements!
387 470
388 471
389 <A NAME=2.2.1.1>2.2.1.1. Xv 472 <A NAME=2.2.1.1>2.2.1.1. Xv
390 473
391 I. Under XFree86 4.0.2 or newer, using the XVideo extension: 474 Under XFree86 4.0.2 or newer, you can use your card's hardware YUV routines
392 this is what the option '-vo xv' uses. 475 using the XVideo extension. This is what the option '-vo xv' uses.
393
394 In order to make this work, be sure to check the following: 476 In order to make this work, be sure to check the following:
395 477 - You have to use XFree86 4.0.2 or newer (former versions don't have XVideo)
396 1. You use XFree86 4.0.2 or newer (former versions don't have XVideo) 478 - Your card actually supports harware acceleration (modern cards do)
397 479 - X loads the XVideo extension, it's something like this:
398 2. Your card actually supports harware acceleration (modern cards do) 480
399 481
400 3. X loads the XVideo extension, it's something like this: 482 (II) Loading extension XVideo
401 (II) Loading extension XVideo 483
484
402 in /var/log/XFree86.0.log 485 in /var/log/XFree86.0.log
486
487
403 NOTE : this loads only the XFree86's extension. In a good install, this is 488 NOTE : this loads only the XFree86's extension. In a good install, this is
404 always loaded, and doesn't mean that the _card's_ XVideo support is 489 always loaded, and doesn't mean that the _card's_ XVideo support is
405 loaded! 490 loaded!
406 491
407 4. Your card has Xv support under Linux. To check, try 'xvinfo', it is the 492 - Your card has Xv support under Linux. To check, try 'xvinfo', it is the
408 part of the XFree86 distribution. It should display a long text, similar 493 part of the XFree86 distribution. It should display a long text, similar
409 to this: 494 to this:
495
410 496
411 X-Video Extension version 2.2 497 X-Video Extension version 2.2
412 screen #0 498 screen #0
413 Adaptor #0: "Savage Streams Engine" 499 Adaptor #0: "Savage Streams Engine"
414 number of ports: 1 500 number of ports: 1
430 bits per pixel: 12 516 bits per pixel: 12
431 number of planes: 3 517 number of planes: 3
432 type: YUV (planar) 518 type: YUV (planar)
433 (...etc...) 519 (...etc...)
434 520
521
435 It must support YUY2 packed, and YV12 planar pixel formats to be 522 It must support YUY2 packed, and YV12 planar pixel formats to be
436 usable with MPlayer. 523 usable with MPlayer.
437 524
438 I.1. 525 - And finally, check if MPlayer was compiled with 'xv' support.
439 a, If xvinfo doesn't show these, but XVideo extension is loaded and you're 526 ./configure prints this.
440 sure your card can do YUV conversion, 527
441 - 3dfx voodoo3/banshee users download a new DRI from 528
442 http://dri.sourceforge.net (or possibly use X 4.1.0) 529 <A NAME=2.2.1.1.1>2.2.1.1.1. 3dfx cards
443 - S3 Savage4 users download XFree86 >= 4.0.3 (4.1.0 preferred) 530
444 - nVidia users sell their card.. or download the nVidia driver from 531 Older 3dfx drivers were known to have problems with XVideo acceleration,
445 nVidia's website 532 it didn't support either YUY2 or YV12, and so. Verify that you have
446 b, The GATOS driver (for ATI cards) has VSYNC enabled by default. It means 533 XFree86 version 4.1.0 or greater, it works ok. Alternatively, you can use
447 that decoding speed (!) is synced to the monitor's refresh rate. If 534 <A HREF="http://dri.sourceforge.net">DRI</A> cvs.
448 playing seems to be slow, try disabling VSYNC somehow, or set refresh 535 If you experience strange effects using -vo xv, try SDL (it has XVideo too)
449 rate to n*(fps of the movie) Hz. 536 and see if it helps. Check the <A HREF="#2.2.1.3">SDL section</A> for details.
450 537
451 5. Be sure MPlayer is compiled with the "xv" target. "./configure" should say: 538
452 Checking for Xv ... yes 539 <A NAME=2.2.1.1.2>2.2.1.1.2. S3 cards
453 540
454 6. If all is fine, try the option '-vo xv' . It should work. 541 S3 Savage3D's should work fine, but for Savage4, use XFree86 version 4.0.3
455 (if it doesn't, send us a bugreport. See the BUGREPORTS on how to do this.) 542 or greater.
456 543
544
545 <A NAME=2.2.1.1.3>2.2.1.1.3. nVidia cards
546
547 nVidia isn't a very good choice under Linux.. You'll have to use the
548 binary nVidia driver, available at nVidia's website. The standard X
549 driver doesn't support XVideo for these cards, due to nVidia's closed
550 sources/specifications.
551
552
553 <A NAME=2.2.1.1.4>2.2.1.1.4. ATI cards
554
555 The GATOS driver has VSYNC enabled by default. It means that decoding speed
556 (!) is synced to the monitor's refresh rate. If playing seems to be slow, try
557 disabling VSYNC somehow, or set refresh rate to n*(fps of the movie) Hz.
457 558
458 559
459 <A NAME=2.2.1.2>2.2.1.2. DGA 560 <A NAME=2.2.1.2>2.2.1.2. DGA
460
461 1. Make sure X loads the DGA extension:
462 (II) Loading extension XFree86-DGA
463 (you see, XFree86 4.0.x or greater is VERY RECOMMENDED!)
464 2. MPlayer's DGA driver is autodetected on ./configure, or you can force it
465 with --enable-dga.
466 3. If the driver couldn't switch to a smaller resolution, experiment with
467 switches -vm (only with X 3.3.x), -fs, -bpp, -zoom to find a video mode that
468 the movie fits in. There is no converter right now.. :(
469 4. Become ROOT. DGA needs root access to be able to write directly video memory.
470 If you want to run it as user, then install MPlayer SUID root:
471 'chown root /usr/local/bin/mplayer'
472 'chmod 750 /usr/local/bin/mplayer'
473 'chmod +s /usr/local/bin/mplayer'
474 Now it works as a simple user, too.
475 !!!! BUT STAY TUNED !!!!
476 This is a BIG security risk! Never do this on a server or on a computer
477 can be accessed by more people than only you because they can gain root
478 privilegies through suid root mplayer.
479 !!!! SO YOU HAVE BEEN WARNED ... !!!!
480 5. Use '-vo dga' option, and there you go! (hope so:)
481 6. Try if the '-vo sdl:dga' options work for you! It's much faster!!!
482
483 561
484 <A NAME=2.2.1.2.1>2.2.1.2.1. Summary 562 <A NAME=2.2.1.2.1>2.2.1.2.1. Summary
485 563
486 This document tries to explain in some words what DGA is in general and 564 This document tries to explain in some words what DGA is in general and
487 what the DGA video output driver for mplayer can do (and what it can't). 565 what the DGA video output driver for mplayer can do (and what it can't).
512 However DGA has some drawbacks. It seems it is somewhat dependent on the 590 However DGA has some drawbacks. It seems it is somewhat dependent on the
513 graphics chip you use and on the implementation of the XServer's video 591 graphics chip you use and on the implementation of the XServer's video
514 driver that controls this chip. So it does not work on every system ... 592 driver that controls this chip. So it does not work on every system ...
515 593
516 594
517 <A NAME=2.2.1.2.3>2.2.1.2.3. Resolution switching 595 <A NAME=2.2.1.2.3>2.2.1.2.3. Installing DGA support for MPlayer
596
597 First make sure X loads the DGA extension, see in /var/log/XFree86.0.log :
598
599
600 (II) Loading extension XFree86-DGA
601
602
603 See, XFree86 4.0.x or greater is VERY RECOMMENDED!
604 MPlayer's DGA driver is autodetected on ./configure, or you can force it
605 with --enable-dga.
606
607 If the driver couldn't switch to a smaller resolution, experiment with
608 switches -vm (only with X 3.3.x), -fs, -bpp, -zoom to find a video mode that
609 the movie fits in. There is no converter right now.. :(
610
611 Become ROOT. DGA needs root access to be able to write directly video memory.
612 If you want to run it as user, then install MPlayer SUID root:
613
614
615 chown root /usr/local/bin/mplayer
616 chmod 750 /usr/local/bin/mplayer
617 chmod +s /usr/local/bin/mplayer
618
619
620 Now it works as a simple user, too.
621
622
623 !!!! BUT STAY TUNED !!!!
624 This is a BIG security risk! Never do this on a server or on a computer
625 can be accessed by more people than only you because they can gain root
626 privilegies through suid root mplayer.
627 !!!! SO YOU HAVE BEEN WARNED ... !!!!
628
629
630 Now use '-vo dga' option, and there you go! (hope so:)
631 You should also try if the '-vo sdl:dga' option works for you! It's much
632 faster!!!
633
634
635 <A NAME=2.2.1.2.4>2.2.1.2.4. Resolution switching
518 636
519 The DGA driver allows for switching the resolution of the output signal. 637 The DGA driver allows for switching the resolution of the output signal.
520 This avoids the need for doing (slow) software scaling and at the same 638 This avoids the need for doing (slow) software scaling and at the same
521 time provides a fullscreen image. Ideally it would switch to the exact 639 time provides a fullscreen image. Ideally it would switch to the exact
522 resolution (except for honouring aspect ratio) of the video data, but the 640 resolution (except for honouring aspect ratio) of the video data, but the
528 out which modes survive with the X11 log file. It can be found at: 646 out which modes survive with the X11 log file. It can be found at:
529 /var/log/XFree86.0.log 647 /var/log/XFree86.0.log
530 See appendix A for some sample modeline definitions. 648 See appendix A for some sample modeline definitions.
531 649
532 650
533 <A NAME=2.2.1.2.4>2.2.1.2.4. DGA & MPlayer 651 <A NAME=2.2.1.2.5>2.2.1.2.5. DGA & MPlayer
534 652
535 DGA is used in two places with MPlayer: The SDL driver can be made to make 653 DGA is used in two places with MPlayer: The SDL driver can be made to make
536 use of it (-vo sdl:dga) and within the DGA driver (-vo dga). 654 use of it (-vo sdl:dga) and within the DGA driver (-vo dga).
537 The above said is true for both; in the following sections I'll explain 655 The above said is true for both; in the following sections I'll explain
538 how the DGA driver for MPlayer works. 656 how the DGA driver for MPlayer works.
539 657
540 658
541 <A NAME=2.2.1.2.5>2.2.1.2.5. Features of the DGA driver 659 <A NAME=2.2.1.2.6>2.2.1.2.6. Features of the DGA driver
542 660
543 The DGA driver is invoked by specifying -vo dga at the command line. 661 The DGA driver is invoked by specifying -vo dga at the command line.
544 The default behaviour is to switch to a resolution matching the original 662 The default behaviour is to switch to a resolution matching the original
545 resolution of the video as close as possible. It deliberately ignores the 663 resolution of the video as close as possible. It deliberately ignores the
546 -vm and -fs switches (enabling of video mode switching and fullscreen) - 664 -vm and -fs switches (enabling of video mode switching and fullscreen) -
575 works with doublebuffering enabled. However, enabling doublebuffering may 693 works with doublebuffering enabled. However, enabling doublebuffering may
576 result in a big speed penalty (on my K6-II+ 525 it used an additional 20% of 694 result in a big speed penalty (on my K6-II+ 525 it used an additional 20% of
577 CPU time!) depending on the implementation of DGA for your hardware. 695 CPU time!) depending on the implementation of DGA for your hardware.
578 696
579 697
580 <A NAME=2.2.1.2.6>2.2.1.2.6. Speed issues 698 <A NAME=2.2.1.2.7>2.2.1.2.7. Speed issues
581 699
582 Generally spoken, DGA framebuffer access should be at least as fast as using 700 Generally spoken, DGA framebuffer access should be at least as fast as using
583 the X11 driver with the additional benefit of getting a fullscreen image. 701 the X11 driver with the additional benefit of getting a fullscreen image.
584 The percentage speed values printed by mplayer have to be interpreted with 702 The percentage speed values printed by mplayer have to be interpreted with
585 some care, as for example, with the X11 driver they do not include the time 703 some care, as for example, with the X11 driver they do not include the time
599 717
600 I've seen some avi files already be replayed on a Pentium MMX 266. AMD K6-2 718 I've seen some avi files already be replayed on a Pentium MMX 266. AMD K6-2
601 CPUs might work at 400 MHZ and above. 719 CPUs might work at 400 MHZ and above.
602 720
603 721
604 <A NAME=2.2.1.2.7>2.2.1.2.7. Known bugs 722 <A NAME=2.2.1.2.8>2.2.1.2.8. Known bugs
605 723
606 Well, according to some developpers of XFree, DGA is quite a beast. They 724 Well, according to some developpers of XFree, DGA is quite a beast. They
607 tell you better not to use it. Its implementation is not always flawless 725 tell you better not to use it. Its implementation is not always flawless
608 with every chipset driver for XFree out there. 726 with every chipset driver for XFree out there.
609 727
619 case the DGA driver will crash telling you about a nonsense mode of 737 case the DGA driver will crash telling you about a nonsense mode of
620 100000x100000 or the like ... 738 100000x100000 or the like ...
621 o OSD only works with doublebuffering enabled 739 o OSD only works with doublebuffering enabled
622 740
623 741
624 <A NAME=2.2.1.2.8>2.2.1.2.8. Future work 742 <A NAME=2.2.1.2.9>2.2.1.2.9. Future work
625 743
626 o use of the new X11 render interface for OSD 744 o use of the new X11 render interface for OSD
627 o where is my TODO list ???? :-((( 745 o where is my TODO list ???? :-(((
628 746
629 747
661 779
662 <A NAME=2.2.1.3>2.2.1.3. SDL 780 <A NAME=2.2.1.3>2.2.1.3. SDL
663 781
664 Here are some notes about SDL out in MPlayer. 782 Here are some notes about SDL out in MPlayer.
665 783
666 There are several commandline switches for sdl: 784 There are several commandline switches for SDL:
667 -vo sdl:<name> specifies sdl video driver to use (ie. aalib, 785
668 dga, x11) 786 -vo sdl:name specifies sdl video driver to use (ie. aalib,
669 -ao sdl:<name> specifies sdl audio driver to use (ie. dsp, esd) 787 dga, x11)
670 -noxv disables Xvideo hardware acceleration 788 -ao sdl:name specifies sdl audio driver to use (ie. dsp,
671 -forcexv tries to force Xvideo acceleration 789 esd)
790 -noxv disables Xvideo hardware acceleration
791 -forcexv tries to force Xvideo acceleration
672 792
673 SDL Keys: 793 SDL Keys:
674 F toggles fullscreen/windowed mode 794
675 C cycles available fullscreen modes 795 F toggles fullscreen/windowed mode
676 W/S mappings for * and / (mixer control) 796 C cycles available fullscreen modes
797 W/S mappings for * and / (mixer control)
677 798
678 KNOWN BUGS: 799 KNOWN BUGS:
679 - Keys pressed under aalib console driver repeat forever. 800 - Keys pressed under aalib console driver repeat forever.
680 It's bug in SDL, I can't change it (tested with SDL 1.2.1). 801 It's bug in SDL, I can't change it (tested with SDL 1.2.1).
681 802
682 803
683 <A NAME=2.2.1.4>2.2.1.4. SVGAlib 804 <A NAME=2.2.1.4>2.2.1.4. SVGAlib
684 805
685 a, If you don't have X... 806 If you don't have X, you can use the SVGAlib target! Be sure not to use the
686 ...use the SVGAlib target! Be sure not to use the -fs switch, since it 807 -fs switch, since it toggles the usage of the software scaler, and it's
687 toggles the usage of the software scaler, and it's SLOOOW now, unless you 808 SLOOOW now, unless you have a real fast CPU (and/or MTRR?). :(
688 have a real fast CPU (and/or MTRR?). :( 809
689 810 Of course you'll have to install svgalib and its development package in
690 Of course you'll have to install svgalib and its development package in 811 order for MPlayer build its SVGAlib driver (autodetected, but can be
691 order for MPlayer build its SVGAlib driver (autodetected, but can be 812 forced), and don't forget to edit /etc/vga/libvga.config to suit your
692 forced), and don't forget to edit /etc/vga/libvga.config to suit your 813 card & monitor.
693 card & monitor.
694 814
695 815
696 <A NAME=2.2.1.5>2.2.1.5. Framebuffer output (FBdev) 816 <A NAME=2.2.1.5>2.2.1.5. Framebuffer output (FBdev)
697 817
698 b, You want to use framebuffer... 818 Whether to build the FBdev target is autodetected during ./configure .
699 ... Whether to build the FBdev target is autodetected during ./configure . 819 Read the framebuffer documentation in the kernel sources
700 Read the framebuffer documentation in the kernel sources 820 (Documentation/fb/*) for info on how to enable it, etc.. !
701 (Documentation/fb/*) for info on how to enable it, etc.. ! 821
702 822 If your card doesn't support VBE 2.0 standard (older ISA/PCI
703 ... but your card doesn't support VBE 2.0 standard (older ISA/PCI 823 cards, such as S3 Trio64), only VBE 1.2 (or older?) :
704 cards, such as S3 Trio64), only VBE 1.2 (or older?) : 824 Well, VESAfb is still available, but you'll have to load SciTech Display
705 Well, VESAfb is still available, but you'll have to load SciTech Display 825 Doctor (formerly UniVBE) before booting Linux. Use a DOS boot disk or
706 Doctor (formerly UniVBE) before booting Linux. Use a DOS boot disk or 826 whatever. And don't forget to register your UniVBE ;))
707 whatever. And don't forget to register your UniVBE ;)) 827
708 828
709 NOTE : FBdev video mode changing _does not work_ with the VESA framebuffer, 829 NOTE: FBdev video mode changing _does not work_ with the VESA framebuffer,
710 and don't ask for it, since it's not an MPlayer limitation. 830 and don't ask for it, since it's not an MPlayer limitation.
711 831
712 832
713 <A NAME=2.2.1.6>2.2.1.6. Matrox framebuffer (mga_vid) 833 <A NAME=2.2.1.6>2.2.1.6. Matrox framebuffer (mga_vid)
714 834
715 1. Matrox G200/G400/G450 BES (Back-End Scaler) support -> mga_vid kernel drv. 835 This section is about the Matrox G200/G400/G450 BES (Back-End Scaler)
716 It's active developed by me (A'rpi), and it has hardware VSYNC support 836 support, the mga_vid kernel driver. It's active developed by me (A'rpi), and
717 with triple buffering. It works on both framebuffer console and under X. 837 it has hardware VSYNC support with triple buffering. It works on both
838 framebuffer console and under X.
718 839
719 To use, simply compile the mga_vid.o in the drivers/ subdir (type: make) 840 To use it, you first have to compile mga_vid.o :
720 create /dev/mga_vid device : 841
721 mknod /dev/mga_vid c 178 0 842
722 and load the driver with insmod mga_vid.o. You should verify the memory size 843 cd drivers
723 detection using the 'dmesg' command. If it's bad, use the mga_ram_size 844 make
724 option (rmmod mga_vid first), specify card's memory size in MB: 845
725 insmod mga_vid.o mga_ram_size=16 846
726 To make it load/unload automatically when needed, insert the following line 847 Then create /dev/mga_vid device :
727 at the end of /etc/modules.conf : 848
728 alias char-major-178 mga_vid 849
729 Then run 850 mknod /dev/mga_vid c 178 0
730 depmod -a 851
731 852
732 Using it from MPlayer: (you should re-compile it with mga_vid support...) 853 and load the driver with
854
855
856 insmod mga_vid.o
857
858
859 You should verify the memory size detection using the 'dmesg' command. If
860 it's bad, use the mga_ram_size option (rmmod mga_vid first), specify card's
861 memory size in MB:
862
863
864 insmod mga_vid.o mga_ram_size=16
865
866
867 To make it load/unload automatically when needed, insert the following line
868 at the end of /etc/modules.conf :
869
870
871 alias char-major-178 mga_vid
872
873
874 Then run
875
876
877 depmod -a
878
879
880 Now you have to (re)compile MPlayer, ./configure will detect /dev/mga_vid
881 and build the 'mga' driver. Using it from MPlayer goes by '-vo mga' if
882 you have matroxfb console, or '-vo xmga' under XFree86 3.x.x or 4.x.x .
883
884 Note: '-vo xmga' works under XFree86 4.x.x, but it conflicts with the Xv
885 driver, so avoid using both. If you messed up Xv with mga, try running
886 MPlayer with '-vo mga' . It should fix Xv.
733 887
734 Use the 'mga' vo driver on framebuffer console (matroxfb): -vo mga
735 and use the xmga driver for X 3.3.x: -vo xmga
736
737 Note: it works under X 4.0.2 too, but it conflicts with the Xv driver,
738 so avoid using both. Usually X restart or reboot needs to get Xv usable
739 again :(
740
741 If you have a dual-head G400, and a TV or second monitor connected to head2,
742 then you can watch movies on it: read DOCS/TVout-G400 for details (big hack)
743
744 888
745 <A NAME=2.2.1.7>2.2.1.7. SiS 6326 framebuffer (sis_vid) 889 <A NAME=2.2.1.7>2.2.1.7. SiS 6326 framebuffer (sis_vid)
746 890
747 2. SiS 6326 YUV Framebuffer driver -> sis_vid kernel driver 891 SiS 6326 YUV Framebuffer driver -> sis_vid kernel driver
748 Its interface should be compatible with the mga_vid, but the driver 892
749 was not updated after the mga_vid changes, so it's outdated now. 893 Its interface should be compatible with the mga_vid, but the driver was not
750 Volunteers needed to test it and bring the code up-to-date. 894 updated after the mga_vid changes, so it's outdated now. Volunteers
895 needed to test it and bring the code up-to-date.
751 896
752 897
753 <A NAME=2.2.1.8>2.2.1.8. 3dfx YUV support 898 <A NAME=2.2.1.8>2.2.1.8. 3dfx YUV support
754 899
755 3. 3dfx (which ones?) YUV+scaler support, using /dev/3dfx (tdfx.o driver?) 900 3dfx has native YUV+scaler support, using /dev/3dfx (tdfx.o driver?)
756 The /dev/3dfx kernel driver exists only for 2.2.x kernels, for use with 901 The /dev/3dfx kernel driver exists only for 2.2.x kernels, for use with
757 Glide 2.x Linux ports. It's not tested with MPlayer, and so no more 902 Glide 2.x Linux ports. It's not tested with MPlayer, and so no more
758 supported. Volunteers needed to test it and bring the code up-to-date. 903 supported. Volunteers needed to test it and bring the code up-to-date.
759 904
760 905
761 <A NAME=2.2.1.9>2.2.1.9. OpenGL output 906 <A NAME=2.2.1.9>2.2.1.9. OpenGL output
762 907
763 The old Utah-GLX drivers (for X 3.3.6) have it, with all cards. 908 MPlayer support displaying movies using OpenGL. Unfortunately, not all
764 See http://utah-glx.sourceforge.net for details about how to install it. 909 drivers support this ability. For example the Utah-GLX drivers
765 910 (for XFree86 3.3.6) have it, with all cards.
766 DRI >= 4.0.3 supports it only with Matrox cards, and Radeon. 911 See <A HREF="http://utah-glx.sourceforge.net">http://utah-glx.sourceforge.net</A> for details about how to install it.
767 See dri.sourceforge.net for download, and installation instructions. 912
913 XFree86(DRI) >= 4.0.3 supports it only with Matrox, and Radeon cards.
914 See <A HREF="http://dri.sourceforge.net">http://dri.sourceforge.net</A> for download, and installation instructions.
768 915
769 916
770 <A NAME=2.2.2>2.2.2. Audio output devices 917 <A NAME=2.2.2>2.2.2. Audio output devices
771 918
772 - OSS (ioctl) driver 919 - OSS (ioctl) driver
775 - native ALSA 0.9 driver (buggy, use OSS emulation!) 922 - native ALSA 0.9 driver (buggy, use OSS emulation!)
776 - native ESD driver (under development?) 923 - native ESD driver (under development?)
777 - SUN audio driver (/dev/audio) for BSD and Solaris8 users 924 - SUN audio driver (/dev/audio) for BSD and Solaris8 users
778 925
779 926
780 <A NAME=2.3>2.3. Subtitles and OSD (On-Screen Display)
781
782 Yes, mplayer also supports many kinds of subtitles. Currently (2001/06/01)
783 7 kinds of subtitle can be used by the subreader code. To see what are
784 these subtitle formats, see subreader.c, line ~20.
785
786 Subtitles are displayed with a technique called 'OSD', On Screen Display.
787 OSD is used to display current time, volume bar, seek bar etc.
788
789
790 INSTALLING OSD and SUB
791 -------
792
793 NOTE: OSD and SUBTITLES are NOT enabled by default! You have to download
794 fonts from mplayer's download page mplayerhq.hu/homepage/dload.html
795
796 Standard (Central-European, Latin1) font package:
797 http://thot.banki.hu/mp-ftp/releases/mp_font3.zip
798 (it obsoletes mp_font1.zip and mp_font2.zip)
799
800 Cyrillic fonts:
801 http://thot.banki.hu/mp-ftp/releases/bgfont.zip
802
803 And visit this site for korean subtitle support:
804 http://realtime.ssu.ac.kr/~lethean/mplayer
805
806 After that, UNZIP the files to ~/.mplayer/font/
807 Now you have to see a clock at the upper left corner of the movie
808 (switch it off with 'o')
809
810 OSD has 3 states: (switch with 'o')
811 - clock + volume bar + seek bar + sub (default)
812 - volume bar + seek bar + sub
813 - only sub
814
815
816 <A NAME=3>3. Usage 927 <A NAME=3>3. Usage
817 928
818 file: mplayer [options] [path/]filename 929 file: mplayer [options] [path/]filename
819 VCD: mplayer [options] -vcd trackno /dev/cdrom 930 VCD: mplayer [options] -vcd trackno /dev/cdrom
820 DVD: mplayer [options] -dvdauth /dev/dvd filename.VOB 931 DVD: mplayer [options] -dvdauth /dev/dvd filename.VOB
827 mplayer -abs 65536 -delay -0.4 -nobps ~/movies/test.avi 938 mplayer -abs 65536 -delay -0.4 -nobps ~/movies/test.avi
828 939
829 940
830 <A NAME=3.1>3.1. Control from keyboard 941 <A NAME=3.1>3.1. Control from keyboard
831 942
832 <- or -> seek backward/forward 10 seconds 943
833 up or down seek backward/forward 1 minute 944 l/r arrows seek backward/forward 10 seconds
834 p or SPACE pause movie (press any key to continue) 945 up or down seek backward/forward 1 minute
835 q or ^C stop playing and quit program 946 p or SPACE pause movie (press any key to continue)
836 o toggle OSD : none / seek / seek+timer 947 q or ^C stop playing and quit program
837 / and * decrease/increase volume 948 o toggle OSD : none / seek / seek+timer
838 m toggle using master/pcm channel for volume setting 949 / and * decrease/increase volume
839 f toggle fullscreen (only with -vo sdl) 950 m toggle using master/pcm channel for volume setting
951 f toggle fullscreen (only with -vo sdl)
840 952
841 953
842 <A NAME=3.2>3.2. Control from LIRC 954 <A NAME=3.2>3.2. Control from LIRC
843 955
844 Linux Infrared Remote Control - use an easy to build home-brewn IR-receiver, 956 Linux Infrared Remote Control - use an easy to build home-brewn IR-receiver,
889 use the -lircconf <filename> switch to specify another file. 1001 use the -lircconf <filename> switch to specify another file.
890 1002
891 1003
892 <A NAME=3.3>3.3. Streaming from network or pipes 1004 <A NAME=3.3>3.3. Streaming from network or pipes
893 1005
1006 MPlayer can play media from network, by using the HTTP protocol, and even
1007 beta ASF streaming (FROM network) is available.
1008 Configuring it is simple, just recompile MPlayer with
1009
1010
1011 ./configure --enable-streaming
1012
1013
1014 MPlayer can read from stdin (NOT named pipes). This can be for example
1015 used to play from FTP :
1016
1017
894 wget ftp://micorsops.com/something.avi -O - | mplayer - 1018 wget ftp://micorsops.com/something.avi -O - | mplayer -
895 1019
896 1020
897 <A NAME=4>4. TV-out support 1021 <A NAME=4>4. TV-out support
898 1022
927 1051
928 - Compile all the matrox-related things to modules in the kernel. 1052 - Compile all the matrox-related things to modules in the kernel.
929 (you MUST compile them to modules, at least I couldn't get them 1053 (you MUST compile them to modules, at least I couldn't get them
930 working built-in yet) 1054 working built-in yet)
931 [reboot to new kernel & install modules, but don't load them yet!] 1055 [reboot to new kernel & install modules, but don't load them yet!]
1056
1057 cd TVout
1058 ./compile.sh
932 1059
933 - Run the 'modules' script from the TV-out directory of mplayer. 1060 - Run the 'modules' script from the TV-out directory of mplayer.
934 It will switch your console to framebuffer. 1061 It will switch your console to framebuffer.
935 Change to tty1 (ALT+F1)! 1062 Change to tty1 (ALT+F1)!
936 Now run the script 'independent', it will set up your tty's: 1063 Now run the script 'independent', it will set up your tty's:
975 make an annoyingly loud noise, which a lower speed may reduce. 1102 make an annoyingly loud noise, which a lower speed may reduce.
976 1103
977 The recommended way to do it is with a program called 'setcd' . It's kinda 1104 The recommended way to do it is with a program called 'setcd' . It's kinda
978 old, but won't be too hard to find on the Net. 1105 old, but won't be too hard to find on the Net.
979 Use it with : 1106 Use it with :
980 setcd -x <speed> <cdrom device> 1107
1108
1109 setcd -x [speed] [cdrom device]
1110
981 1111
982 Also you can try : 1112 Also you can try :
983 echo current_speed:4 >/proc/ide/<cdrom device>/settings 1113
984 but you'll need root privileges. (It didn't work for me - Gabucino) 1114
985 1115 echo current_speed:4 >/proc/ide/[cdrom device]/settings
986 I use following command too : 1116
987 echo file_readahead:2000000 >/proc/ide/<cdrom device>/settings 1117
1118 but you'll need root privileges. I use following command too :
1119
1120
1121 echo file_readahead:2000000 >/proc/ide/[cdrom device]/settings
1122
1123
988 for 2MB prefetched reading from the file (it's useful for scratched CDROMs). 1124 for 2MB prefetched reading from the file (it's useful for scratched CDROMs).
989
990 It's recommended that you tuneup your CDROM drive also with hdparm : 1125 It's recommended that you tuneup your CDROM drive also with hdparm :
991 hdparm -d1 -a8 -u1 <cdrom device> 1126
1127
1128 hdparm -d1 -a8 -u1 <cdrom device>
1129
1130
992 to enable using DMA access, readahead, and IRQ unmasking. 1131 to enable using DMA access, readahead, and IRQ unmasking.
993 (if you don't understand these, *read the hdparm manpage*) 1132 (if you don't understand these, *read the hdparm manpage*)
994 1133
995 Please refer to "/proc/ide/<cdrom device>/settings" for fine-tuning your 1134 Please refer to "/proc/ide/[cdrom device]/settings" for fine-tuning your
996 CDROM. 1135 CDROM.
997 1136
998 1137
999 <A NAME=5.2>5.2. DVD drives 1138 <A NAME=5.2>5.2. DVD drives
1000 1139
1100 However this does not occur if you specify '-aid 128'. 1239 However this does not occur if you specify '-aid 128'.
1101 1240
1102 1241
1103 <A NAME=5.3>5.3. MTRR 1242 <A NAME=5.3>5.3. MTRR
1104 1243
1105 Setting up MTRR for X11 3.3.x, SVGAlib or mga_vid: 1244 It is VERY recommended to set MTRR registers up properly, because they can
1106 ================================================== 1245 give a big performance boost. First you have to find the base address.
1107
1108 1. find the base address
1109 ~~~~~~~~~~~~~~~~~~~~~~~~
1110 You have 3 ways to find it: 1246 You have 3 ways to find it:
1111 1247
1112 - from X11 startup messages, for example: 1248 - from X11 startup messages, for example:
1249
1113 (--) SVGA: PCI: Matrox MGA G400 AGP rev 4, Memory @ 0xd8000000, 0xd4000000 1250 (--) SVGA: PCI: Matrox MGA G400 AGP rev 4, Memory @ 0xd8000000, 0xd4000000
1114 (--) SVGA: Linear framebuffer at 0xD8000000 1251 (--) SVGA: Linear framebuffer at 0xD8000000
1115 1252
1116 - from /proc/pci (use lspci -v command): 1253 - from /proc/pci (use lspci -v command):
1254
1117 01:00.0 VGA compatible controller: Matrox Graphics, Inc.: Unknown device 0525 1255 01:00.0 VGA compatible controller: Matrox Graphics, Inc.: Unknown device 0525
1118 Memory at d8000000 (32-bit, prefetchable) 1256 Memory at d8000000 (32-bit, prefetchable)
1119 1257
1120 - from mga_vid kernel driver messages (use dmesg): 1258 - from mga_vid kernel driver messages (use dmesg):
1259
1121 mga_mem_base = d8000000 1260 mga_mem_base = d8000000
1122 1261
1123 2. find memory size 1262 Then let's find the memory size. This is very easy, just convert video ram
1124 ~~~~~~~~~~~~~~~~~~~ 1263 size to hexadecimal, or use this table:
1125 This is very easy, just convert video ram size to hexadecimal, or 1264
1126 use this table: 1265
1127 1 MB 0x100000 1266 1 MB 0x100000
1128 2 MB 0x200000 1267 2 MB 0x200000
1129 4 MB 0x400000 1268 4 MB 0x400000
1130 8 MB 0x800000 1269 8 MB 0x800000
1131 16 MB 0x1000000 1270 16 MB 0x1000000
1132 32 MB 0x2000000 1271 32 MB 0x2000000
1133 1272
1134 3. setting up mtrr 1273
1135 ~~~~~~~~~~~~~~~~~~
1136 You know base address and memory size, let's setup mtrr registers! 1274 You know base address and memory size, let's setup mtrr registers!
1137 1275 For example, for the Matrox card above (base=0xd8000000) with 32MB
1138 For example, for the matrox card above (base=0xd8000000) with 32MB 1276 ram (size=0x2000000) just execute:
1139 ram (size=0x2000000) just execute: 1277
1140 echo "base=0xd8000000 size=0x2000000 type=write-combining" >| /proc/mtrr 1278
1141 1279 echo "base=0xd8000000 size=0x2000000 type=write-combining" >| /proc/mtrr
1142 - Older K6-2's [around 266Mhz, stepping 0] doesn't support MTRR, but 1280
1143 stepping 12's do ('cat /proc/cpuinfo' to check it). 1281
1144 1282 Not all CPUs support MTRRs. For example older K6-2's [around 266Mhz,
1145 1283 stepping 0] doesn't support MTRR, but stepping 12's do ('cat /proc/cpuinfo'
1146 <A NAME=6>6. FAQ section 1284 to check it).
1285
1286
1287 <A NAME=6>6. FAQ section (TODO)
1147 1288
1148 Yes, this is the MPlayer FAQ. 1289 Yes, this is the MPlayer FAQ.
1149 ============================= 1290 =============================
1150 1291
1151 About: 1292 About:
1418 <A NAME=7>7. Misc OS'es 1559 <A NAME=7>7. Misc OS'es
1419 1560
1420 1561
1421 <A NAME=7.1>7.1. Debian packaging 1562 <A NAME=7.1>7.1. Debian packaging
1422 1563
1423 To build the package: 1564 To build the package, get the cvs version, or .tgz and uncompress it,
1424 Get the cvs version, or .tgz and uncompress it, 1565 and cd into programs directory:
1425 cd into programs directory: 1566
1426 eyck@incubus:~/src$ cd main 1567
1427 eyck@incubus:~/src/main$ fakeroot debian/rules binary 1568 cd main
1428 (... mplayer detects hardware/software, builds itself and.. ) 1569 fakeroot debian/rules binary
1429 .. 1570
1430 dpkg-deb: building package `mplayer' in `../mplayer_0.18-1_i386.deb'. 1571
1431 1572 (... mplayer detects hardware/software, builds itself and.. )
1432 And now just dpkg -i ../mplayer_0.18-1_i386.deb as root. 1573 dpkg-deb: building package `mplayer' in `../mplayer_0.18-1_i386.deb'.
1433 Here's how it looks like: 1574
1434 1575 And now just become root, and :
1435 eyck@incubus:/src/main$ sudo dpkg -i ../mplayer_0.18-1_i386.deb 1576
1436 Password: 1577
1437 (Reading database ... 26946 files and directories currently installed.) 1578 dpkg -i ../mplayer_0.18-1_i386.deb as root.
1438 Preparing to replace mplayer 0.17a-1 (using ../mplayer_0.18-1_i386.deb) ... 1579
1439 Unpacking replacement mplayer ... 1580
1440 Setting up mplayer (0.18-1) ... 1581 Here's how it looks like:
1582
1583 eyck@incubus:/src/main$ sudo dpkg -i ../mplayer_0.18-1_i386.deb
1584 Password:
1585 (Reading database ... 26946 files and directories currently installed.)
1586 Preparing to replace mplayer 0.17a-1 (using ../mplayer_0.18-1_i386.deb)
1587 Unpacking replacement mplayer ...
1588 Setting up mplayer (0.18-1) ...
1441 1589
1442 1590
1443 <A NAME=7.2>7.2. FreeBSD 1591 <A NAME=7.2>7.2. FreeBSD
1444 1592
1445 Notes for FreeBSD users 1593 To build the package you will need GNU make (gmake, /usr/ports/devel/gmake),
1446 ======================= 1594 native BSD make will not work.
1447 1595
1448 1. To build the package you will need GNU make (gmake, /usr/ports/devel/gmake), 1596 To run MPlayer you will need to re-compile the kernel with
1449 native BSD make will not work. 1597 "options USER_LDT" (unless you are running -CURRENT, where this is default).
1450 1598
1451 2. To run mplayer you will need to re-compile the kernel with 1599 If MPlayer complains about "CD-ROM Device '/dev/cdrom' not found!" make a
1452 "options USER_LDT" (unless you are running -CURRENT, where this is default). 1600 symbolic link : ln -s /dev/<your_cdrom_device> /dev/cdrom
1453 1601
1454 3. If mplayer complains about "CD-ROM Device '/dev/cdrom' not found!" make a 1602 There's no DVD support for FreeBSD yet.
1455 symbolic link : ln -s /dev/<your_cdrom_device> /dev/cdrom 1603 Feel free to add it :-)
1456
1457 4. There's no DVD support for FreeBSD yet.
1458 Feel free to add them :-)
1459
1460 Enjoy (as do I)!
1461
1462 --
1463 Vladimir Kushnir
1464 1604
1465 1605
1466 <A NAME=7.3>7.3. Solaris 8 1606 <A NAME=7.3>7.3. Solaris 8
1467 1607
1468 Notes for Solaris users 1608 AVI file playback works best on Solaris x86, because you have the
1469 ======================= 1609 option to use the win32 codecs on the x86 platform. On Solaris SPARC,
1470 1610 you'll find quite a few AVI files with non working video and/or
1471 1. AVI file playback works best on Solaris x86, because you have the 1611 audio playback, because the video/audio codecs using the win32 DLLs
1472 option to use the win32 codecs on the x86 platform. On Solaris SPARC, 1612 are not available. However, <B>DivX/OpenDivX</B> movies should work,
1473 you'll find quite a few AVI files with non working video and/or 1613 when using libavcodec.
1474 audio playback, because the video/audio codecs using the win32 DLLs 1614
1475 are not available. 1615 To build the package you will need GNU make (gmake, /opt/sfw/gmake), native
1476 1616 Solaris make will not work. Typical error you get when building with solaris'
1477 1617 make instead of GNU make:
1478 2. To build the package you will need GNU make (gmake, /opt/sfw/gmake), 1618
1479 native Solaris make will not work.
1480
1481 Typical error you get when building with solaris' make instead of GNU
1482 make:
1483 1619
1484 % /usr/ccs/bin/make 1620 % /usr/ccs/bin/make
1485 make: Fatal error in reader: Makefile, line 25: Unexpected end of line seen 1621 make: Fatal error in reader: Makefile, line 25: Unexpected end of line seen
1486 1622
1487 1623
1488 3. On Solaris SPARC, you need the GNU C/C++ Compiler; it does not matter 1624 On Solaris SPARC, you need the GNU C/C++ Compiler; it does not matter
1489 if GNU C/C++ compiler is configured with or without the GNU assembler. 1625 if GNU C/C++ compiler is configured with or without the GNU assembler.
1490 1626
1491 On Solaris x86, you need the GNU assembler and the GNU C/C++ 1627 On Solaris x86, you need the GNU assembler and the GNU C/C++
1492 compiler, configured to use the GNU assembler! The mplayer code on 1628 compiler, configured to use the GNU assembler! The mplayer code on
1493 the x86 platform makes heavy use of MMX, SSE and 3DNOW! 1629 the x86 platform makes heavy use of MMX, SSE and 3DNOW!
1494 instructions that cannot be compiled using Sun's assembler 1630 instructions that cannot be compiled using Sun's assembler
1495 /usr/ccs/bin/as. 1631 /usr/ccs/bin/as.
1496 1632
1497 1633 The configure script tries to find out, which assembler program is
1498 The configure script tries to find out, which assembler program is 1634 used by your "gcc" command (in case the autodetection fails, use
1499 used by your "gcc" command (in case the autodetection fails, use 1635 the "--as=/whereever/you/have/installed/gnu-as" option to tell the
1500 the "--as=/whereever/you/have/installed/gnu-as" option to tell the 1636 configure script where it can find GNU "as" on your system).
1501 configure script where it can find GNU "as" on your system). 1637
1502 1638 Error message from configure on a Solaris x86 system using GCC
1503 Error message from configure on a Solaris x86 system using GCC 1639 without GNU assembler:
1504 without GNU assembler: 1640
1505 1641 % configure
1506 % configure 1642 ...
1507 ... 1643 Checking assembler (/usr/ccs/bin/as) ... , failed
1508 Checking assembler (/usr/ccs/bin/as) ... , failed 1644 Please upgrade(downgrade) binutils to 2.10.1...
1509 Please upgrade(downgrade) binutils to 2.10.1... 1645
1510 1646 (Solution: Install and use a gcc configured with "--with-as=gas")
1511 (Solution: Install and use a gcc configured with "--with-as=gas") 1647
1512 1648 Typical error you get when building with a GNU C compiler that does
1513 1649 not use GNU as:
1514 Typical error you get when building with a GNU C compiler that does 1650
1515 not use GNU as: 1651 % gmake
1516 1652 ...
1517 % gmake 1653 gcc -c -Iloader -Ilibvo -O4 -march=i686 -mcpu=i686 -pipe -ffast-math
1518 ... 1654 -fomit-frame-pointer -I/usr/local/include -o mplayer.o mplayer.c
1519 gcc -c -Iloader -Ilibvo -O4 -march=i686 -mcpu=i686 -pipe -ffast-math 1655 Assembler: mplayer.c
1520 -fomit-frame-pointer -I/usr/local/include -o mplayer.o mplayer.c 1656 "<stdin>", line 3567 : Illegal mnemonic
1521 Assembler: mplayer.c 1657 "<stdin>", line 3567 : Syntax error
1522 "<stdin>", line 3567 : Illegal mnemonic 1658 ... more "Illegal mnemonic" and "Syntax error" errors ...
1523 "<stdin>", line 3567 : Syntax error 1659
1524 ... more "Illegal mnemonic" and "Syntax error" errors ... 1660
1525 1661 For DVD support you must have the patched libcss installed. Patch:
1526 1662 http://www.tools.de/solaris/mplayer/
1527 4. For DVD support you must have the patched libcss installed. Patch: 1663
1528 http://www.tools.de/solaris/mplayer/ 1664
1529 1665 Due to two bugs in solaris 8 x86, you cannot reliably play DVDs using a
1530 1666 capacity >4GB:
1531 5. Due to two bugs in solaris 8 x86, you cannot reliably play DVDs using a
1532 capacity >4GB:
1533 1667
1534 - The sd(7D) driver on solaris 8 x86 driver has bug when accessing a 1668 - The sd(7D) driver on solaris 8 x86 driver has bug when accessing a
1535 disk block >4GB on a device using a logical blocksize != DEV_BSIZE 1669 disk block >4GB on a device using a logical blocksize != DEV_BSIZE
1536 (i.e. CDROM and DVD media). Due to a 32bit int overflow, a disk 1670 (i.e. CDROM and DVD media). Due to a 32bit int overflow, a disk
1537 address modulo 4GB is accessed. 1671 address modulo 4GB is accessed.
1539 1673
1540 - The similar bug is present in the hsfs(7FS) filesystem code (aka 1674 - The similar bug is present in the hsfs(7FS) filesystem code (aka
1541 ISO9660), hsfs currently does not support partitions/disks >4GB, 1675 ISO9660), hsfs currently does not support partitions/disks >4GB,
1542 all data is accessed modulo 4GB 1676 all data is accessed modulo 4GB
1543 (http://groups.yahoo.com/group/solarisonintel/message/22592) 1677 (http://groups.yahoo.com/group/solarisonintel/message/22592)
1544
1545 --
1546 Jürgen Keil
1547 1678
1548 1679
1549 <A NAME=A>Appendix A - Authors 1680 <A NAME=A>Appendix A - Authors
1550 1681
1551 NOTE: Do *NOT* send bugreports, help & feature requests directly to the authors! 1682 NOTE: Do *NOT* send bugreports, help & feature requests directly to the authors!