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