Mercurial > mplayer.hg
annotate DOCS/xml/en/video.xml @ 10076:60c4fd2cb179
Small update by Bohdan Horst.
author | diego |
---|---|
date | Mon, 05 May 2003 23:36:11 +0000 |
parents | b3ce60d238c4 |
children | a570a78537aa |
rev | line source |
---|---|
9675 | 1 <?xml version="1.0" encoding="iso-8859-1"?> |
2 <sect2 id="video-dev"> | |
3 <title>Video output devices</title> | |
4 | |
5 <sect3 id="mtrr"> | |
6 <title>Setting up MTRR</title> | |
7 | |
8 <para> | |
9 It is VERY recommended to check if the MTRR registers | |
10 are set up properly, because they can give a big performance boost. | |
11 </para> | |
12 | |
13 <para> | |
14 Do a <command>/proc/mtrr</command>: | |
15 <screen> | |
16 <prompt>--($:~)--</prompt> cat /proc/mtrr | |
17 reg00: base=0xe4000000 (3648MB), size= 16MB: write-combining, count=9 | |
18 reg01: base=0xd8000000 (3456MB), size= 128MB: write-combining, count=1<!-- | |
19 --></screen> | |
20 </para> | |
21 | |
22 <para> | |
23 It's right, shows my Matrox G400 with 16MB memory. I did this from | |
24 XFree 4.x.x , which sets up MTRR registers automatically. | |
25 </para> | |
26 | |
27 <para> | |
28 If nothing worked, you have to do it manually. First, you have to find the | |
29 base address. You have 3 ways to find it: | |
30 | |
31 <orderedlist> | |
32 <listitem><para> | |
33 from X11 startup messages, for example: | |
34 <screen> | |
35 (--) SVGA: PCI: Matrox MGA G400 AGP rev 4, Memory @ 0xd8000000, 0xd4000000 | |
36 (--) SVGA: Linear framebuffer at 0xD8000000<!-- | |
37 --></screen> | |
38 </para></listitem> | |
39 <listitem><para> | |
40 from <filename>/proc/pci</filename> (use <command>lspci -v</command> | |
41 command): | |
42 <screen> | |
43 01:00.0 VGA compatible controller: Matrox Graphics, Inc.: Unknown device 0525 | |
44 Memory at d8000000 (32-bit, prefetchable) | |
45 </screen> | |
46 </para></listitem> | |
47 <listitem><para> | |
48 from mga_vid kernel driver messages (use <command>dmesg</command>): | |
49 <screen>mga_mem_base = d8000000</screen> | |
50 </para></listitem> | |
51 </orderedlist> | |
52 </para> | |
53 | |
54 <para> | |
55 Then let's find the memory size. This is very easy, just convert video RAM | |
56 size to hexadecimal, or use this table: | |
57 <informaltable frame="none"> | |
58 <tgroup cols="2"> | |
59 <tbody> | |
60 <row><entry>1 MB</entry><entry>0x100000</entry></row> | |
61 <row><entry>2 MB</entry><entry>0x200000</entry></row> | |
62 <row><entry>4 MB</entry><entry>0x400000</entry></row> | |
63 <row><entry>8 MB</entry><entry>0x800000</entry></row> | |
64 <row><entry>16 MB</entry><entry>0x1000000</entry></row> | |
65 <row><entry>32 MB</entry><entry>0x2000000</entry></row> | |
66 </tbody> | |
67 </tgroup> | |
68 </informaltable> | |
69 </para> | |
70 | |
71 <para> | |
72 You know base address and memory size, let's setup MTRR registers! | |
73 For example, for the Matrox card above (<literal>base=0xd8000000</literal>) | |
74 with 32MB ram (<literal>size=0x2000000</literal>) just execute: | |
75 <screen> | |
76 echo "base=0xd8000000 size=0x2000000 type=write-combining" >| /proc/mtrr | |
77 </screen> | |
78 </para> | |
79 | |
80 <para> | |
81 Not all CPUs support MTRRs. For example older K6-2's (around 266MHz, | |
82 stepping 0) doesn't support MTRR, but stepping 12's do (<command>cat /proc/cpuinfo | |
83 </command> to check it). | |
84 </para> | |
85 </sect3> | |
86 | |
87 <sect3 id="output-trad"> | |
88 <title>Video outputs for traditional video cards</title> | |
89 <sect4 id="xv"> | |
90 <title>Xv</title> | |
91 | |
92 <para> | |
93 Under XFree86 4.0.2 or newer, you can use your card's hardware YUV routines | |
94 using the XVideo extension. This is what the option '<option>-vo | |
95 xv</option>' uses. Also, this is driver supports adjusting | |
96 brightness/contrast/hue/etc (unless you use the old, slow DirectShow DivX | |
97 codec, which supports it everywhere), see the man page. | |
98 </para> | |
99 | |
100 <para> | |
101 In order to make this work, be sure to check the following: | |
102 | |
103 <orderedlist> | |
104 <listitem><para> | |
105 You have to use XFree86 4.0.2 or newer (former versions don't have XVideo) | |
106 </para></listitem> | |
107 <listitem><para> | |
108 Your card actually supports hardware acceleration (modern cards do) | |
109 </para></listitem> | |
110 <listitem><para> | |
111 X loads the XVideo extension, it's something like this: | |
112 <programlisting>(II) Loading extension XVideo</programlisting> | |
113 in <filename>/var/log/XFree86.0.log</filename> | |
114 <note><para> | |
115 This loads only the XFree86's extension. In a good install, this is | |
116 always loaded, and doesn't mean that the <emphasis role="bold">card's</emphasis> | |
117 XVideo support is loaded! | |
118 </para></note> | |
119 </para></listitem> | |
120 <listitem><para> | |
121 Your card has Xv support under Linux. To check, try | |
122 <command>xvinfo</command>, it is the part of the XFree86 distribution. It | |
123 should display a long text, similar to this: | |
124 <screen> | |
125 X-Video Extension version 2.2 | |
126 screen #0 | |
127 Adaptor #0: "Savage Streams Engine" | |
128 number of ports: 1 | |
129 port base: 43 | |
130 operations supported: PutImage | |
131 supported visuals: | |
132 depth 16, visualID 0x22 | |
133 depth 16, visualID 0x23 | |
134 number of attributes: 5 | |
135 (...) | |
136 Number of image formats: 7 | |
137 id: 0x32595559 (YUY2) | |
138 guid: 59555932-0000-0010-8000-00aa00389b71 | |
139 bits per pixel: 16 | |
140 number of planes: 1 | |
141 type: YUV (packed) | |
142 id: 0x32315659 (YV12) | |
143 guid: 59563132-0000-0010-8000-00aa00389b71 | |
144 bits per pixel: 12 | |
145 number of planes: 3 | |
146 type: YUV (planar) | |
147 (...etc...)<!-- | |
148 --></screen> | |
149 It must support YUY2 packed, and YV12 planar pixel formats to be usable | |
150 with <application>MPlayer</application>. | |
151 </para></listitem> | |
152 <listitem><para> | |
153 And finally, check if <application>MPlayer</application> was compiled | |
154 with 'xv' support. <filename>./configure</filename> prints this. | |
155 </para></listitem> | |
156 </orderedlist> | |
157 </para> | |
158 | |
159 <sect5 id="tdfx"> | |
160 <title>3dfx cards</title> | |
161 | |
162 <para> | |
163 Older 3dfx drivers were known to have problems with XVideo acceleration, it | |
164 didn't support either YUY2 or YV12, and so. Verify that you have XFree86 | |
165 version 4.2.0 or greater, it works OK with YV12 and YUY2. Previous | |
166 versions, including 4.1.0, <emphasis role="bold">crashes with YV12</emphasis>. | |
167 If you experience strange effects using -vo xv, try SDL (it has XVideo too) and | |
168 see if it helps. Check the <link linkend="sdl">SDL section</link> for details. | |
169 </para> | |
170 | |
171 <para> | |
172 <emphasis role="bold">OR</emphasis>, try the NEW | |
173 <option>-vo tdfxfb</option> driver! See the <link linkend="tdfxfb">tdfxfb</link> | |
174 section. | |
175 </para> | |
176 </sect5> | |
177 | |
178 | |
179 <sect5 id="s3"> | |
180 <title>S3 cards</title> | |
181 | |
182 <para> | |
183 S3 Savage3D's should work fine, but for Savage4, use XFree86 version 4.0.3 | |
184 or greater (in case of image problems, try 16bpp). As for S3 Virge: there is | |
185 xv support, but the card itself is very slow, so you better sell it. | |
186 </para> | |
187 | |
188 <note> | |
189 <para> | |
190 It's currently unclear which Savage models lack YV12 support, and convert by | |
191 driver (slow). If you suspect your card, get a newer driver, or ask politely | |
192 on the mplayer-users mailing list for an MMX/3DNow enabled driver. | |
193 </para> | |
194 </note> | |
195 </sect5> | |
196 | |
197 | |
198 <sect5 id="nvidia"> | |
199 <title>nVidia cards</title> | |
200 | |
201 <para> | |
202 nVidia isn't a very good choice under Linux (according to nVidia, this is | |
203 <link linkend="nvidia-opinions">not true</link>)... You'll have to use the | |
204 binary closed-source nVidia driver, available at nVidia's web site. The | |
205 standard XFree86 driver doesn't support XVideo for these cards, due to | |
206 nVidia's closed sources/specifications. | |
207 </para> | |
208 | |
209 <para> | |
210 As far as I know the latest XFree86 driver contains XVideo support for | |
211 GeForce 2 and 3. | |
212 </para> | |
213 | |
214 <para> | |
215 Riva128 cards don't have XVideo support even with the nVidia driver :( | |
216 Complain to nVidia. | |
217 </para> | |
218 </sect5> | |
219 | |
220 | |
221 <sect5 id="ati"> | |
222 <title>ATI cards</title> | |
223 | |
224 <para> | |
225 The <ulink url="http://www.linuxvideo.org/gatos">GATOS driver</ulink> | |
226 (which you should use, unless you have Rage128 or Radeon) has VSYNC enabled | |
227 by default. It means that decoding speed (!) is synced to the monitor's | |
228 refresh rate. If playing seems to be slow, try disabling VSYNC somehow, or | |
229 set refresh rate to a n*(fps of the movie) Hz. | |
230 </para> | |
231 | |
232 <para> | |
233 Radeon VE - currently only XFree86 CVS has driver for this card, version | |
234 4.1.0 doesn't. And no TV out support. Of course with | |
235 <application>MPlayer</application> you can | |
236 happily get <emphasis role="bold">accelerated</emphasis> display, with or without | |
237 <emphasis role="bold">TV output</emphasis>, and no libraries or X are needed. | |
238 Read the <link linkend="vidix">VIDIX</link> section. | |
239 </para> | |
240 </sect5> | |
241 | |
242 | |
243 <sect5 id="neomagic"> | |
244 <title>NeoMagic cards</title> | |
245 | |
246 <para> | |
10068 | 247 These cards can be found in many laptops. Unfortunately, the driver in |
248 XFree prior to 4.3.0 cannot do Xv, but Stefan Seyfried provided | |
249 <ulink url="http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/">Xv-capable drivers</ulink>. | |
250 Just choose the one that applies to your version of Xfree. | |
251 </para> | |
252 | |
253 <para> | |
254 XFree86 4.3.0 includes Xv support, yet Bohdan Horst sent a small | |
255 <ulink url="http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/neo_driver.patch">patch</ulink> | |
10076 | 256 against the XFree86 sources that speeds up framebuffer operations up to four |
257 times. The patch has been included in XFree86 CVS and should be in the next | |
258 release after 4.3.0. | |
9675 | 259 </para> |
260 | |
261 <para> | |
262 To allow playback of DVD sized content change your XF86Config like this: | |
263 <programlisting> | |
264 Section "Device" | |
265 [...] | |
266 Driver "neomagic" | |
267 <emphasis>Option "OverlayMem" "829440"</emphasis> | |
268 [...] | |
269 EndSection<!-- | |
270 --></programlisting> | |
271 </para> | |
272 </sect5> | |
273 | |
274 | |
275 <sect5 id="trident"> | |
276 <title>Trident cards</title> | |
277 <para> | |
278 If you want to use xv with a trident card, provided that it doesn't work | |
279 with 4.1.0, install XFree 4.2.0. 4.2.0 adds support for fullscreen xv | |
280 support with the Cyberblade XP card. | |
281 </para> | |
282 </sect5> | |
283 | |
284 | |
285 <sect5 id="kyro"> | |
286 <title>Kyro/PowerVR cards</title> | |
287 <para> | |
288 If you want to use Xv with a Kyro based card (for example Hercules | |
289 Prophet 4000XT), you should download the drivers from the | |
290 <ulink url="http://www.powervr.com/">PowerVR site</ulink> | |
291 </para> | |
292 </sect5> | |
293 </sect4> | |
294 | |
295 <!-- ********** --> | |
296 | |
297 <sect4 id="dga"> | |
298 <title>DGA</title> | |
299 | |
300 <formalpara> | |
301 <title>PREAMBLE</title> | |
302 <para> | |
303 This document tries to explain in some words what DGA is in general and | |
304 what the DGA video output driver for <application>MPlayer</application> | |
305 can do (and what it can't). | |
306 </para> | |
307 </formalpara> | |
308 | |
309 <formalpara> | |
310 <title>WHAT IS DGA</title> | |
311 <para> | |
312 <acronym>DGA</acronym> is short for <emphasis>Direct Graphics | |
313 Access</emphasis> and is a means for a program to bypass the X server and | |
314 directly modifying the framebuffer memory. Technically spoken this happens | |
315 by mapping the framebuffer memory into the memory range of your process. | |
316 This is allowed by the kernel only if you have superuser privileges. You | |
317 can get these either by logging in as <systemitem | |
318 class="username">root</systemitem> or by setting the SUID bit on the | |
319 <application>MPlayer</application> executable (<emphasis role="bold">not | |
320 recommended</emphasis>). | |
321 </para> | |
322 </formalpara> | |
323 <para> | |
324 There are two versions of DGA: DGA1 is used by XFree 3.x.x and DGA2 was | |
325 introduced with XFree 4.0.1. | |
326 </para> | |
327 | |
328 <para> | |
329 DGA1 provides only direct framebuffer access as described above. For | |
330 switching the resolution of the video signal you have to rely on the | |
331 XVidMode extension. | |
332 </para> | |
333 | |
334 <para> | |
335 DGA2 incorporates the features of XVidMode extension and also allows | |
336 switching the depth of the display. So you may, although basically | |
337 running a 32 bit depth X server, switch to a depth of 15 bits and vice | |
338 versa. | |
339 </para> | |
340 | |
341 <para> | |
342 However DGA has some drawbacks. It seems it is somewhat dependent on the | |
343 graphics chip you use and on the implementation of the X server's video | |
344 driver that controls this chip. So it does not work on every system... | |
345 </para> | |
346 | |
347 <formalpara> | |
348 <title>INSTALLING DGA SUPPORT FOR MPLAYER</title> | |
349 | |
350 <para> | |
351 First make sure X loads the DGA extension, see in | |
352 <filename>/var/log/XFree86.0.log</filename>: | |
353 | |
354 <programlisting>(II) Loading extension XFree86-DGA</programlisting> | |
355 | |
356 See, XFree86 4.0.x or greater is VERY RECOMMENDED! | |
357 <application>MPlayer</application>'s DGA driver is autodetected by | |
358 <filename>./configure</filename>, or you can force it | |
359 with <option>--enable-dga</option>. | |
360 </para> | |
361 </formalpara> | |
362 | |
363 <para> | |
364 If the driver couldn't switch to a smaller resolution, experiment with | |
365 options <option>-vm</option> (only with X 3.3.x), <option>-fs</option>, | |
366 <option>-bpp</option>, <option>-zoom</option> to find a video mode that | |
367 the movie fits in. There is no converter right now :( | |
368 </para> | |
369 | |
370 <para> | |
371 Become <systemitem class="username">root</systemitem>. DGA needs root | |
372 access to be able to write directly video memory. If you want to run it as | |
373 user, then install <application>MPlayer</application> SUID root: | |
374 | |
375 <screen> | |
376 chown root /usr/local/bin/mplayer | |
377 chmod 750 /usr/local/bin/mplayer | |
378 chmod +s /usr/local/bin/mplayer | |
379 </screen> | |
380 | |
381 Now it works as a simple user, too. | |
382 </para> | |
383 | |
384 <caution> | |
385 <title>Security risk</title> | |
386 <para> | |
387 This is a <emphasis role="bold">big</emphasis> security risk! Never do this | |
388 on a server or on a computer can be accessed by other people because they | |
389 can gain root privileges through SUID root | |
390 <application>MPlayer</application>. | |
391 </para> | |
392 </caution> | |
393 | |
394 <para> | |
395 Now use <option>-vo dga</option> option, and there you go! (hope so:) You | |
396 should also try if the <option>-vo sdl:dga</option> option works for you! | |
397 It's much faster! | |
398 </para> | |
399 | |
400 | |
401 <formalpara id="dga-modelines"> | |
402 <title>RESOLUTION SWITCHING</title> | |
403 | |
404 <para> | |
405 The DGA driver allows for switching the resolution of the output signal. | |
406 This avoids the need for doing (slow) software scaling and at the same time | |
407 provides a fullscreen image. Ideally it would switch to the exact | |
408 resolution (except for honoring aspect ratio) of the video data, but the X | |
409 server only allows switching to resolutions predefined in | |
410 <filename>/etc/X11/XF86Config</filename> | |
411 (<filename>/etc/X11/XF86Config-4</filename> for XFree 4.X.X respectively). | |
412 Those are defined by so-called modelines and depend on | |
413 the capabilities of your video hardware. The X server scans this config | |
414 file on startup and disables the modelines not suitable for your hardware. | |
415 You can find out which modes survive with the X11 log file. It can be found | |
416 at: <filename>/var/log/XFree86.0.log</filename>. | |
417 </para> | |
418 </formalpara> | |
419 | |
420 <para> | |
421 These entries are known to work fine with a Riva128 chip, using the nv.o X | |
422 server driver module. | |
423 </para> | |
424 | |
425 | |
426 <para><programlisting> | |
427 Section "Modes" | |
428 Identifier "Modes[0]" | |
429 Modeline "800x600" 40 800 840 968 1056 600 601 605 628 | |
430 Modeline "712x600" 35.0 712 740 850 900 400 410 412 425 | |
431 Modeline "640x480" 25.175 640 664 760 800 480 491 493 525 | |
432 Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan | |
433 Modeline "352x288" 25.10 352 368 416 432 288 296 290 310 | |
434 Modeline "352x240" 15.750 352 368 416 432 240 244 246 262 Doublescan | |
435 Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan | |
436 EndSection | |
437 </programlisting></para> | |
438 | |
439 | |
440 <formalpara> | |
441 <title>DGA & MPLAYER</title> | |
442 <para> | |
443 DGA is used in two places with <application>MPlayer</application>: The SDL | |
444 driver can be made to make use of it (<option>-vo sdl:dga</option>) and | |
445 within the DGA driver (<option>-vo dga</option>). The above said is true | |
446 for both; in the following sections I'll explain how the DGA driver for | |
447 <application>MPlayer</application> works. | |
448 </para> | |
449 </formalpara> | |
450 | |
451 | |
452 <formalpara> | |
453 <title>FEATURES</title> | |
454 | |
455 <para> | |
456 The DGA driver is invoked by specifying <option>-vo dga</option> at the | |
457 command line. The default behavior is to switch to a resolution matching | |
458 the original resolution of the video as close as possible. It deliberately | |
459 ignores the <option>-vm</option> and <option>-fs</option> options | |
460 (enabling of video mode switching and fullscreen) - it always tries to | |
461 cover as much area of your screen as possible by switching the video mode, | |
462 thus refraining to use a single additional cycle of your CPU to scale the | |
463 image. If you don't like the mode it chooses you may force it to choose | |
464 the mode matching closest the resolution you specify by <option>-x</option> | |
465 and <option>-y</option>. By providing the <option>-v</option> option, the | |
466 DGA driver will print, among a lot of other things, a list of all | |
467 resolutions supported by your current <filename>XF86Config</filename> file. | |
468 Having DGA2 you may also force it to use a certain depth by using the | |
469 <option>-bpp</option> option. Valid depths are 15, 16, 24 and 32. It | |
470 depends on your hardware whether these depths are natively supported or if | |
471 a (possibly slow) conversion has to be done. | |
472 </para> | |
473 </formalpara> | |
474 <para> | |
475 If you should be lucky enough to have enough offscreen memory left to | |
476 put a whole image there, the DGA driver will use doublebuffering, which | |
477 results in much smoother movie replaying. It will tell you whether | |
478 double-buffering is enabled or not. | |
479 </para> | |
480 | |
481 <para> | |
482 Doublebuffering means that the next frame of your video is being drawn in | |
483 some offscreen memory while the current frame is being displayed. When the | |
484 next frame is ready, the graphics chip is just told the location in memory | |
485 of the new frame and simply fetches the data to be displayed from there. | |
486 In the meantime the other buffer in memory will be filled again with new | |
487 video data. | |
488 </para> | |
489 | |
490 <para> | |
491 Doublebuffering may be switched on by using the option | |
492 <option>-double</option> and may be disabled with | |
493 <option>-nodouble</option>. Current default option is to disable | |
494 doublebuffering. When using the DGA driver, onscreen display (OSD) only | |
495 works with doublebuffering enabled. However, enabling doublebuffering may | |
496 result in a big speed penalty (on my K6-II+ 525 it used an additional 20% | |
497 of CPU time!) depending on the implementation of DGA for your hardware. | |
498 </para> | |
499 | |
500 | |
501 <formalpara> | |
502 <title>SPEED ISSUES</title> | |
503 | |
504 <para> | |
505 Generally spoken, DGA framebuffer access should be at least as fast as | |
506 using the X11 driver with the additional benefit of getting a fullscreen | |
507 image. The percentage speed values printed by | |
508 <application>MPlayer</application> have to be interpreted with some care, | |
509 as for example, with the X11 driver they do not include the time used by | |
510 the X server needed for the actual drawing. Hook a terminal to a serial | |
511 line of your box and start <command>top</command> to see what is really | |
512 going on in your box. | |
513 </para> | |
514 </formalpara> | |
515 | |
516 <para> | |
517 Generally spoken, the speedup done by using DGA against 'normal' use of X11 | |
518 highly depends on your graphics card and how well the X server module for it | |
519 is optimized. | |
520 </para> | |
521 | |
522 <para> | |
523 If you have a slow system, better use 15 or 16 bit depth since they require | |
524 only half the memory bandwidth of a 32 bit display. | |
525 </para> | |
526 | |
527 <para> | |
528 Using a depth of 24 bit is even a good idea if your card natively just supports | |
529 32 bit depth since it transfers 25% less data compared to the 32/32 mode. | |
530 </para> | |
531 | |
532 <para> | |
533 I've seen some AVI files already be replayed on a Pentium MMX 266. AMD K6-2 | |
534 CPUs might work at 400 MHZ and above. | |
535 </para> | |
536 | |
537 | |
538 <formalpara> | |
539 <title>KNOWN BUGS</title> | |
540 | |
541 <para> | |
542 Well, according to some developers of XFree, DGA is quite a beast. They | |
543 tell you better not to use it. Its implementation is not always flawless | |
544 with every chipset driver for XFree out there. | |
545 </para> | |
546 </formalpara> | |
547 | |
548 <itemizedlist> | |
549 <listitem><simpara> | |
550 With XFree 4.0.3 and <filename>nv.o</filename> there is a bug resulting | |
551 in strange colors. | |
552 </simpara></listitem> | |
553 <listitem><simpara> | |
554 ATI driver requires to switch mode back more than once after finishing | |
555 using of DGA. | |
556 </simpara></listitem> | |
557 <listitem><simpara> | |
558 Some drivers simply fail to switch back to normal resolution (use | |
559 <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>Keypad +</keycap> and | |
560 <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>Keypad -</keycap> | |
561 to switch back manually). | |
562 </simpara></listitem> | |
563 <listitem><simpara> | |
564 Some drivers simply display strange colors. | |
565 </simpara></listitem> | |
566 <listitem><simpara> | |
567 Some drivers lie about the amount of memory they map into the process's | |
568 address space, thus vo_dga won't use doublebuffering (SIS?). | |
569 </simpara></listitem> | |
570 <listitem><simpara> | |
571 Some drivers seem to fail to report even a single valid mode. In this | |
572 case the DGA driver will crash telling you about a nonsense mode of | |
573 100000x100000 or something like that. | |
574 </simpara></listitem> | |
575 <listitem><simpara> | |
576 OSD only works with doublebuffering enabled (else it flickers). | |
577 </simpara></listitem> | |
578 </itemizedlist> | |
579 | |
580 </sect4> | |
581 <!--</sect3>--> | |
582 | |
583 <!-- ********** --> | |
584 | |
585 <sect4 id="sdl"> | |
586 <title>SDL</title> | |
587 | |
588 <para> | |
589 SDL (Simple Directmedia Layer) is basically a unified | |
590 video/audio interface. Programs that use it know only about SDL, and not | |
591 about what video or audio driver does SDL actually use. For example a Doom | |
592 port using SDL can run on svgalib, aalib, X, fbdev, and others, you only | |
593 have to specify the (for example) video driver to use with the | |
594 <envar>SDL_VIDEODRIVER</envar> environment variable. Well, in theory. | |
595 </para> | |
596 | |
597 <para> | |
598 With <application>MPlayer</application>, we used its X11 driver's software | |
599 scaler ability for cards/drivers that doesn't support XVideo, until we made | |
600 our own (faster, nicer) software scaler. Also we used its aalib output, but | |
601 now we have ours which is more comfortable. Its DGA mode was better than | |
602 ours, until recently. Get it now? :) | |
603 </para> | |
604 | |
605 <para> | |
606 It also helps with some buggy drivers/cards if the video is jerky (not slow | |
607 system problem), or audio is lagging. | |
608 </para> | |
609 | |
610 <para> | |
611 SDL video output supports displaying subtitles under the movie, on the (if | |
612 present) black bar. | |
613 </para> | |
614 | |
615 <variablelist> | |
616 <title>There are several command line switches for SDL:</title> | |
617 <varlistentry> | |
618 <term><option>-vo sdl:<replaceable>name</replaceable></option></term> | |
619 <listitem><simpara> | |
620 specifies SDL video driver to use (i.e. <literal>aalib</literal>, | |
621 <literal>dga</literal>, <literal>x11</literal>) | |
622 </simpara></listitem> | |
623 </varlistentry> | |
624 <varlistentry> | |
625 <term><option>-ao sdl:<replaceable>name</replaceable></option></term> | |
626 <listitem><simpara> | |
627 specifies SDL audio driver to use (i.e. <literal>dsp</literal>, | |
628 <literal>esd</literal>, <literal>arts</literal>) | |
629 </simpara></listitem> | |
630 </varlistentry> | |
631 <varlistentry> | |
632 <term><option>-noxv</option></term> | |
633 <listitem><simpara> | |
634 disables XVideo hardware acceleration | |
635 </simpara></listitem> | |
636 </varlistentry> | |
637 <varlistentry> | |
638 <term><option>-forcexv</option></term> | |
639 <listitem><simpara> | |
640 tries to force XVideo acceleration | |
641 </simpara></listitem> | |
642 </varlistentry> | |
643 </variablelist> | |
644 | |
645 <table> | |
646 <title>SDL keys</title> | |
647 <tgroup cols="2"> | |
648 <thead> | |
649 <row><entry>Key</entry><entry>Action</entry></row> | |
650 </thead> | |
651 <tbody> | |
652 <row><entry><keycap>F</keycap></entry><entry> | |
653 toggles fullscreen/windowed mode | |
654 </entry></row> | |
655 <row><entry><keycap>C</keycap></entry><entry> | |
656 cycles available fullscreen modes | |
657 </entry></row> | |
658 <row><entry><keycap>W</keycap>/<keycap>S</keycap></entry><entry> | |
659 mappings for <keycap>*</keycap> and <keycap>/</keycap> (mixer control) | |
660 </entry></row> | |
661 </tbody> | |
662 </tgroup> | |
663 </table> | |
664 | |
665 <itemizedlist> | |
666 <title>Known bugs:</title> | |
667 <listitem><simpara> | |
668 Keys pressed under sdl:aalib console driver repeat forever. (use | |
669 <option>-vo aa</option>!) It's bug in SDL, I can't change it (tested with | |
670 SDL 1.2.1). | |
671 </simpara></listitem> | |
672 <listitem><simpara> | |
673 DO NOT USE SDL with GUI! It won't work as it should. | |
674 </simpara></listitem> | |
675 </itemizedlist> | |
676 </sect4> | |
677 | |
678 | |
679 <sect4 id="svgalib"> | |
680 <title>SVGAlib</title> | |
681 | |
682 <formalpara> | |
683 <title>INSTALLATION</title> | |
684 <para> | |
685 You'll have to install svgalib and its development package in order for | |
686 <application>MPlayer</application> build its SVGAlib driver (autodetected, | |
687 but can be forced), and don't forget to edit | |
688 <filename>/etc/vga/libvga.config</filename> to suit your card and monitor. | |
689 </para> | |
690 </formalpara> | |
691 | |
692 <note> | |
693 <para> | |
694 Be sure not to use the <option>-fs</option> switch, since it toggles the | |
695 usage of the software scaler, and it's slow. If you really need it, use the | |
696 <option>-sws 4</option> option which will produce bad quality, but is | |
697 somewhat faster. | |
698 </para> | |
699 </note> | |
700 | |
701 <formalpara><title>EGA (4BPP) SUPPORT</title> | |
702 <para> | |
703 SVGAlib incorporates EGAlib, and <application>MPlayer</application> has the | |
704 possibility to display any movie in 16 colors, thus usable in the following | |
705 sets: | |
706 </para> | |
707 </formalpara> | |
708 | |
709 <itemizedlist> | |
710 <listitem><simpara> | |
711 EGA card with EGA monitor: 320x200x4bpp, 640x200x4bpp, 640x350x4bpp | |
712 </simpara></listitem> | |
713 <listitem><simpara> | |
714 EGA card with CGA monitor: 320x200x4bpp, 640x200x4bpp | |
715 </simpara></listitem> | |
716 </itemizedlist> | |
717 | |
718 <para> | |
719 The bpp (bits per pixel) value must be set to 4 by hand: | |
720 <option>-bpp 4</option> | |
721 </para> | |
722 | |
723 <para> | |
724 The movie probably must be scaled down to fit in EGA mode: | |
9677 | 725 <screen>-vf scale=640:350</screen> |
9675 | 726 or |
9677 | 727 <screen>-vf scale=320:200</screen> |
9675 | 728 </para> |
729 | |
730 <para> | |
731 For that we need fast but bad quality scaling routine: | |
732 <screen>-sws 4</screen> | |
733 </para> | |
734 | |
735 <para> | |
736 Maybe automatic aspect correction has to be shut off: | |
737 <screen>-noaspect</screen> | |
738 </para> | |
739 | |
740 <note><para> | |
9683 | 741 According to my experience the best image quality on |
9675 | 742 EGA screens can be achieved by decreasing the brightness a bit: |
9677 | 743 <option>-vf eq=-20:0</option>. I also needed to lower the audio |
9675 | 744 samplerate on my box, because the sound was broken on 44kHz: |
745 <option>-srate 22050</option>. | |
746 </para></note> | |
747 | |
748 <para> | |
9683 | 749 You can turn on OSD and subtitles only with the <systemitem>expand</systemitem> |
9675 | 750 filter, see the man page for exact parameters. |
751 </para> | |
752 </sect4> | |
753 | |
754 | |
755 <sect4 id="fbdev"> | |
756 <title>Framebuffer output (FBdev)</title> | |
757 | |
758 <para> | |
759 Whether to build the FBdev target is autodetected during | |
760 <filename>./configure</filename>. Read the framebuffer documentation in | |
761 the kernel sources (<filename>Documentation/fb/*</filename>) for more | |
762 information. | |
763 </para> | |
764 | |
765 <para> | |
766 If your card doesn't support VBE 2.0 standard (older ISA/PCI cards, such as | |
767 S3 Trio64), only VBE 1.2 (or older?): Well, VESAfb is still available, but | |
768 you'll have to load SciTech Display Doctor (formerly UniVBE) before booting | |
769 Linux. Use a DOS boot disk or whatever. And don't forget to register your | |
770 UniVBE ;)) | |
771 </para> | |
772 | |
773 <para> | |
774 The FBdev output takes some additional parameters above the others: | |
775 </para> | |
776 | |
777 <variablelist> | |
778 <varlistentry> | |
779 <term><option>-fb</option></term> | |
780 <listitem><simpara> | |
781 specify the framebuffer device to use (<filename>/dev/fb0</filename>) | |
782 </simpara></listitem> | |
783 </varlistentry> | |
784 <varlistentry> | |
785 <term><option>-fbmode</option></term> | |
786 <listitem><simpara> | |
787 mode name to use (according to <filename>/etc/fb.modes</filename>) | |
788 </simpara></listitem> | |
789 </varlistentry> | |
790 <varlistentry> | |
791 <term><option>-fbmodeconfig</option></term> | |
792 <listitem><simpara> | |
793 config file of modes (default <filename>/etc/fb.modes</filename>) | |
794 </simpara></listitem> | |
795 </varlistentry> | |
796 <varlistentry> | |
797 <term><option>-monitor_hfreq</option></term> | |
798 <term><option>-monitor_vfreq</option></term> | |
799 <term><option>-monitor_dotclock</option></term> | |
800 <listitem><simpara> | |
801 <emphasis role="bold">important</emphasis> values, see | |
802 <filename>example.conf</filename> | |
803 </simpara></listitem> | |
804 </varlistentry> | |
805 </variablelist> | |
806 | |
807 <para> | |
808 If you want to change to a specific mode, then use | |
809 <screen>mplayer -vm -fbmode <replaceable>name_of_mode</replaceable> <replaceable>filename</replaceable></screen> | |
810 </para> | |
811 | |
812 <itemizedlist> | |
813 <listitem><para> | |
814 <option>-vm</option> alone will choose the most suitable mode from | |
815 <filename>/etc/fb.modes</filename>. Can be used together with | |
816 <option>-x</option> and <option>-y</option> options too. The | |
817 <option>-flip</option> option is supported only if the movie's pixel | |
818 format matches the video mode's pixel format. Pay attention to the bpp | |
819 value, fbdev driver tries to use the current, or if you specify the | |
820 <option>-bpp</option> option, then that. | |
821 </para></listitem> | |
822 <listitem><para> | |
823 <option>-zoom</option> option isn't supported (software scaling is slow). | |
824 <option>-fs</option> option isn't supported. You can't use 8 bpp (or less) | |
825 modes. | |
826 </para></listitem> | |
827 <listitem><para> | |
828 You possibly want to turn the cursor off: | |
829 <screen>echo -e '\033[?25l'</screen> | |
830 or | |
831 <screen>setterm -cursor off</screen> | |
832 and the screen saver: | |
833 <screen>setterm -blank 0</screen> | |
834 To turn the cursor back on: | |
835 <screen>echo -e '\033[?25h'</screen> | |
836 or | |
837 <screen>setterm -cursor on</screen> | |
838 </para></listitem> | |
839 </itemizedlist> | |
840 | |
841 <note> | |
842 <para> | |
843 FBdev video mode changing <emphasis>does not work</emphasis> with the VESA | |
844 framebuffer, and don't ask for it, since it's not an | |
845 <application>MPlayer</application> limitation. | |
846 </para> | |
847 </note> | |
848 </sect4> | |
849 | |
850 | |
851 <sect4 id="mga_vid"> | |
852 <title>Matrox framebuffer (mga_vid)</title> | |
853 | |
854 <para> | |
855 This section is about the Matrox G200/G400/G450/G550 BES (Back-End Scaler) | |
856 support, the mga_vid kernel driver. It's actively developed by A'rpi, and | |
857 it has hardware VSYNC support with triple buffering. It works on both | |
858 framebuffer console and under X. | |
859 </para> | |
860 | |
861 <warning> | |
862 <para> | |
863 This is Linux only! On non-Linux (tested on FreeBSD) systems, you can use | |
864 <link linkend="vidix">VIDIX</link> instead! | |
865 </para> | |
866 </warning> | |
867 | |
868 <procedure> | |
869 <title>Installation:</title> | |
870 <step><para> | |
871 To use it, you first have to compile <filename>mga_vid.o</filename>: | |
872 <screen> | |
873 cd drivers | |
874 make<!-- | |
875 --></screen> | |
876 </para></step> | |
877 <step><para> | |
878 Then create <filename>/dev/mga_vid</filename> device: | |
879 <screen>mknod /dev/mga_vid c 178 0</screen> | |
880 and load the driver with | |
881 <screen>insmod mga_vid.o</screen> | |
882 </para></step> | |
883 <step><para> | |
884 You should verify the memory size detection using the | |
885 <command>dmesg</command> command. If it's bad, use the | |
886 <option>mga_ram_size</option> option | |
887 (<command>rmmod mga_vid</command> first), | |
888 specify card's memory size in MB: | |
889 <screen>insmod mga_vid.o mga_ram_size=16</screen> | |
890 </para></step> | |
891 <step><para> | |
892 To make it load/unload automatically when needed, first insert the | |
893 following line at the end of <filename>/etc/modules.conf</filename>: | |
894 | |
895 <programlisting>alias char-major-178 mga_vid</programlisting> | |
896 | |
897 Then copy the <filename>mga_vid.o</filename> module to the appropriate | |
898 place under <filename>/lib/modules/<replaceable>kernel | |
899 version</replaceable>/<replaceable>somewhere</replaceable></filename>. | |
900 </para><para> | |
901 Then run | |
902 <screen>depmod -a</screen> | |
903 </para></step> | |
904 <step><para> | |
905 Now you have to (re)compile <application>MPlayer</application>, | |
906 <filename>./configure</filename> will detect | |
907 <filename>/dev/mga_vid</filename> and build the 'mga' driver. Using it | |
908 from <application>MPlayer</application> goes by <option>-vo mga</option> | |
909 if you have matroxfb console, or <option>-vo xmga</option> under XFree86 | |
910 3.x.x or 4.x.x. | |
911 </para></step> | |
912 </procedure> | |
913 | |
914 <para> | |
915 The mga_vid driver cooperates with Xv. | |
916 </para> | |
917 | |
918 <para> | |
919 The <filename>/dev/mga_vid</filename> device file can be read for some | |
920 info, for example by | |
921 <screen>cat /dev/mga_vid</screen> | |
922 and can be written for brightness change: | |
923 <screen>echo "brightness=120" > /dev/mga_vid</screen> | |
924 </para> | |
925 </sect4> | |
926 | |
927 | |
928 <sect4 id="tdfxfb" xreflabel="3Dfx YUV support (tdfxfb)"> | |
929 <title>3Dfx YUV support</title> | |
930 <para> | |
931 This driver uses the kernel's tdfx framebuffer driver to play movies with | |
932 YUV acceleration. You'll need a kernel with tdfxfb support, and recompile | |
933 with | |
934 <screen>./configure --enable-tdfxfb</screen> | |
935 </para> | |
936 </sect4> | |
937 | |
938 | |
939 <sect4 id="opengl"> | |
940 <title>OpenGL output</title> | |
941 | |
942 <para> | |
943 <application>MPlayer</application> supports displaying movies using OpenGL, | |
944 but if your platform/driver supports xv as should be the case on a PC with | |
945 Linux, use xv instead, OpenGL performance is considerably worse. If you | |
946 have an X11 implementation without xv support, OpenGL is a viable | |
947 alternative. | |
948 </para> | |
949 | |
950 <para> | |
951 Unfortunately not all drivers support this feature. The Utah-GLX drivers | |
952 (for XFree86 3.3.6) support it for all cards. | |
953 See <ulink url="http://utah-glx.sourceforge.net"/> for details about how to | |
954 install it. | |
955 </para> | |
956 | |
957 <para> | |
958 XFree86(DRI) 4.0.3 or later supports OpenGL with Matrox and Radeon cards, | |
959 4.2.0 or later supports Rage128. | |
960 See <ulink url="http://dri.sourceforge.net"/> for download and installation | |
961 instructions. | |
962 </para> | |
963 </sect4> | |
964 | |
965 | |
966 <sect4 id="aalib"> | |
967 <title>AAlib - text mode displaying</title> | |
968 | |
969 <para> | |
970 AAlib is a library for displaying graphics in text mode, using powerful | |
971 ASCII renderer. There are <emphasis>lots</emphasis> of programs already | |
972 supporting it, like Doom, Quake, etc. <application>MPlayer</application> | |
973 contains a very usable driver for it. If <filename>./configure</filename> | |
974 detects aalib installed, the aalib libvo driver will be built. | |
975 </para> | |
976 | |
977 <para> | |
978 You can use some keys in the AA Window to change rendering options: | |
979 </para> | |
980 | |
981 <informaltable> | |
982 <tgroup cols="2"> | |
983 <thead> | |
984 <row><entry>Key</entry><entry>Action</entry></row> | |
985 </thead> | |
986 <tbody> | |
987 <row><entry><keycap>1</keycap></entry><entry> | |
988 decrease contrast | |
989 </entry></row> | |
990 <row><entry><keycap>2</keycap></entry><entry> | |
991 increase contrast | |
992 </entry></row> | |
993 <row><entry><keycap>3</keycap></entry><entry> | |
994 decrease brightness | |
995 </entry></row> | |
996 <row><entry><keycap>4</keycap></entry><entry> | |
997 increase brightness | |
998 </entry></row> | |
999 <row><entry><keycap>5</keycap></entry><entry> | |
1000 switch fast rendering on/off | |
1001 </entry></row> | |
1002 <row><entry><keycap>6</keycap></entry><entry> | |
1003 set dithering mode (none, error distribution, Floyd Steinberg) | |
1004 </entry></row> | |
1005 <row><entry><keycap>7</keycap></entry><entry> | |
1006 invert image | |
1007 </entry></row> | |
1008 <row><entry><keycap>8</keycap></entry><entry> | |
1009 toggles between aa and <application>MPlayer</application> control | |
1010 </entry></row> | |
1011 </tbody> | |
1012 </tgroup> | |
1013 </informaltable> | |
1014 | |
1015 <variablelist> | |
1016 <title>The following command line options can be used:</title> | |
1017 <varlistentry> | |
1018 <term><option>-aaosdcolor=<replaceable>V</replaceable></option></term> | |
1019 <listitem><para> | |
1020 change OSD color | |
1021 </para></listitem> | |
1022 </varlistentry> | |
1023 <varlistentry> | |
1024 <term><option>-aasubcolor=<replaceable>V</replaceable></option></term> | |
1025 <listitem><para> | |
1026 change subtitle color | |
1027 </para><para> | |
1028 where <replaceable>V</replaceable> can be: | |
1029 <literal>0</literal> (normal), | |
1030 <literal>1</literal> (dark), | |
1031 <literal>2</literal> (bold), | |
1032 <literal>3</literal> (bold font), | |
1033 <literal>4</literal> (reverse), | |
1034 <literal>5</literal> (special). | |
1035 </para></listitem> | |
1036 </varlistentry> | |
1037 </variablelist> | |
1038 | |
1039 <variablelist> | |
1040 <title>AAlib itself provides a large sum of options. Here are some | |
1041 important:</title> | |
1042 <varlistentry> | |
1043 <term><option>-aadriver</option></term> | |
1044 <listitem><simpara> | |
1045 set recommended aa driver (X11, curses, Linux) | |
1046 </simpara></listitem> | |
1047 </varlistentry> | |
1048 <varlistentry> | |
1049 <term><option>-aaextended</option></term> | |
1050 <listitem><simpara> | |
1051 use all 256 characters | |
1052 </simpara></listitem> | |
1053 </varlistentry> | |
1054 <varlistentry> | |
1055 <term><option>-aaeight</option></term> | |
1056 <listitem><simpara> | |
1057 use eight bit ASCII | |
1058 </simpara></listitem> | |
1059 </varlistentry> | |
1060 <varlistentry> | |
1061 <term><option>-aahelp</option></term> | |
1062 <listitem><simpara> | |
1063 prints out all aalib options | |
1064 </simpara></listitem> | |
1065 </varlistentry> | |
1066 </variablelist> | |
1067 | |
1068 <note> | |
1069 <para> | |
1070 The rendering is very CPU intensive, especially when using AA-on-X | |
1071 (using aalib on X), and it's least CPU intensive on standard, | |
1072 non-framebuffer console. Use SVGATextMode to set up a big textmode, | |
1073 then enjoy! (secondary head Hercules cards rock :)) (but imho you | |
9677 | 1074 can use -vf 1bpp option to get graphics on hgafb:) |
9675 | 1075 </para> |
1076 </note> | |
1077 | |
1078 <para> | |
1079 Use the <option>-framedrop</option> option if your computer isn't fast | |
1080 enough to render all frames! | |
1081 </para> | |
1082 | |
1083 <para> | |
1084 Playing on terminal you'll get better speed and quality using the Linux | |
1085 driver, not curses (<option>-aadriver linux</option>). But therefore you | |
1086 need write access on | |
1087 <filename>/dev/vcsa<replaceable><terminal></replaceable></filename>! | |
1088 That isn't autodetected by aalib, but vo_aa tries to find the best mode. | |
1089 See <ulink url="http://aa-project.sourceforge.net/tune"/> for further | |
1090 tuning issues. | |
1091 </para> | |
1092 </sect4> | |
1093 | |
1094 | |
1095 <sect4 id="vesa"> | |
1096 <title>VESA - output to VESA BIOS</title> | |
1097 | |
1098 <para> | |
1099 This driver was designed and introduced as a <emphasis role="bold">generic | |
1100 driver</emphasis> for any video card which has VESA VBE 2.0 compatible | |
1101 BIOS. Another advantage of this driver is that it tries to force TV output | |
1102 on. | |
1103 <citetitle>VESA BIOS EXTENSION (VBE) Version 3.0 Date: September 16, | |
1104 1998</citetitle> (Page 70) says: | |
1105 </para> | |
1106 | |
1107 <blockquote> | |
1108 <formalpara><title>Dual-Controller Designs</title> | |
1109 <para> | |
1110 VBE 3.0 supports the dual-controller design by assuming that since both | |
1111 controllers are typically provided by the same OEM, under control of a | |
1112 single BIOS ROM on the same graphics card, it is possible to hide the fact | |
1113 that two controllers are indeed present from the application. This has the | |
1114 limitation of preventing simultaneous use of the independent controllers, | |
1115 but allows applications released before VBE 3.0 to operate normally. The | |
1116 VBE Function 00h (Return Controller Information) returns the combined | |
1117 information of both controllers, including the combined list of available | |
1118 modes. When the application selects a mode, the appropriate controller is | |
1119 activated. Each of the remaining VBE functions then operates on the active | |
1120 controller. | |
1121 </para> | |
1122 </formalpara> | |
1123 </blockquote> | |
1124 | |
1125 <para> | |
1126 So you have chances to get working TV-out by using this driver. | |
1127 (I guess that TV-out frequently is standalone head or standalone output | |
1128 at least.) | |
1129 </para> | |
1130 | |
1131 <itemizedlist spacing="compact"> | |
1132 <title>ADVANTAGES</title> | |
1133 <listitem><simpara> | |
1134 You have chances to watch movies <emphasis role="bold">if Linux even doesn't | |
1135 know</emphasis> your video hardware. | |
1136 </simpara></listitem> | |
1137 <listitem><simpara> | |
1138 You don't need to have installed any graphics' related things on your | |
1139 Linux (like X11 (aka XFree86), fbdev and so on). This driver can be run | |
1140 from <emphasis role="bold">text-mode</emphasis>. | |
1141 </simpara></listitem> | |
1142 <listitem><simpara> | |
1143 You have chances to get <emphasis role="bold">working TV-out</emphasis>. | |
1144 (It's known at least for ATI's cards). | |
1145 </simpara></listitem> | |
1146 <listitem><simpara> | |
1147 This driver calls <function>int 10h</function> handler thus it's not | |
1148 an emulator - it calls <emphasis role="bold">real</emphasis> things of | |
1149 <emphasis>real</emphasis> BIOS in <emphasis>real-mode</emphasis>. | |
1150 (Finely - in vm86 mode). | |
1151 </simpara></listitem> | |
1152 <listitem><simpara> | |
1153 You can use VIDIX with it, thus getting accelerated video display | |
1154 <emphasis role="bold">and</emphasis> TV output at the same time! | |
1155 (Recommended for ATI cards.) | |
1156 </simpara></listitem> | |
1157 </itemizedlist> | |
1158 | |
1159 <itemizedlist spacing="compact"> | |
1160 <title>DISADVANTAGES</title> | |
1161 <listitem><simpara> | |
1162 It works only on <emphasis role="bold">x86 systems</emphasis>. | |
1163 </simpara></listitem> | |
1164 <listitem><simpara> | |
1165 It can be used only by <systemitem class="username">root</systemitem>. | |
1166 </simpara></listitem> | |
1167 <listitem><simpara> | |
1168 Currently it's available only for <emphasis role="bold">Linux</emphasis>. | |
1169 </simpara></listitem> | |
1170 </itemizedlist> | |
1171 | |
1172 <important> | |
1173 <para> | |
1174 Don't use this driver with <emphasis role="bold">GCC 2.96</emphasis>! | |
1175 It won't work! | |
1176 </para> | |
1177 </important> | |
1178 | |
1179 <variablelist> | |
1180 <title>COMMAND LINE OPTIONS AVAILABLE FOR VESA</title> | |
1181 <varlistentry> | |
1182 <term><option>-vo vesa:<replaceable>opts</replaceable></option></term> | |
1183 <listitem><simpara> | |
1184 currently recognized: <literal>dga</literal> to force dga mode and | |
1185 <literal>nodga</literal> to disable dga mode. In dga mode you can enable | |
1186 double buffering via the -double option. Note: you may omit these parameters | |
1187 to enable <emphasis role="bold">autodetection</emphasis> of dga mode. | |
1188 </simpara></listitem> | |
1189 </varlistentry> | |
1190 </variablelist> | |
1191 | |
1192 <itemizedlist spacing="compact"> | |
1193 <title>KNOWN PROBLEMS AND WORKAROUNDS</title> | |
1194 <listitem><simpara> | |
1195 If you have installed <emphasis role="bold">NLS</emphasis> font on your | |
1196 Linux box and run VESA driver from text-mode then after terminating | |
1197 <application>MPlayer</application> you will have | |
1198 <emphasis role="bold">ROM font</emphasis> loaded instead of national. | |
1199 You can load national font again by using <command>setsysfont</command> | |
1200 utility from the Mandrake distribution for exemple. | |
1201 (<emphasis role="bold">Hint</emphasis>: The same utility is used for | |
1202 localization of fbdev). | |
1203 </simpara></listitem> | |
1204 <listitem><simpara> | |
1205 Some <emphasis role="bold">Linux graphics drivers</emphasis> don't update | |
1206 active <emphasis role="bold">BIOS mode</emphasis> in DOS memory. | |
1207 So if you have such problem - always use VESA driver only from | |
1208 <emphasis role="bold">text-mode</emphasis>. Otherwise text-mode (#03) will | |
1209 be activated anyway and you will need restart your computer. | |
1210 </simpara></listitem> | |
1211 <listitem><simpara> | |
1212 Often after terminating VESA driver you get black screen. To return your | |
1213 screen to original state - simply switch to other console (by pressing | |
1214 <keycap>Alt</keycap>+<keycap>F<x></keycap>) | |
1215 then switch to your previous console by the same way. | |
1216 </simpara></listitem> | |
1217 <listitem><simpara> | |
1218 To get <emphasis role="bold">working TV-out</emphasis> you need have plugged | |
1219 TV-connector in before booting your PC since video BIOS initializes | |
1220 itself only once during POST procedure. | |
1221 </simpara></listitem> | |
1222 </itemizedlist> | |
1223 </sect4> | |
1224 | |
1225 | |
1226 <sect4 id="x11"> | |
1227 <title>X11</title> | |
1228 | |
1229 <para> | |
1230 Avoid if possible. Outputs to X11 (uses shared memory extension), with no | |
1231 hardware acceleration at all. Supports (MMX/3DNow/SSE accelerated, but | |
1232 still slow) software scaling, use the options <option>-fs -zoom</option>. | |
1233 Most cards have hardware scaling support, use the <option>-vo xv</option> | |
1234 output for them, or <option>-vo xmga</option> for Matroxes. | |
1235 </para> | |
1236 | |
1237 <para> | |
1238 The problem is that most cards' driver doesn't support hardware | |
1239 acceleration on the second head/TV. In those cases, you see green/blue | |
1240 colored window instead of the movie. This is where this driver comes in | |
1241 handy, but you need powerful CPU to use software scaling. Don't use the SDL | |
1242 driver's software output+scaler, it has worse image quality! | |
1243 </para> | |
1244 | |
1245 <para> | |
1246 Software scaling is very slow, you better try changing video modes instead. | |
1247 It's very simple. See the <link linkend="dga-modelines">DGA section's | |
1248 modelines</link>, and insert them into your <filename>XF86Config</filename>. | |
1249 | |
1250 <itemizedlist spacing="compact"> | |
1251 <listitem><simpara> | |
1252 If you have XFree86 4.x.x: use the <option>-vm</option> option. It will | |
1253 change to a resolution your movie fits in. If it doesn't: | |
1254 </simpara></listitem> | |
1255 <listitem><simpara> | |
1256 With XFree86 3.x.x: you have to cycle through available resolutions | |
1257 with the | |
1258 <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>plus</keycap> | |
1259 and | |
1260 <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>minus</keycap> | |
1261 keys. | |
1262 </simpara></listitem> | |
1263 </itemizedlist> | |
1264 </para> | |
1265 | |
1266 <para> | |
1267 If you can't find the modes you inserted, browse XFree86's output. Some | |
1268 drivers can't use low pixelclocks that are needed for low resolution | |
1269 video modes. | |
1270 </para> | |
1271 </sect4> | |
1272 | |
1273 | |
1274 <sect4 id="vidix"> | |
1275 <title>VIDIX</title> | |
1276 | |
1277 <formalpara> | |
1278 <title>PREAMBLE</title> | |
1279 <para> | |
1280 VIDIX is the abbreviation for <emphasis role="bold">VID</emphasis>eo | |
1281 <emphasis role="bold">I</emphasis>nterface for *ni<emphasis role="bold">X</emphasis>. | |
1282 VIDIX was designed and introduced as an interface for fast user-space drivers | |
1283 providing such video performance as mga_vid does for Matrox cards. It's also very | |
1284 portable. | |
1285 </para> | |
1286 </formalpara> | |
1287 <para> | |
1288 This interface was designed as an attempt to fit existing video | |
1289 acceleration interfaces (known as mga_vid, rage128_vid, radeon_vid, | |
1290 pm3_vid) into a fixed scheme. It provides highlevel interface to chips | |
1291 which are known as BES (BackEnd scalers) or OV (Video Overlays). It doesn't | |
1292 provide lowlevel interface to things which are known as graphics servers. | |
1293 (I don't want to compete with X11 team in graphics mode switching). I.e. | |
1294 main goal of this interface is to maximize the speed of video playback. | |
1295 </para> | |
1296 | |
1297 <itemizedlist spacing="compact"> | |
1298 <title>USAGE</title> | |
1299 <listitem><simpara> | |
1300 You can use standalone video output driver: <option>-vo xvidix</option>. | |
1301 This driver was developed as X11's front end to VIDIX technology. It | |
1302 requires X server and can work only under X server.Note that, as it directly | |
1303 accesses the hardware and circumvents the X driver, pixmaps cached in the | |
1304 graphics card's memory may be corrupted. You can prevent this by limiting | |
1305 the amount of video memory used by X with the XF86Config option "VideoRam" | |
1306 in the device section. You should set this to the amount of memory installed | |
1307 on your card minus 4MB. If you have less than 8MB of video ram, you can use | |
1308 the option "XaaNoPixmapCache" in the screen section instead. | |
1309 </simpara></listitem> | |
1310 <listitem><simpara> | |
1311 You can use VIDIX subdevice which was applied to several video output | |
1312 drivers, such as: <option>-vo vesa:vidix</option> | |
1313 (<emphasis role="bold">Linux only</emphasis>) and | |
1314 <option>-vo fbdev:vidix</option>. | |
1315 </simpara></listitem> | |
1316 </itemizedlist> | |
1317 | |
1318 <para> | |
1319 Indeed it doesn't matter which video output driver is used with | |
1320 <emphasis role="bold">VIDIX</emphasis>. | |
1321 </para> | |
1322 | |
1323 <itemizedlist spacing="compact"> | |
1324 <title>REQUIREMENTS</title> | |
1325 <listitem><simpara> | |
1326 Video card should be in graphics mode (I write <emphasis role="bold">should</emphasis> | |
1327 simply because I tested it in text mode - it works but has awful output ;) Use | |
1328 AAlib for that). | |
1329 <emphasis role="bold">Note</emphasis>: Everyone can try this trick by commenting out mode | |
1330 switching in vo_vesa driver. | |
1331 </simpara></listitem> | |
1332 <listitem><simpara> | |
1333 <application>MPlayer</application>'s video output driver should know | |
1334 active video mode and be able to tell to VIDIX subdevice some video | |
1335 characteristics of server. | |
1336 </simpara></listitem> | |
1337 </itemizedlist> | |
1338 | |
1339 <formalpara> | |
1340 <title>USAGE METHODS</title> | |
1341 <para> | |
1342 When VIDIX is used as <emphasis>subdevice</emphasis> (<option>-vo | |
1343 vesa:vidix</option>) then video mode configuration is performed by video | |
1344 output device (<emphasis>vo_server</emphasis> in short). Therefore you can | |
1345 pass into command line of <application>MPlayer</application> the same keys | |
1346 as for vo_server. In addition it understands <option>-double</option> key | |
1347 as globally visible parameter. (I recommend using this key with VIDIX at | |
1348 least for ATI's card). As for <option>-vo xvidix</option> : currently it | |
1349 recognizes the following options: <option>-fs -zoom -x -y -double</option>. | |
1350 </para> | |
1351 </formalpara> | |
1352 <para> | |
1353 Also you can specify VIDIX's driver directly as third subargument in | |
1354 command line: | |
1355 | |
1356 <screen>mplayer -vo xvidix:mga_vid.so -fs -zoom -double file.avi</screen> | |
1357 or | |
1358 <screen>mplayer -vo vesa:vidix:radeon_vid.so -fs -zoom -double -bpp 32 file.avi</screen> | |
1359 | |
1360 But it's dangerous, and you shouldn't do that. In this case given driver | |
1361 will be forced and result is unpredictable (it may | |
1362 <emphasis role="bold">freeze</emphasis> your computer). You should do that | |
1363 ONLY if you are absolutely sure it will work, and | |
1364 <application>MPlayer</application> doesn't do it automatically. Please tell | |
1365 about it to the developers. The right way is to use VIDIX without arguments | |
1366 to enable driver autodetection. | |
1367 </para> | |
1368 | |
1369 <para> | |
1370 VIDIX is new technology and it's extremely possible that on your | |
1371 system it won't work. In this case only solution for you | |
1372 it's port it (mainly libdha). But there is hope that it will work on those | |
1373 systems where X11 does. | |
1374 </para> | |
1375 | |
1376 <para> | |
1377 Since VIDIX requires direct hardware access you can either run it as root | |
1378 or set the SUID bit on the <application>MPlayer</application> binary | |
1379 (<emphasis role="bold">Warning: This is a security risk!</emphasis> | |
1380 Alternatively, you can use a special kernel module, like this: | |
1381 </para> | |
1382 | |
1383 <procedure> | |
1384 <step><para> | |
1385 Download the <ulink url="http://www.arava.co.il/matan/svgalib/">development version</ulink> | |
1386 of svgalib (for example 1.9.17), <emphasis role="bold">OR</emphasis> | |
1387 download a version made by Alex especially for usage with <application>MPlayer</application> | |
1388 (it doesn't need the svgalib source to compile) from | |
1389 <ulink url="http://www.mplayerhq.hu/~alex/svgalib_helper-1.9.17-mplayer.tar.bz2">here</ulink>. | |
1390 </para></step> | |
1391 <step><para> | |
1392 Compile the module in the <filename class="directory">svgalib_helper</filename> | |
1393 directory if you've downloaded the source from the svgalib site) and insmod it. | |
1394 </para></step> | |
1395 <step><para> | |
1396 Move the <filename class="directory">svgalib_helper</filename> directory to | |
1397 <filename class="directory">mplayer/main/libdha/svgalib_helper</filename>. | |
1398 </para></step> | |
1399 <step><para> | |
1400 Required if you download the source from the svgalib site: Remove the comment before the | |
1401 CFLAGS line containing "svgalib_helper" string from the | |
1402 <filename class="directory">libdha/Makefile</filename>. | |
1403 </para></step> | |
1404 <step><para> | |
1405 Recompile and install libdha. | |
1406 </para></step> | |
1407 </procedure> | |
1408 | |
1409 <sect5 id="vidix-ati"> | |
1410 <title>ATI cards</title> | |
1411 <para> | |
1412 Currently most ATI cards are supported natively, from Mach64 to the | |
1413 newest Radeons. | |
1414 </para> | |
1415 | |
1416 <para> | |
1417 There are two compiled binaries: <filename>radeon_vid</filename> for Radeon and | |
1418 <filename>rage128_vid</filename> for Rage 128 cards. You may force one or let | |
1419 the VIDIX system autoprobe all available drivers. | |
1420 </para> | |
1421 </sect5> | |
1422 | |
1423 <sect5 id="vidix-mga"> | |
1424 <title>Matrox cards</title> | |
1425 <para> | |
1426 Matrox G200,G400,G450 and G550 have been reported to work. | |
1427 </para> | |
1428 | |
1429 <para> | |
1430 The driver supports video equalizers and should be nearly as fast as the | |
1431 <link linkend="mga_vid">Matrox framebuffer</link> | |
1432 </para> | |
1433 </sect5> | |
1434 | |
1435 <sect5 id="vidix-trident"> | |
1436 <title>Trident cards</title> | |
1437 <para> | |
1438 There is a driver available for the Trident Cyberblade/i1 chipset, which | |
1439 can be found on VIA Epia motherboards. | |
1440 </para> | |
1441 | |
1442 <para> | |
1443 The driver was written and is maintained by Alastair M. Robinson, who | |
1444 offers the very latest driver versions for download from his | |
1445 <ulink url="http://www.blackfiveservices.co.uk/EPIAVidix.shtml">homepage</ulink>. | |
1446 The drivers are added to MPlayer with only a short delay, so CVS should always | |
1447 be up to date. | |
1448 </para> | |
1449 </sect5> | |
1450 | |
1451 <sect5 id="vidix-3dlabs"> | |
1452 <title>3DLabs cards</title> | |
1453 <para> | |
1454 Although there is a driver for the 3DLabs GLINT R3 and Permedia3 chips, no one | |
1455 has tested it, so reports are welcome. | |
1456 </para> | |
1457 </sect5> | |
1458 </sect4> | |
1459 | |
1460 <sect4 id="directfb"> | |
1461 <title>DirectFB</title> | |
1462 <blockquote><para> | |
1463 "DirectFB is a graphics library which was designed with embedded systems | |
1464 in mind. It offers maximum hardware accelerated performance at a minimum | |
1465 of resource usage and overhead." - quoted from <ulink url="http://www.directfb.org"/> | |
1466 </para></blockquote> | |
1467 | |
1468 <para>I'll exclude DirectFB features from this section.</para> | |
1469 | |
1470 <para> | |
1471 Though MPlayer is not supported as a "video provider" in DirectFB, this | |
1472 output driver will enable video playback through DirectFB. It will - of course - | |
1473 be accelerated, on my Matrox G400 DirectFB's speed was the same as XVideo. | |
1474 </para> | |
1475 | |
1476 <para> | |
1477 Always try to use the newest version of DirectFB. You can use DirectFB options on | |
1478 the command line, using the <option>-dfbopts</option> option. Layer selection can | |
1479 be done by the subdevice method, e.g.: <option>-vo directfb:2</option> | |
1480 (layer -1 is default: autodetect) | |
1481 </para> | |
1482 </sect4> | |
1483 | |
1484 <sect4 id="dfbmga"> | |
1485 <title>DirectFB/Matrox (dfbmga)</title> | |
1486 <para> | |
1487 Please read the <link linkend="directfb">main DirectFB section</link> or general | |
1488 informations. | |
1489 </para> | |
1490 | |
1491 <para>This video output driver will enable CRTC2 (on the second head) on the | |
9683 | 1492 Matrox G400/G450/G550 card, displaying video <emphasis role="bold">independently</emphasis> |
9675 | 1493 of the first head. |
1494 </para> | |
1495 | |
1496 <para> | |
1497 Instructions on how to make it work can be found in the | |
1498 <ulink url="../../tech/directfb.txt">tech section</ulink> | |
1499 or directly on Ville Syrjala's | |
9677 | 1500 <ulink url="http://www.sci.fi/~syrjala/directfb/Matrox_TV-out_README.txt">home page</ulink>. |
9675 | 1501 </para> |
1502 | |
1503 <note><para> | |
1504 we haven't been able to make this work, but others did. Anyway, porting of | |
1505 the CRTC2 code to <emphasis role="bold">mga_vid</emphasis> is underway. | |
1506 </para></note> | |
1507 </sect4> | |
1508 </sect3> | |
1509 | |
1510 <sect3 id="mpeg_decoders"> | |
1511 <title>MPEG decoders</title> | |
1512 | |
1513 <sect4 id="dvb"> | |
1514 <title>DVB</title> | |
1515 <para> | |
1516 <application>MPlayer</application> supports cards with the Siemens DVB chipset | |
1517 from vendors like Siemens, Technotrend, Galaxis or Hauppauge. The latest DVB | |
1518 drivers are available from the <ulink url="http://www.linuxtv.org">Linux TV site</ulink>. | |
1519 If you want to do software transcoding you should have at least a 1GHz CPU. | |
1520 </para> | |
1521 | |
1522 <para> | |
1523 Configure should detect your DVB card. If it did not, force detection with | |
1524 </para> | |
1525 | |
1526 <para><screen>./configure --enable-dvb</screen></para> | |
1527 | |
1528 <para>If you have ost headers at a non-standard path, set the path with</para> | |
1529 | |
1530 <para><screen>./configure --with-extraincdir=<DVB source directory>/ost/include | |
1531 </screen></para> | |
1532 | |
1533 <para>Then compile and install as usual.</para> | |
1534 | |
1535 <formalpara> | |
1536 <title>USAGE</title> | |
1537 <para> | |
1538 Hardware decoding (playing standard MPEG1/2 files) can be done with this command: | |
1539 </para> | |
1540 </formalpara> | |
1541 <para><screen>mplayer -ao mpegpes -vo mpegpes file.mpg|vob</screen></para> | |
1542 | |
1543 <para> | |
1544 Software decoding or transcoding different formats to MPEG1 can be achieved using | |
1545 a command like this: | |
1546 </para> | |
1547 <para><screen> | |
1548 mplayer -ao mpegpes -vo mpegpes yourfile.ext | |
9677 | 1549 mplayer -ao mpegpes -vo mpegpes -vf expand yourfile.ext |
9675 | 1550 </screen></para> |
1551 | |
1552 <para> | |
1553 Note that DVB cards only support heights 288 and 576 for PAL or 240 and 480 for | |
1554 NTSC. You <emphasis role="bold">must</emphasis> escale for other heights by adding | |
1555 <option>scale=width:height</option> with the width and height you want to the | |
9677 | 1556 <option>-vf</option> option. DVB cards accept various widths, like 720, 704, |
9675 | 1557 640, 512, 480, 352 etc and do hardware scaling in horizontal direction, so you |
1558 do not need to scale horizontally in most cases. For a 512x384 (aspect 4:3) | |
1559 DivX try: | |
1560 </para> | |
1561 | |
9677 | 1562 <para><screen>mplayer -ao mpegpes -vo mpegpes -vf scale=512:576</screen></para> |
9675 | 1563 |
1564 <para>If you have a widescreen movie and you do not want to scale it to full height, | |
1565 you can use the <option>expand=w:h</option> filter to add black bands. To view a | |
1566 640x384 DivX, try: | |
1567 </para> | |
1568 | |
9677 | 1569 <para><screen>mplayer -ao mpegpes -vo mpegpes -vf expand=640:576 file.avi |
9675 | 1570 </screen></para> |
1571 | |
1572 <para>If your CPU is too slow for a full size 720x576 DivX, try downscaling:</para> | |
1573 | |
9677 | 1574 <para><screen>mplayer -ao mpegpes -vo mpegpes -vf scale=352:576 file.avi |
9675 | 1575 </screen></para> |
1576 | |
1577 <para>If speed does not improve, try vertical downscaling, too:</para> | |
1578 | |
9677 | 1579 <para><screen>mplayer -ao mpegpes -vo mpegpes -vf scale=352:288 file.avi |
9675 | 1580 </screen></para> |
1581 | |
1582 <para> | |
1583 For OSD and subtitles use the OSD feature of the expand filter. So, instead of | |
1584 <option>expand=w:h</option> or <option>expand=w:h:x:y</option>, use | |
1585 <option>expand=w:h:x:y:1</option> (the 5th parameter <option>:1</option> | |
1586 at the end will enable OSD rendering). You may want to move the image up a bit | |
1587 to get a bigger black zone for subtitles. You may also want to move subtitles up, | |
1588 if they are outside your TV screen, use the <option>-subpos <0-100></option> | |
1589 option to adjust this (<option>-subpos 80</option> is a good choice). | |
1590 </para> | |
1591 | |
1592 <para> | |
1593 In order to play non-25fps movies on a PAL TV or with a slow CPU, add the | |
1594 <option>-framedrop</option> option. | |
1595 </para> | |
1596 | |
1597 <para> | |
1598 To keep the aspect ratio of DivX files and get the optimal scaling | |
1599 parameters (hardware horizontal scaling and software vertical scaling | |
1600 while keeping the right aspect ratio), use the new dvbscale filter: | |
1601 </para> | |
1602 | |
1603 <para><screen> | |
9683 | 1604 for 3:4 TV: -vf dvbscale,scale=-1:0,expand=-1:576:-1:-1:1 |
1605 for 16:9 TV: -vf dvbscale=1024,scale=-1:0,expand=-1:576:-1:-1:1 | |
9675 | 1606 </screen></para> |
1607 | |
1608 <formalpara> | |
1609 <title>FUTURE</title> | |
1610 <para> | |
1611 If you have questions or want to hear feature announcements and take part in | |
1612 discussions on this subject, join our | |
1613 <ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-dvb">MPlayer-DVB</ulink> | |
1614 mailing list. Please remember that the list language is English. | |
1615 </para> | |
1616 </formalpara> | |
1617 | |
1618 <para> | |
1619 In the future you may expect the ability to display OSD and subtitles using | |
1620 the native OSD feature of DVB cards, as well as more fluent playback of | |
1621 non-25fps movies and realtime transcoding between MPEG2 and MPEG4 (partial | |
1622 decompression). | |
1623 </para> | |
1624 </sect4> | |
1625 | |
1626 <sect4 id="dxr2"> | |
1627 <title>DXR2</title> | |
1628 <para>MPlayer supports hardware accelerated playback with the Creative DXR2 card.</para> | |
1629 <para> | |
1630 First of all you will need properly installed DXR2 drivers. You can find | |
1631 the drivers and installation instructions at the | |
1632 <ulink url="http://dxr2.sourceforge.net/">DXR2 Resource Center</ulink> site. | |
1633 </para> | |
1634 | |
1635 <variablelist> | |
1636 <title>USAGE</title> | |
1637 <varlistentry> | |
1638 <term><option>-vo dxr2</option></term> | |
1639 <listitem><para>enable TV output</para></listitem> | |
1640 </varlistentry> | |
1641 | |
1642 <varlistentry> | |
1643 <term><option>-vo dxr2:x11</option> or <option>-vo dxr2:xv</option></term> | |
1644 <listitem><para>enable Overlay output in X11</para></listitem> | |
1645 </varlistentry> | |
1646 | |
1647 <varlistentry> | |
1648 <term><option>-dxr2 <option1:option2:...></option></term> | |
1649 <listitem><para>This option is used to control the DXR2 driver.</para></listitem> | |
1650 </varlistentry> | |
1651 </variablelist> | |
1652 | |
1653 <para> | |
1654 The overlay chipset used on the DXR2 is of pretty bad quality but the | |
1655 default settings should work for everybody. The OSD may be usable with the | |
1656 overlay (not on TV) by drawing it in the colorkey. With the default colorkey | |
1657 settings you may get variable results, usually you will see the colorkey | |
1658 around the characters or some other funny effect. But if you properly adjust | |
1659 the colorkey settings you should be able to get acceptable results. | |
1660 </para> | |
1661 | |
1662 <para>Please see the manpage for available options.</para> | |
1663 </sect4> | |
1664 | |
1665 <sect4 id="dxr3"> | |
1666 <title>DXR3/Hollywood+</title> | |
1667 <para> | |
1668 <application>MPlayer</application> supports hardware accelerated playback | |
1669 with the Creative DXR3 and Sigma Designs Hollywood Plus cards. These cards | |
1670 both use the em8300 MPEG decoder chip from Sigma Designs. | |
1671 </para> | |
1672 | |
1673 <para> | |
1674 First of all you will need properly installed DXR3/H+ drivers, version 0.12.0 | |
1675 or later. You can find the drivers and installation instructions at the | |
1676 <ulink url="http://dxr3.sourceforge.net/">DXR3 & Hollywood Plus for Linux</ulink> | |
1677 site. Configure should detect your card automatically, compilation should go | |
1678 without problems. | |
1679 </para> | |
1680 | |
1681 <!-- FIXME: find a more clear presentation --> | |
1682 <variablelist> | |
1683 <title>USAGE</title> | |
1684 <varlistentry> | |
1685 <term><option>-vo dxr3:prebuf:sync:norm=x:<device></option></term> | |
1686 <listitem><para> | |
1687 <option>overlay</option> activates the overlay instead of TVOut. It requires | |
1688 that you have a properly configured overlay setup to work right. The easiest | |
1689 way to configure the overlay is to first run autocal. Then run mplayer with | |
1690 dxr3 output and without overlay turned on, run dxr3view. In dxr3view you can | |
1691 tweak the overlay settings and see the effects in realtime, perhaps this feature | |
1692 will be supported by the MPlayer GUI in the future. When overlay is properly set | |
1693 up you will no longer need to use dxr3view.
 | |
1694 <option>prebuf</option> turns on prebuffering. Prebuffering is a feature of the | |
1695 em8300 chip that enables it to hold more than one frame of video at a time. This | |
1696 means that when you are running with prebuffering MPlayer will try to keep the | |
1697 video buffer filled with data at all times. If you are on a slow machine MPlayer | |
1698 will probably use close to, or precisely 100% of CPU. This is especially common | |
1699 if you play pure MPEG streams (like DVDs, SVCDs a.s.o.) since MPlayer will not | |
1700 have to reencode it to MPEG it will fill the buffer very fast. | |
1701 With prebuffering video playback is <emphasis role="bold">much</emphasis> | |
1702 less sensitive to other programs hogging the CPU, it will not drop frames unless | |
1703 applications hog the CPU for a long time. | |
1704 When running without prebuffering the em8300 is much more sensitive to CPU load, | |
1705 so it is highly suggested that you turn on MPlayer's <option>-framedrop</option> | |
1706 option to avoid further loss of sync. | |
1707 <option>sync</option> will turn on the new sync-engine. This is currently an | |
1708 experimental feature. With the sync feature turned on the em8300's internal clock | |
1709 will be monitored at all times, if it starts to deviate from MPlayer's clock it | |
1710 will be reset causing the em8300 to drop any frames that are lagging behind. | |
1711 <option>norm=x</option> will set the TV norm of the DXR3 card without the need | |
1712 for external tools like em8300setup. Valid norms are 5 = NTSC, 4 = PAL-60, | |
1713 3 = PAL. Special norms are 2 (auto-adjust using PAL/PAL-60) and 1 (auto-adjust | |
1714 using PAL/NTSC) because they decide which norm to use by looking at the frame | |
1715 rate of the movie. norm = 0 (default) does not change the current norm. | |
1716 <option><device></option> = device number to use if you have more than one em8300 | |
1717 card. | |
1718 Any of these options may be left out. | |
1719 <option>:prebuf:sync</option> seems to work great when playing DivX movies. People | |
1720 have reported problems using the prebuf option when playing MPEG1/2 files. You | |
1721 might want to try running without any options first, if you have sync problems, | |
1722 or DVD subtitle problems, give <option>:sync</option> a try. | |
1723 </para></listitem> | |
1724 </varlistentry> | |
1725 | |
1726 <varlistentry> | |
1727 <term><option>-ao oss:/dev/em8300_ma-<replaceable>X</replaceable></option></term> | |
1728 <listitem><para> | |
1729 For audio output, where <replaceable>X</replaceable> is the device number (0 if one card). | |
1730 </para></listitem> | |
1731 </varlistentry> | |
1732 | |
1733 <varlistentry> | |
1734 <term><option>-aop list=resample:fout=<replaceable>xxxxx</replaceable></option></term> | |
1735 <listitem><para> | |
1736 The em8300 cannot play back samplerates lower than 44100Hz. If the sample | |
1737 rate is below 44100Hz select either 44100Hz or 48000Hz depending on which | |
1738 one matches closest. I.e. if the movie uses 22050Hz use 44100Hz as | |
1739 44100 / 2 = 22050, if it is 24000Hz use 48000Hz as 48000 / 2 = 24000 and so on. | |
1740 This does not work with digital audio output (<option>-ac hwac3</option>). | |
1741 </para></listitem> | |
1742 </varlistentry> | |
1743 | |
1744 <varlistentry> | |
9677 | 1745 <term><option>-vf lavc/fame</option></term> |
9675 | 1746 <listitem><para> |
1747 To watch non-MPEG content on the em8300 (i.e. DivX or RealVideo) you have to | |
1748 specify an MPEG1 video filter such as libavcodec (lavc) or libfame (fame). At | |
1749 the moment lavc is both faster and gives better image quality, it is suggested | |
1750 that you use that unless you have problems with it. See the man page for further | |
9677 | 1751 info about <option>-vf lavc/fame</option>. |
9675 | 1752 Using lavc is highly recommended. Currently there is no way of setting the fps |
1753 of the em8300 which means that it is fixed to 29.97fps. Because of this it is | |
9677 | 1754 highly recommended that you use <option>-vf lavc=<quality>:25</option> |
9675 | 1755 especially if you are using prebuffering. Then why 25 and not 29.97? Well, the |
1756 thing is that when you use 29.97 the picture becomes a bit jumpy. The reason for | |
1757 this is unknown to us. If you set it to somewhere between 25 and 27 the picture | |
1758 becomes stable. For now all we can do is accept this for a fact. | |
1759 </para></listitem> | |
1760 </varlistentry> | |
1761 | |
1762 <varlistentry> | |
9677 | 1763 <term><option>-vf expand=-1:-1:-1:-1:1</option></term> |
9675 | 1764 <listitem><para> |
1765 Although the DXR3 driver can put some OSD onto the MPEG1/2/4 video, it has | |
1766 much lower quality than MPlayer's traditional OSD, and has several refresh | |
1767 problems as well. The command line above will firstly convert the input | |
1768 video to MPEG4 (this is mandatory, sorry), then apply an expand filter which | |
1769 won't expand anything (-1: default), but apply the normal OSD onto the picture | |
1770 (that's what the "1" at the end does). | |
1771 </para></listitem> | |
1772 </varlistentry> | |
1773 | |
1774 <varlistentry> | |
1775 <term><option>-ac hwac3</option></term> | |
1776 <listitem><para> | |
1777 The em8300 supports playing back AC3 audio (surround sound) through the | |
1778 digital audio output of the card. See the <option>-ao oss</option> option above, | |
1779 it must be used to specify the DXR3's output instead of a soundcard. | |
1780 </para></listitem> | |
1781 </varlistentry> | |
1782 </variablelist> | |
1783 </sect4> | |
1784 | |
1785 </sect3> | |
1786 | |
1787 <sect3 id="other"> | |
1788 <title>Other visualization hardware</title> | |
1789 | |
1790 <sect4 id="zr"> | |
1791 <title>Zr</title> | |
1792 | |
1793 <para> | |
1794 This is a display-driver (<option>-vo zr</option>) for a number of MJPEG | |
1795 capture/playback cards (tested for DC10+ and Buz, and it should work for the | |
1796 LML33, the DC10). The driver works by encoding the frame to JPEG and then | |
1797 sending it to the card. For the JPEG encoding <systemitem>libavcodec</systemitem> | |
1798 is used, and required. With the special <emphasis>cinerama</emphasis> mode, | |
1799 you can watch movies in true wide screen provided that you have two beamers | |
1800 and two MJPEG cards. Depending on resolution and quality settings, this driver | |
1801 may require a lot of CPU power, remember to specify <option>-framedrop</option> | |
1802 if your machine is too slow. Note: My AMD K6-2 350MHz is (with | |
1803 <option>-framedrop</option>) quite adequate for watching VCD sized material and | |
1804 downscaled movies. | |
1805 </para> | |
1806 | |
1807 <para> | |
1808 This driver talks to the kernel driver available at | |
1809 <ulink url="http://mjpeg.sourceforge.net"/>, so | |
1810 you must get it working first. The presence of an MJPEG card is autodetected by the | |
1811 <filename>configure</filename> script, if autodetection fails, force detection with | |
1812 <screen>./configure --enable-zr</screen> | |
1813 </para> | |
1814 <para> | |
1815 The output can be controlled by several options, a long description of the | |
1816 options can be found in the man page, a short list of options can be viewed | |
1817 by running | |
1818 <screen>mplayer -zrhelp</screen> | |
1819 </para> | |
1820 | |
1821 <para> | |
1822 Things like scaling and the OSD (on screen display) are not handled by | |
1823 this driver but can be done using the video filters. For example, suppose | |
1824 that you have a movie with a resolution of 512x272 and you want to view it | |
1825 fullscreen on your DC10+. There are three main possibilities, you may scale | |
1826 the movie to a width of 768, 384 or 192. For performance and quality reasons, | |
1827 I would choose to scale the movie to 384x204 using the fast bilinear software | |
1828 scaler. The commandline is | |
9677 | 1829 <screen>mplayer -vo zr -sws 0 -vf scale=384:204 movie.avi</screen> |
9675 | 1830 </para> |
1831 | |
1832 <para> | |
1833 Cropping can be done by the <systemitem>crop</systemitem> filter and by this | |
1834 driver itself. Suppose that a movie is too wide for display on your Buz and | |
1835 that you want to use <option>-zrcrop</option> to make the movie less wide, | |
9784
286ac03ce5c5
Typos, noticed by Roberto Togni <r_togni@libero.it>.
diego
parents:
9683
diff
changeset
|
1836 then you would issue the following command |
9675 | 1837 <screen>mplayer -vo zr -zrcrop 720x320+80+0 benhur.avi</screen> |
1838 </para> | |
1839 | |
1840 <para> | |
1841 if you want to use the <systemitem>crop</systemitem> filter, you would do | |
9677 | 1842 <screen>mplayer -vo zr -vf crop=720:320:80:0 benhur.avi</screen> |
9675 | 1843 </para> |
1844 | |
1845 <para> | |
1846 Extra occurances of <option>-zrcrop</option> invoke <emphasis>cinerama</emphasis> | |
1847 ode, i.e. you can distribute the movie over several TV's or beamers to create a | |
1848 larger screen. Suppose you have two beamers. The left one is connected to your | |
1849 Buz at <systemitem>/dev/video1</systemitem> and the right one is connected to | |
1850 your DC10+ at <systemitem>/dev/video0</systemitem>. The movie has a resolution | |
1851 of 704x288. Suppose also that you want the right beamer in black and white and | |
1852 that the right beamer should have jpeg frames at quality 10, then you would | |
1853 issue the following command | |
1854 <screen> | |
1855 mplayer -vo zr -zrdev /dev/video0 -zrcrop 352x288+352+0 -zrxdoff 0 -zrbw \ | |
1856 -zrcrop 352x288+0+0 -zrdev /dev/video1 -zrquality 10 movie.avi | |
1857 </screen> | |
1858 </para> | |
1859 | |
1860 <para> | |
1861 You see that the options appearing before the second <option>-zrcrop</option> | |
1862 only apply to the DC10+ and that the options after the second | |
1863 <option>-zrcrop</option> apply to the Buz. The maximum number of MJPEG cards | |
9784
286ac03ce5c5
Typos, noticed by Roberto Togni <r_togni@libero.it>.
diego
parents:
9683
diff
changeset
|
1864 participating in <emphasis>cinerama</emphasis> is four, so you can build a |
9675 | 1865 2x2 vidiwall. |
1866 </para> | |
1867 | |
1868 <para> | |
1869 inally an important remark: Do not start or stop XawTV on the playback device | |
1870 during playback, it will crash your computer. It is, however, fine to | |
1871 <emphasis role="bold">FIRST</emphasis> start XawTV, <emphasis role="bold">THEN</emphasis> | |
1872 start MPlayer, wait for MPlayer to finish and <emphasis role="bold">THEN</emphasis> | |
1873 stop XawTV. | |
1874 </para> | |
1875 </sect4> | |
1876 | |
1877 <sect4 id="blinkenlights"> | |
1878 <title>Blinkenlights</title> | |
1879 <para> | |
1880 This driver is capable of playback using the Blinkenlights UDP protocol. If you | |
1881 don't know what <ulink url="http://www.blinkenlights.de/">Blinkenlights</ulink> | |
1882 is, you don't need this driver. | |
1883 </para> | |
1884 </sect4> | |
1885 </sect3> | |
1886 | |
1887 <sect3 id="tvout"> | |
1888 <title>TV-out support</title> | |
1889 | |
1890 <sect4 id="tvout-mga-g400"> | |
1891 <title>Matrox G400 cards</title> | |
1892 | |
1893 <para> | |
1894 Under Linux you have two methods to get G400 TV out working: | |
1895 </para> | |
1896 | |
1897 <important> | |
1898 <para> | |
1899 for Matrox G450/G550 TV-out instructions, please see the next section! | |
1900 </para> | |
1901 </important> | |
1902 | |
1903 <variablelist> | |
1904 <varlistentry> | |
1905 <term>XFree86</term> | |
1906 <listitem><para> | |
1907 Using the driver and the HAL module, available from <ulink | |
1908 url="http://www.matrox.com">Matrox's site</ulink>. This will give you X | |
1909 on the TV. | |
1910 </para><para> | |
1911 <emphasis role="bold">This method doesn't give you accelerated playback</emphasis> | |
1912 as under Windows! The second head has only YUV framebuffer, the <emphasis>BES</emphasis> | |
1913 (Back End Scaler, the YUV scaler on G200/G400/G450/G550 cards) doesn't | |
1914 work on it! The windows driver somehow workarounds this, probably by | |
1915 using the 3D engine to zoom, and the YUV framebuffer to display the | |
1916 zoomed image. If you really want to use X, use the <option>-vo x11 -fs | |
1917 -zoom</option> options, but it will be <emphasis role="bold">SLOW</emphasis>, | |
1918 and has <emphasis role="bold">Macrovision</emphasis> copy protection enabled | |
1919 (you can "workaround" Macrovision using this | |
1920 <ulink url="http://avifile.sourceforge.net/mgamacro.pl">perl | |
1921 script</ulink>. | |
1922 </para></listitem> | |
1923 </varlistentry> | |
1924 <varlistentry> | |
1925 <term>Framebuffer</term> | |
1926 <listitem><para> | |
1927 Using the <emphasis role="bold">matroxfb modules</emphasis> in the 2.4 | |
1928 kernels. 2.2 kernels don't have the TVout feature in them, thus unusable | |
1929 for this. You have to enable ALL matroxfb-specific feature during compilation | |
1930 (except MultiHead), and compile them into <emphasis role="bold">modules!</emphasis> | |
1931 You'll also need I2C enabled. | |
1932 </para> | |
1933 | |
1934 <procedure> | |
1935 <step><para> | |
1936 Enter <filename class="directory">TVout/matroxset</filename> and type | |
1937 <command>make</command>. Install <filename class="directory">matroxset</filename> into | |
1938 somewhere in your <envar>PATH</envar>. | |
1939 </para></step> | |
1940 <step><para> | |
1941 If you don't have <command>fbset</command> installed, enter | |
1942 <filename class="directory">TVout/fbset</filename> and type <command>make</command>. | |
1943 Install <filename class="directory">fbset</filename> into somewhere in your | |
1944 <envar>PATH</envar>. | |
1945 </para></step> | |
1946 <step><para> | |
1947 Then enter into the <filename class="directory">TVout/</filename> directory | |
1948 in the <application>MPlayer</application> source, and execute | |
1949 <filename>./modules</filename> as root. Your text-mode console will | |
1950 enter into framebuffer mode (no way back!). | |
1951 </para></step> | |
1952 <step><para> | |
1953 Next, EDIT and run the <filename>./matroxtv</filename> script. This will | |
1954 present you to a very simple menu. Press <keycap>2</keycap> and | |
1955 <keycap>Enter</keycap>. Now you should have the same picture on your | |
1956 monitor, and TV. The 3rd option will turn on independent display, but | |
1957 then you <emphasis>can't use X!</emphasis> If the TV (PAL by default) | |
1958 picture has some weird stripes on it, the script wasn't able to set the | |
1959 resolution correctly (to 640x512 by default). Try other resolutions | |
1960 from the menu and/or experiment with fbset. | |
1961 </para></step> | |
1962 <step><para> | |
1963 Yoh. Next task is to make the cursor on tty1 (or whatever) to | |
1964 disappear, and turn off screen blanking. Execute the following | |
1965 commands: | |
1966 | |
1967 <screen> | |
1968 echo -e '\033[?25l' | |
1969 setterm -blank 0<!-- | |
1970 --></screen> | |
1971 or | |
1972 <screen> | |
1973 setterm -cursor off | |
1974 setterm -blank 0<!-- | |
1975 --></screen> | |
1976 | |
1977 You possibly want to put the above into a script, and also clear the | |
1978 screen. To turn the cursor back: | |
1979 <screen>echo -e '\033[?25h'</screen> or | |
1980 <screen>setterm -cursor on</screen> | |
1981 </para></step> | |
1982 <step><para> | |
1983 Yeah kewl. Start movie playing with | |
1984 <screen> | |
1985 mplayer -vo mga -fs -screenw 640 -screenh 512 <replaceable>filename</replaceable><!-- | |
1986 --></screen> | |
1987 | |
1988 (If you use X, now change to matroxfb with for example | |
1989 <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>F1</keycap>.) | |
1990 Change <literal>640</literal> and <literal>512</literal> if you set | |
1991 the resolution to other... | |
1992 </para></step> | |
1993 <step><para> | |
1994 <emphasis role="bold">Enjoy the ultra-fast ultra-featured Matrox TV | |
1995 output (better than Xv)!</emphasis> | |
1996 </para></step> | |
1997 </procedure> | |
1998 </listitem> | |
1999 </varlistentry> | |
2000 </variablelist> | |
2001 | |
2002 <formalpara> | |
2003 <title>Building a Matrox TV-out cable</title> | |
2004 <para> | |
2005 No one takes any responsibility, nor guarantee for any damage caused | |
2006 by this documentation. | |
2007 </para> | |
2008 </formalpara> | |
2009 | |
2010 <formalpara> | |
2011 <title>Cable for G400</title> | |
2012 <para> | |
2013 The CRTC2 connector's fourth pin is the composite video signal. The | |
2014 ground are the sixth, seventh and eighth pins. (info contributed | |
2015 from Balázs Rácz) | |
2016 </para> | |
2017 </formalpara> | |
2018 | |
2019 <formalpara> | |
2020 <title>Cable for G450</title> | |
2021 <para> | |
2022 The CRTC2 connector's first pin is the composite video signal. The | |
2023 ground are the fifth, sixth, seventh, and fifteenth (5, 6, 7, 15) | |
2024 pins. (info contributed from Balázs Kerekes) | |
2025 </para> | |
2026 </formalpara> | |
2027 </sect4> | |
2028 | |
2029 <sect4 id="tv-out_matrox_g450"> | |
2030 <title>Matrox G450/G550 cards</title> | |
2031 <para> | |
2032 TV output support for these cards has only been recently introduced, and is | |
2033 not yet in the mainstream kernel. Currently the <emphasis role="bold">mga_vid</emphasis> | |
2034 module can't be used AFAIK, because the G450/G550 driver works only in one | |
2035 configuration: the first CRTC chip (with much more features) on the first display | |
2036 (on monitor), and the second CRTC (no <emphasis role="bold">BES</emphasis> - for | |
2037 explanation on BES, please see the G400 section above) on TV. So you can only | |
2038 use <application>MPlayer</application>'s <emphasis>fbdev</emphasis> output driver | |
2039 at the present. | |
2040 </para> | |
2041 | |
2042 <para> | |
2043 The first CRTC can't be routed to the second head currently. The author of the | |
2044 kernel matroxfb driver - Petr Vandrovec - will maybe make support for this, by | |
2045 displaying the first CRTC's output onto both of the heads at once, as currently | |
2046 recommended for G400, see the section above. | |
2047 </para> | |
2048 | |
2049 <para> | |
2050 The necessary kernel patch and the detailed howto is downloadable from | |
9948 | 2051 <ulink url="http://www.bglug.ca/matrox_tvout/"/> |
9675 | 2052 </para> |
2053 </sect4> | |
2054 | |
2055 | |
2056 <sect4 id="tvout-ati"> | |
2057 <title>ATI cards</title> | |
2058 | |
2059 <formalpara> | |
2060 <title>PREAMBLE</title> | |
2061 <para> | |
2062 Currently ATI doesn't want to support any of its TV-out chips under Linux, | |
2063 because of their licensed Macrovision technology. | |
2064 </para> | |
2065 </formalpara> | |
2066 | |
2067 <itemizedlist> | |
2068 <title>ATI CARDS TV-OUT STATUS ON LINUX</title> | |
2069 <listitem><simpara> | |
2070 <emphasis role="bold">ATI Mach64</emphasis>: | |
2071 supported by <ulink url="http://gatos.sf.net">gatos</ulink>. | |
2072 </simpara></listitem> | |
2073 <listitem><simpara> | |
2074 <emphasis role="bold">ASIC Radeon VIVO</emphasis>: | |
2075 supported by <ulink url="http://gatos.sf.net">gatos</ulink>. | |
2076 </simpara></listitem> | |
2077 <listitem><simpara> | |
2078 <emphasis role="bold">Radeon</emphasis> and <emphasis role="bold">Rage128</emphasis>: | |
2079 supported by <application>MPlayer</application>! | |
2080 Check <link linkend="vesa">VESA driver</link> and | |
2081 <link linkend="vidix">VIDIX</link> sections. | |
2082 </simpara></listitem> | |
2083 <listitem><simpara> | |
2084 <emphasis role="bold">Rage Mobility P/M, Radeon, Rage 128, Mobility M3/M4</emphasis>: | |
2085 supported by <ulink url="http://www.stud.uni-hamburg.de/users/lennart/projects/atitvout/">atitvout</ulink>. | |
2086 </simpara></listitem> | |
2087 </itemizedlist> | |
2088 | |
2089 <para> | |
2090 On other cards, just use the <link linkend="vesa">VESA</link> driver, | |
2091 without VIDIX. Powerful CPU is needed, though. | |
2092 </para> | |
2093 | |
2094 <para> | |
2095 Only thing you need to do - <emphasis role="bold">Have the TV connector | |
2096 plugged in before booting your PC</emphasis> since video BIOS initializes | |
2097 itself only once during POST procedure. | |
2098 </para> | |
2099 </sect4> | |
2100 | |
2101 | |
2102 <sect4 id="tvout-voodoo"> | |
2103 <title>Voodoo 3</title> | |
2104 <para> | |
2105 Check <ulink url="http://www.iki.fi/too/tvout-voodoo3-3000-xfree">this URL</ulink>. | |
2106 </para> | |
2107 </sect4> | |
2108 | |
2109 <sect4 id="tvout-nvidia"> | |
2110 <title>Voodoo 3</title> | |
2111 <para> | |
2112 First, you MUST download the closed-source drivers from <ulink url="http://nvidia.com"/>. | |
2113 I will not describe the installation and configuration process because it does not cover | |
2114 the scope of this documentation. | |
2115 </para> | |
2116 | |
2117 <para> | |
2118 After XFree86, XVideo, and 3D acceleration is properly working, edit your | |
2119 card's Device section in the <filename>XF86Config</filename> file, according | |
2120 to the following example (adapt for your card/TV): | |
2121 | |
2122 <programlisting> | |
2123 Section "Device" | |
2124 Identifier "GeForce" | |
2125 VendorName "ASUS" | |
2126 BoardName "nVidia GeForce2/MX 400" | |
2127 Driver "nvidia" | |
2128 #Option "NvAGP" "1" | |
2129 Option "NoLogo" | |
2130 Option "CursorShadow" "on" | |
2131 | |
2132 Option "TwinView" | |
2133 Option "TwinViewOrientation" "Clone" | |
2134 Option "MetaModes" "1024x768,640x480" | |
2135 Option "ConnectedMonitor" "CRT, TV" | |
2136 Option "TVStandard" "PAL-B" | |
2137 Option "TVOutFormat" "Composite" | |
2138 | |
2139 EndSection | |
2140 </programlisting> | |
2141 </para> | |
2142 | |
2143 <para> | |
2144 Of course the important thing is the TwinView part. | |
2145 </para> | |
2146 </sect4> | |
2147 </sect3> | |
2148 </sect2> |