Mercurial > mplayer.hg
comparison DOCS/video.html @ 1612:1b011d6150c7
new, splitted, etc dox
author | gabucino |
---|---|
date | Tue, 21 Aug 2001 21:01:54 +0000 |
parents | |
children | 2eedc348e92a |
comparison
equal
deleted
inserted
replaced
1611:c15f0cd6d051 | 1612:1b011d6150c7 |
---|---|
1 <HTML> | |
2 | |
3 <BODY> | |
4 | |
5 <PRE> | |
6 | |
7 <A NAME=2.2.1>2.2.1. Video output devices | |
8 | |
9 General: | |
10 - x11: X11 with optional SHM extension | |
11 - xv: X11 using overlays with the Xvideo extension (hardware YUV & scaling) | |
12 - gl: OpenGL renderer, so far works only with : | |
13 - all cards with Utah-GLX | |
14 - Matrox cards with X/DRI >=4.0.3 | |
15 - Radeon with X/DRI CVS | |
16 - dga: X11 DGA extension | |
17 - fbdev:Output to general framebuffers | |
18 - svga: Output to SVGAlib | |
19 - sdl: 1.1.7 : supports software scaling | |
20 1.1.8 : supports Xvideo (hardware scaling/fullscreen) | |
21 1.2.0 : supports AAlib (-vo aa is very recommended, see below!) | |
22 - ggi: similar to SDL | |
23 - aa: textmode rendering with AAlib | |
24 | |
25 Card specific: | |
26 - mga: Matrox G200/G400 hardware YUV overlay via the mga_vid device | |
27 - xmga: Matrox G200/G400 overlay (mga_vid) in X11 window | |
28 (Xv emulation on X 3.3.x !) | |
29 - syncfb: Matrox G400 YUV support on framebuffer (obsoleted, use mga/xmga) | |
30 - 3dfx: Voodoo2/3 hardware YUV (/dev/3dfx) support (not yet tested, maybe | |
31 broken) | |
32 | |
33 Special: | |
34 - png: PNG files output (use -z switch to set compression) | |
35 - pgm: PGM files output (for testing purposes or ffmpeg encoding) | |
36 - md5: MD5sum output (for MPEG conformance tests) | |
37 - odivx:OpenDivX AVI File writer (use -br to set encoding bitrate) | |
38 - null: Null output (for speed tests/benchmarking) | |
39 | |
40 NOTE: check the following subsections for details and requirements! | |
41 | |
42 | |
43 <A NAME=2.2.1.1>2.2.1.1. MTRR | |
44 | |
45 It is VERY recommended to set MTRR registers up properly, because they can | |
46 give a big performance boost. First you have to find the base address. | |
47 You have 3 ways to find it: | |
48 | |
49 - from X11 startup messages, for example: | |
50 | |
51 (--) SVGA: PCI: Matrox MGA G400 AGP rev 4, Memory @ 0xd8000000, 0xd4000000 | |
52 (--) SVGA: Linear framebuffer at 0xD8000000 | |
53 | |
54 - from /proc/pci (use lspci -v command): | |
55 | |
56 01:00.0 VGA compatible controller: Matrox Graphics, Inc.: Unknown device 0525 | |
57 Memory at d8000000 (32-bit, prefetchable) | |
58 | |
59 - from mga_vid kernel driver messages (use dmesg): | |
60 | |
61 mga_mem_base = d8000000 | |
62 | |
63 Then let's find the memory size. This is very easy, just convert video ram | |
64 size to hexadecimal, or use this table: | |
65 | |
66 | |
67 1 MB 0x100000 | |
68 2 MB 0x200000 | |
69 4 MB 0x400000 | |
70 8 MB 0x800000 | |
71 16 MB 0x1000000 | |
72 32 MB 0x2000000 | |
73 | |
74 | |
75 You know base address and memory size, let's setup mtrr registers! | |
76 For example, for the Matrox card above (base=0xd8000000) with 32MB | |
77 ram (size=0x2000000) just execute: | |
78 | |
79 | |
80 echo "base=0xd8000000 size=0x2000000 type=write-combining" >| /proc/mtrr | |
81 | |
82 | |
83 Not all CPUs support MTRRs. For example older K6-2's [around 266Mhz, | |
84 stepping 0] doesn't support MTRR, but stepping 12's do ('cat /proc/cpuinfo' | |
85 to check it). | |
86 | |
87 | |
88 <A NAME=2.2.1.2>2.2.1.2. Xv | |
89 | |
90 Under XFree86 4.0.2 or newer, you can use your card's hardware YUV routines | |
91 using the XVideo extension. This is what the option '-vo xv' uses. | |
92 In order to make this work, be sure to check the following: | |
93 - You have to use XFree86 4.0.2 or newer (former versions don't have XVideo) | |
94 - Your card actually supports harware acceleration (modern cards do) | |
95 - X loads the XVideo extension, it's something like this: | |
96 | |
97 | |
98 (II) Loading extension XVideo | |
99 | |
100 | |
101 in /var/log/XFree86.0.log | |
102 | |
103 | |
104 NOTE : this loads only the XFree86's extension. In a good install, this is | |
105 always loaded, and doesn't mean that the _card's_ XVideo support is | |
106 loaded! | |
107 | |
108 - Your card has Xv support under Linux. To check, try 'xvinfo', it is the | |
109 part of the XFree86 distribution. It should display a long text, similar | |
110 to this: | |
111 | |
112 | |
113 X-Video Extension version 2.2 | |
114 screen #0 | |
115 Adaptor #0: "Savage Streams Engine" | |
116 number of ports: 1 | |
117 port base: 43 | |
118 operations supported: PutImage | |
119 supported visuals: | |
120 depth 16, visualID 0x22 | |
121 depth 16, visualID 0x23 | |
122 number of attributes: 5 | |
123 (...) | |
124 Number of image formats: 7 | |
125 id: 0x32595559 (YUY2) | |
126 guid: 59555932-0000-0010-8000-00aa00389b71 | |
127 bits per pixel: 16 | |
128 number of planes: 1 | |
129 type: YUV (packed) | |
130 id: 0x32315659 (YV12) | |
131 guid: 59563132-0000-0010-8000-00aa00389b71 | |
132 bits per pixel: 12 | |
133 number of planes: 3 | |
134 type: YUV (planar) | |
135 (...etc...) | |
136 | |
137 | |
138 It must support YUY2 packed, and YV12 planar pixel formats to be | |
139 usable with <B>MPlayer</B>. | |
140 | |
141 - And finally, check if <B>MPlayer</B> was compiled with 'xv' support. | |
142 ./configure prints this. | |
143 | |
144 | |
145 <A NAME=2.2.1.2.1>2.2.1.2.1. 3dfx cards | |
146 | |
147 Older 3dfx drivers were known to have problems with XVideo acceleration, | |
148 it didn't support either YUY2 or YV12, and so. Verify that you have | |
149 XFree86 version 4.1.0 or greater, it works ok. Alternatively, you can use | |
150 <A HREF="http://dri.sourceforge.net">DRI</A> cvs. | |
151 If you experience strange effects using -vo xv, try SDL (it has XVideo too) | |
152 and see if it helps. Check the <A HREF="#2.2.1.4">SDL section</A> for details. | |
153 | |
154 | |
155 <A NAME=2.2.1.2.2>2.2.1.2.2. S3 cards | |
156 | |
157 S3 Savage3D's should work fine, but for Savage4, use XFree86 version 4.0.3 | |
158 or greater. As for S3 Virge.. sell it. | |
159 | |
160 | |
161 <A NAME=2.2.1.2.3>2.2.1.2.3. nVidia cards | |
162 | |
163 nVidia isn't a very good choice under Linux.. You'll have to use the | |
164 binary nVidia driver, available at nVidia's website. The standard X | |
165 driver doesn't support XVideo for these cards, due to nVidia's closed | |
166 sources/specifications. | |
167 | |
168 - Riva128 cards don't have XVideo support even with the nvidia driver :( | |
169 Complain to NVidia. | |
170 | |
171 | |
172 <A NAME=2.2.1.2.4>2.2.1.2.4. ATI cards | |
173 | |
174 The GATOS driver has VSYNC enabled by default. It means that decoding speed | |
175 (!) is synced to the monitor's refresh rate. If playing seems to be slow, try | |
176 disabling VSYNC somehow, or set refresh rate to n*(fps of the movie) Hz. | |
177 | |
178 | |
179 <A NAME=2.2.1.3>2.2.1.3. DGA | |
180 | |
181 <A NAME=2.2.1.3.1>2.2.1.3.1. Summary | |
182 | |
183 This document tries to explain in some words what DGA is in general and | |
184 what the DGA video output driver for mplayer can do (and what it can't). | |
185 | |
186 | |
187 <A NAME=2.2.1.3.2>2.2.1.3.2. What is DGA | |
188 | |
189 DGA is short for Direct Graphics Access and is a means for a program to | |
190 bypass the X-Server and directly modifying the framebuffer memory. | |
191 Technically spoken this happens by mapping the framebuffer memory into | |
192 the memory range of your process. This is allowed by the kernel only | |
193 if you have superuser privileges. You can get these either by logging in | |
194 as root or by setting the suid bit on the mplayer excecutable (NOT | |
195 recommended!). | |
196 | |
197 There are two versions of DGA: DGA1 is used by XFree 3.x.x and DGA2 was | |
198 introduced with XFree 4.0.1. | |
199 | |
200 DGA1 provides only direct framebuffer access as described above. For | |
201 switching the resolution of the video signal you have to rely on the | |
202 XVidMode extension. | |
203 | |
204 DGA2 incorporates the features of XVidMode extension and also allows | |
205 switching the depth of the display. So you may, although basically | |
206 running a 32 bit depth XServer, switch to a depth of 15 bits and vice | |
207 versa. | |
208 | |
209 However DGA has some drawbacks. It seems it is somewhat dependent on the | |
210 graphics chip you use and on the implementation of the XServer's video | |
211 driver that controls this chip. So it does not work on every system ... | |
212 | |
213 | |
214 <A NAME=2.2.1.3.3>2.2.1.3.3. Installing DGA support for <B>MPlayer</B> | |
215 | |
216 First make sure X loads the DGA extension, see in /var/log/XFree86.0.log : | |
217 | |
218 | |
219 (II) Loading extension XFree86-DGA | |
220 | |
221 | |
222 See, XFree86 4.0.x or greater is VERY RECOMMENDED! | |
223 <B>MPlayer</B>'s DGA driver is autodetected on ./configure, or you can force it | |
224 with --enable-dga. | |
225 | |
226 If the driver couldn't switch to a smaller resolution, experiment with | |
227 switches -vm (only with X 3.3.x), -fs, -bpp, -zoom to find a video mode that | |
228 the movie fits in. There is no converter right now.. :( | |
229 | |
230 Become ROOT. DGA needs root access to be able to write directly video memory. | |
231 If you want to run it as user, then install <B>MPlayer</B> SUID root: | |
232 | |
233 | |
234 chown root /usr/local/bin/mplayer | |
235 chmod 750 /usr/local/bin/mplayer | |
236 chmod +s /usr/local/bin/mplayer | |
237 | |
238 | |
239 Now it works as a simple user, too. | |
240 | |
241 | |
242 !!!! BUT STAY TUNED !!!! | |
243 This is a BIG security risk! Never do this on a server or on a computer | |
244 can be accessed by more people than only you because they can gain root | |
245 privilegies through suid root mplayer. | |
246 !!!! SO YOU HAVE BEEN WARNED ... !!!! | |
247 | |
248 | |
249 Now use '-vo dga' option, and there you go! (hope so:) | |
250 You should also try if the '-vo sdl:dga' option works for you! It's much | |
251 faster!!! | |
252 | |
253 | |
254 <A NAME=2.2.1.3.4>2.2.1.3.4. Resolution switching | |
255 | |
256 The DGA driver allows for switching the resolution of the output signal. | |
257 This avoids the need for doing (slow) software scaling and at the same | |
258 time provides a fullscreen image. Ideally it would switch to the exact | |
259 resolution (except for honouring aspect ratio) of the video data, but the | |
260 XServer only allows switching to resolutions predefined in | |
261 /etc/X11/XF86Config (/etc/X11/XF86Config-4 for XFree 4.0.X respectively). | |
262 Those are defined by so-called modelines and depend on the capabilites | |
263 of your video hardware. The XServer scans this config file on startup and | |
264 disables the modelines not suitable for your hardware. You can find | |
265 out which modes survive with the X11 log file. It can be found at: | |
266 /var/log/XFree86.0.log | |
267 See appendix A for some sample modeline definitions. | |
268 | |
269 | |
270 <A NAME=2.2.1.3.5>2.2.1.3.5. DGA & <B>MPlayer</B> | |
271 | |
272 DGA is used in two places with <B>MPlayer</B>: The SDL driver can be made to make | |
273 use of it (-vo sdl:dga) and within the DGA driver (-vo dga). | |
274 The above said is true for both; in the following sections I'll explain | |
275 how the DGA driver for <B>MPlayer</B> works. | |
276 | |
277 | |
278 <A NAME=2.2.1.3.6>2.2.1.3.6. Features of the DGA driver | |
279 | |
280 The DGA driver is invoked by specifying -vo dga at the command line. | |
281 The default behaviour is to switch to a resolution matching the original | |
282 resolution of the video as close as possible. It deliberately ignores the | |
283 -vm and -fs switches (enabling of video mode switching and fullscreen) - | |
284 it always tries to cover as much area of your screen as possible by switching | |
285 the video mode, thus refraining to use a single additional cycle of your CPU | |
286 to scale the image. | |
287 If you don't like the mode it chooses you may force it to choose the mode | |
288 matching closest the resolution you specify by -x and -y. | |
289 By providing the -v option, the DGA driver will print, among a lot of other | |
290 things, a list of all resolutions supported by your current XF86-Config | |
291 file. | |
292 Having DGA2 you may also force it to use a certain depth by using the -bpp | |
293 option. Valid depths are 15, 16, 24 and 32. It depends on your hardware | |
294 whether these depths are natively supported or if a (possibly slow) | |
295 conversion has to be done. | |
296 | |
297 If you should be lucky enough to have enough offscreen memory left to | |
298 put a whole image there, the DGA driver will use doublebuffering, which | |
299 results in much smoother movie replaying. It will tell you whether double- | |
300 buffering is enabled or not. | |
301 | |
302 Doublebuffering means that the next frame of your video is being drawn in | |
303 some offscreen memory while the current frame is being displayed. When the | |
304 next frame is ready, the graphics chip is just told the location in memory | |
305 of the new frame and simply fetches the data to be displayed from there. | |
306 In the meantime the other buffer in memory will be filled again with new | |
307 video data. | |
308 | |
309 Doublebuffering may be switched on by using the option -double and may be | |
310 disabled with -nodouble. Current default option is to disable | |
311 doublebuffering. When using the DGA driver, onscreen display (OSD) only | |
312 works with doublebuffering enabled. However, enabling doublebuffering may | |
313 result in a big speed penalty (on my K6-II+ 525 it used an additional 20% of | |
314 CPU time!) depending on the implementation of DGA for your hardware. | |
315 | |
316 | |
317 <A NAME=2.2.1.3.7>2.2.1.3.7. Speed issues | |
318 | |
319 Generally spoken, DGA framebuffer access should be at least as fast as using | |
320 the X11 driver with the additional benefit of getting a fullscreen image. | |
321 The percentage speed values printed by mplayer have to be interpreted with | |
322 some care, as for example, with the X11 driver they do not include the time | |
323 used by the X-Server needed for the actual drawing. Hook a terminal to a | |
324 serial line of your box and start top to see what is really going on in your | |
325 box ... | |
326 | |
327 Generally spoken, the speedup done by using DGA against 'normal' use of X11 | |
328 highly depends on your graphics card and how well the X-Server module for it | |
329 is optimized. | |
330 | |
331 If you have a slow system, better use 15 or 16bit depth since they require | |
332 only half the memory bandwidth of a 32 bit display. | |
333 | |
334 Using a depth of 24bit is even a good idea if your card natively just supports | |
335 32 bit depth since it transfers 25% less data compared to the 32/32 mode. | |
336 | |
337 I've seen some avi files already be replayed on a Pentium MMX 266. AMD K6-2 | |
338 CPUs might work at 400 MHZ and above. | |
339 | |
340 | |
341 <A NAME=2.2.1.3.8>2.2.1.3.8. Known bugs | |
342 | |
343 Well, according to some developpers of XFree, DGA is quite a beast. They | |
344 tell you better not to use it. Its implementation is not always flawless | |
345 with every chipset driver for XFree out there. | |
346 | |
347 o with XFree 4.0.3 and nv.o there is a bug resulting in strange colors | |
348 o ATI driver requires to switch mode back more than once after finishing | |
349 using of DGA | |
350 o some drivers simply fail to switch back to normal resolution (use | |
351 Ctrl-Alt-Keypad +, - to switch back manually) | |
352 o some drivers simply display strange colors | |
353 o some drivers lie about the amount of memory they map into the process's | |
354 address space, thus vo_dga won't use doublebuffering (SIS?) | |
355 o some drivers seem to fail to report even a single valid mode. In this | |
356 case the DGA driver will crash telling you about a nonsense mode of | |
357 100000x100000 or the like ... | |
358 o OSD only works with doublebuffering enabled | |
359 | |
360 | |
361 <A NAME=2.2.1.3.9>2.2.1.3.9. Future work | |
362 | |
363 o use of the new X11 render interface for OSD | |
364 o where is my TODO list ???? :-((( | |
365 | |
366 | |
367 <A NAME=2.2.1.3.A>2.2.1.3.A. Some modelines | |
368 | |
369 Section "Modes" | |
370 Identifier "Modes[0]" | |
371 Modeline "800x600" 40 800 840 968 1056 600 601 605 628 | |
372 Modeline "712x600" 35.0 712 740 850 900 400 410 412 425 | |
373 Modeline "640x480" 25.175 640 664 760 800 480 491 493 525 | |
374 Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan | |
375 Modeline "352x288" 25.10 352 368 416 432 288 296 290 310 | |
376 Modeline "352x240" 15.750 352 368 416 432 240 244 246 262 Doublescan | |
377 Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan | |
378 EndSection | |
379 | |
380 | |
381 These entries work fine with my Riva128 chip, using nv.o XServer driver | |
382 module. | |
383 | |
384 | |
385 <A NAME=2.2.1.3.B>2.2.1.3.B. Bug Reports | |
386 | |
387 If you experience troubles with the DGA driver please feel free to file | |
388 a bug report to me (e-mail address below). Please start mplayer with the | |
389 -v option and include all lines in the bug report that start with vo_dga: | |
390 | |
391 Please do also include the version of X11 you are using, the graphics card | |
392 and your CPU type. The X11 driver module (defined in XF86-Config) might | |
393 also help. Thanks! | |
394 | |
395 | |
396 Acki (acki@acki-netz.de, www.acki-netz.de) | |
397 | |
398 | |
399 <A NAME=2.2.1.4>2.2.1.4. SDL | |
400 | |
401 Here are some notes about SDL out in <B>MPlayer</B>. | |
402 | |
403 There are several commandline switches for SDL: | |
404 | |
405 -vo sdl:name specifies sdl video driver to use (ie. aalib, | |
406 dga, x11) | |
407 -ao sdl:name specifies sdl audio driver to use (ie. dsp, | |
408 esd, arts) | |
409 -noxv disables Xvideo hardware acceleration | |
410 -forcexv tries to force Xvideo acceleration | |
411 | |
412 SDL Keys: | |
413 | |
414 F toggles fullscreen/windowed mode | |
415 C cycles available fullscreen modes | |
416 W/S mappings for * and / (mixer control) | |
417 | |
418 KNOWN BUGS: | |
419 - Keys pressed under sdl:aalib console driver repeat forever. (use -vo aa !) | |
420 It's bug in SDL, I can't change it (tested with SDL 1.2.1). | |
421 | |
422 | |
423 <A NAME=2.2.1.5>2.2.1.5. SVGAlib | |
424 | |
425 If you don't have X, you can use the SVGAlib target! Be sure not to use the | |
426 -fs switch, since it toggles the usage of the software scaler, and it's | |
427 SLOOOW now, unless you have a real fast CPU (and/or MTRR?). :( | |
428 | |
429 Of course you'll have to install svgalib and its development package in | |
430 order for <B>MPlayer</B> build its SVGAlib driver (autodetected, but can be | |
431 forced), and don't forget to edit /etc/vga/libvga.config to suit your | |
432 card & monitor. | |
433 | |
434 | |
435 <A NAME=2.2.1.6>2.2.1.6. Framebuffer output (FBdev) | |
436 | |
437 Whether to build the FBdev target is autodetected during ./configure . | |
438 Read the framebuffer documentation in the kernel sources | |
439 (Documentation/fb/*) for info on how to enable it, etc.. ! | |
440 | |
441 If your card doesn't support VBE 2.0 standard (older ISA/PCI | |
442 cards, such as S3 Trio64), only VBE 1.2 (or older?) : | |
443 Well, VESAfb is still available, but you'll have to load SciTech Display | |
444 Doctor (formerly UniVBE) before booting Linux. Use a DOS boot disk or | |
445 whatever. And don't forget to register your UniVBE ;)) | |
446 | |
447 The FBdev output takes some additional parameters above the others: | |
448 | |
449 -fb specify the framebuffer device to use (/dev/fd0) | |
450 -fbmode mode name to use (according to /etc/fb.modes) | |
451 -fbmodeconfig config file of modes (default /etc/fb.modes) | |
452 monitor_hfreq | |
453 monitor_vfreq IMPORTANT values, see example.conf | |
454 monitor_dotclock | |
455 | |
456 If you want to change to a specific mode, then use | |
457 | |
458 mplayer -vm -fbmode (NameOfMode) filename | |
459 | |
460 -vm alone will choose the most suitable mode from /etc/fb.modes . Can be | |
461 used together with -x and -y options too. The -flip option is supported only | |
462 if the movie's pixel format matches the video mode's pixel format. | |
463 Pay attention to the bpp value, fbdev driver tries to use the current, | |
464 or if you specify the -bpp option, then that. | |
465 -zoom option isn't supported (software scaling is slow). -fs option | |
466 isn't supported. You can't use 8bpp (or less) modes. | |
467 | |
468 NOTE: FBdev video mode changing _does not work_ with the VESA framebuffer, | |
469 and don't ask for it, since it's not an <B>MPlayer</B> limitation. | |
470 | |
471 | |
472 <A NAME=2.2.1.7>2.2.1.7. Matrox framebuffer (mga_vid) | |
473 | |
474 This section is about the Matrox G200/G400/G450 BES (Back-End Scaler) | |
475 support, the mga_vid kernel driver. It's active developed by me (A'rpi), and | |
476 it has hardware VSYNC support with triple buffering. It works on both | |
477 framebuffer console and under X. | |
478 | |
479 To use it, you first have to compile mga_vid.o : | |
480 | |
481 | |
482 cd drivers | |
483 make | |
484 | |
485 | |
486 Then create /dev/mga_vid device : | |
487 | |
488 | |
489 mknod /dev/mga_vid c 178 0 | |
490 | |
491 | |
492 and load the driver with | |
493 | |
494 | |
495 insmod mga_vid.o | |
496 | |
497 | |
498 You should verify the memory size detection using the 'dmesg' command. If | |
499 it's bad, use the mga_ram_size option (rmmod mga_vid first), specify card's | |
500 memory size in MB: | |
501 | |
502 | |
503 insmod mga_vid.o mga_ram_size=16 | |
504 | |
505 | |
506 To make it load/unload automatically when needed, insert the following line | |
507 at the end of /etc/modules.conf : | |
508 | |
509 | |
510 alias char-major-178 mga_vid | |
511 | |
512 | |
513 Then run | |
514 | |
515 | |
516 depmod -a | |
517 | |
518 | |
519 Now you have to (re)compile <B>MPlayer</B>, ./configure will detect /dev/mga_vid | |
520 and build the 'mga' driver. Using it from <B>MPlayer</B> goes by '-vo mga' if | |
521 you have matroxfb console, or '-vo xmga' under XFree86 3.x.x or 4.x.x . | |
522 | |
523 Note: '-vo xmga' works under XFree86 4.x.x, but it conflicts with the Xv | |
524 driver, so avoid using both. If you messed up Xv with mga, try running | |
525 <B>MPlayer</B> with '-vo mga' . It should fix Xv. | |
526 | |
527 | |
528 <A NAME=2.2.1.8>2.2.1.8. SiS 6326 framebuffer (sis_vid) | |
529 | |
530 SiS 6326 YUV Framebuffer driver -> sis_vid kernel driver | |
531 | |
532 Its interface should be compatible with the mga_vid, but the driver was not | |
533 updated after the mga_vid changes, so it's outdated now. Volunteers | |
534 needed to test it and bring the code up-to-date. | |
535 | |
536 | |
537 <A NAME=2.2.1.9>2.2.1.9. 3dfx YUV support | |
538 | |
539 3dfx has native YUV+scaler support, using /dev/3dfx (tdfx.o driver?) | |
540 The /dev/3dfx kernel driver exists only for 2.2.x kernels, for use with | |
541 Glide 2.x Linux ports. It's not tested with <B>MPlayer</B>, and so no more | |
542 supported. Volunteers needed to test it and bring the code up-to-date. | |
543 | |
544 | |
545 <A NAME=2.2.1.10>2.2.1.10. OpenGL output | |
546 | |
547 <B>MPlayer</B> support displaying movies using OpenGL. Unfortunately, not all | |
548 drivers support this ability. For example the Utah-GLX drivers | |
549 (for XFree86 3.3.6) have it, with all cards. | |
550 See <A HREF="http://utah-glx.sourceforge.net">http://utah-glx.sourceforge.net</A> for details about how to install it. | |
551 | |
552 XFree86(DRI) >= 4.0.3 supports it only with Matrox, and Radeon cards. | |
553 See <A HREF="http://dri.sourceforge.net">http://dri.sourceforge.net</A> for download, and installation instructions. | |
554 | |
555 | |
556 <A NAME=2.2.1.11>2.2.1.11. AAlib - text mode displaying | |
557 | |
558 <B>AAlib</B> is a library for displaying graphics in text mode, using powerful | |
559 ASCII renderer. There are LOTS of programs already supporting it, like Doom, | |
560 Quake, etc. MPlayer contains a very usable driver for it. | |
561 If ./configure detects aalib installed, the aalib libvo driver will be built. | |
562 | |
563 You can use some keys in the AA Window to change rendering options: | |
564 1 : decrease contrast | |
565 2 : increase contrast | |
566 3 : decrease brightness | |
567 4 : increase brightness | |
568 5 : switch fast rendering on/off | |
569 6 : set dithering mode (none, error distribution, floyd steinberg) | |
570 7 : invert image | |
571 a : toggles between aa and mplayer control) | |
572 | |
573 | |
574 | |
575 The following command line options can be used: | |
576 -aaosdcolor=V : change osd color | |
577 -aasubcolor=V : change subtitle color | |
578 where V can be: (0/normal, 1/dark, 2/bold, 3/boldfont, 4/reverse, 5/special) | |
579 | |
580 AAlib itselves provides a large sum of options. | |
581 Here are some important: | |
582 -aadriver : set recommended aa driver (X11, curses, linux) | |
583 -aaextended : use all 256 characters | |
584 -aaeight : use eight bit ascii | |
585 -aahelp : prints out all aalib options | |
586 | |
587 | |
588 | |
589 | |
590 | |
591 NOTE: the rendering is very CPU intensive, especially when using AA-on-X | |
592 (using aalib on X), and it's least CPU intensive on standard, | |
593 non-framebuffer console. Use SVGATextMode to set up a big textmode, | |
594 then enjoy! (secondary head Hercules cards rock :)) (anyone can enhance | |
595 fbdev to do conversion/dithering to hgafb? Would be neat :) | |
596 | |
597 Use the -framedrop option if your comp isn't fast enough to render all frames! | |
598 | |
599 Playing on terminal you'll get better speed and quality using the linux driver, not | |
600 curses (-aadriver linux). But therefore you need write access on /dev/vcsa<terminal>! | |
601 That isn't autodetected by aalib, bu vo_aa tries to find the best mode. | |
602 See http://aa-project.sourceforge.net/tune/ for further tuning issues. | |
603 | |
604 | |
605 <A NAME=2.2.1.A>2.2.1.A. TV-out support | |
606 | |
607 | |
608 <A NAME=2.2.1.A.1>2.2.1.A.1. Matrox cards | |
609 | |
610 > What I'd love to see in mplayer is the the same feature that I see in my | |
611 > windows box. When I start a movie in windows (in a window or in full screen) | |
612 > the movie is also redirected to the tv-out and I can also see it full screen | |
613 > on my tv. I love this feature and was wondering how hard it would be to add | |
614 > such a feature to mplayer. | |
615 | |
616 It's a driver limitation. BES (Back-End Scaler, it's the overlay generator | |
617 and YUV scaling engine of G200/G400/G450 cards) works only with CRTC1. | |
618 Normally, CRTC1 (textmode, every bpp gfx and BES) is routed to HEAD1, | |
619 and CRTC2 (only 16/32bpp gfx) is routed to HEAD2 (TV-out). | |
620 | |
621 Under linux, you have two choices to get TV-out working: | |
622 | |
623 1. Using X 4.0.x + the HAL driver from matrox, so you'll get dual-head | |
624 support, and you'll be able to redirect second output to the TV. | |
625 Unfortunately it has Macrovision encryption enabled, so it will | |
626 only work on directly-connected TV, no through VCR. | |
627 Other problem is that Xv doesn't work on the second head. | |
628 (I don't know how Windows solve it, maybe it swaps the CRTCs between | |
629 the heads, or just uses YUV framebuffer of second DAC with some trick) | |
630 | |
631 2. Using matroxfb with dual-head support enabled (2.4.x kernels). | |
632 You'll be able to get a framebuffer console (using CRTC2, so it's | |
633 slow), and TV-out (using CRTC1, with BES support). | |
634 You have to forget X while using this kind of TV-out! :( | |
635 | |
636 - Compile all the matrox-related things to modules in the kernel. | |
637 (you MUST compile them to modules, at least I couldn't get them | |
638 working built-in yet) | |
639 [reboot to new kernel & install modules, but don't load them yet!] | |
640 | |
641 cd TVout | |
642 ./compile.sh | |
643 | |
644 - Run the 'modules' script from the TV-out directory of mplayer. | |
645 It will switch your console to framebuffer. | |
646 Change to tty1 (ALT+F1)! | |
647 Now run the script 'independent', it will set up your tty's: | |
648 tty 1,2: fb console, CRTC2, head 1 (monitor) | |
649 tty 3,4,5...: framebuffer+BES, CRTC1, head 2 (TV-out) | |
650 You should run the scripts TV-* and Mon-* to set up resolutions: | |
651 change to tty1 (ALT+F1), and run Mon-* (one of them) | |
652 change to tty3 (ALT+F3) and then back to tty1 (ALT+F1) | |
653 (this change will select tty3 on /dev/fb1 - tricky) | |
654 run TV-* (one of them) | |
655 (now you'll get a console on your PAL TV - don't know about NTSC) | |
656 | |
657 Now if you start mplayer (on tty1), the picture will show up on | |
658 the tty3, so you'll see it on your TV or second monitor. | |
659 | |
660 Yes, it is a bit 'hack' now. But I'm waiting for the marvel | |
661 project to be finished, it will provide real TV-out drivers, I hope. | |
662 | |
663 My current problem is that BES is working only with CRTC1. So picture | |
664 will always shown up on head routed to CRTC1 (normaly the monitor), | |
665 so i have to swap CRTC's, but this way your console will framebuffer | |
666 (CRTC2 can't do text-mode) and a bit slow (no acceleration). :( | |
667 | |
668 | |
669 > anyway i also just get monochrome output on the tv ... | |
670 Maybe you have NTSC TV? Or just didn't run one of TV-* scripts. | |
671 | |
672 | |
673 </PRE> | |
674 | |
675 </BODY> | |
676 | |
677 </HTML> |