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