~ubuntu-dev/mplayer/ubuntu-feisty

« back to all changes in this revision

Viewing changes to DOCS/HTML/ru/output-trad.html

  • Committer: Reinhard Tartler
  • Date: 2006-07-08 08:45:33 UTC
  • Revision ID: siretart@tauware.de-20060708084533-dbc155bde7122e78
imported mplayer_0.99+1.0pre7try2+cvs20060117

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=KOI8-R"><title>6.2. Video outputs for traditional video cards</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="MPlayer - The Movie Player"><link rel="up" href="video.html" title="����� 6. Video output devices"><link rel="prev" href="mtrr.html" title="6.1. Setting up MTRR"><link rel="next" href="mpeg_decoders.html" title="6.3. MPEG decoders"><link rel="preface" href="howtoread.html" title="��� ������ ��� ������������"><link rel="chapter" href="intro.html" title="����� 1. ��������"><link rel="chapter" href="usage.html" title="����� 2. �������������"><link rel="chapter" href="cd-dvd.html" title="����� 3. ������������� CD/DVD"><link rel="chapter" href="faq.html" title="����� 4. Frequently Asked Questions"><link rel="chapter" href="features.html" title="����� 5. �����������"><link rel="chapter" href="video.html" title="����� 6. Video output devices"><link rel="chapter" href="audio.html" title="����� 7. Audio output devices"><link rel="chapter" href="ports.html" title="����� 8. �������"><link rel="chapter" href="mencoder.html" title="����� 9. Basic usage of MEncoder"><link rel="chapter" href="encoding-guide.html" title="����� 10. Encoding with MEncoder"><link rel="appendix" href="mailinglists.html" title="���������� A. �������� ��������"><link rel="appendix" href="bugreports.html" title="���������� B. ��� �������� �� �������"><link rel="appendix" href="bugs.html" title="���������� C. ��������� ��������"><link rel="appendix" href="skin.html" title="���������� D. MPlayer skin format"><link rel="appendix" href="users-vs-dev.html" title="���������� E. ���� �������������"><link rel="subsection" href="output-trad.html#xv" title="6.2.1. Xv"><link rel="subsection" href="output-trad.html#dga" title="6.2.2. DGA"><link rel="subsection" href="output-trad.html#sdl" title="6.2.3. SDL"><link rel="subsection" href="output-trad.html#svgalib" title="6.2.4. SVGAlib"><link rel="subsection" href="output-trad.html#fbdev" title="6.2.5. Framebuffer output (FBdev)"><link rel="subsection" href="output-trad.html#mga_vid" title="6.2.6. Matrox framebuffer (mga_vid)"><link rel="subsection" href="output-trad.html#tdfxfb" title="6.2.7. 3Dfx YUV support"><link rel="subsection" href="output-trad.html#opengl" title="6.2.8. OpenGL output"><link rel="subsection" href="output-trad.html#aalib" title="6.2.9. AAlib - text mode displaying"><link rel="subsection" href="output-trad.html#caca" title="6.2.10. libcaca - Color ASCII Art library"><link rel="subsection" href="output-trad.html#vesa" title="6.2.11. VESA - output to VESA BIOS"><link rel="subsection" href="output-trad.html#x11" title="6.2.12. X11"><link rel="subsection" href="output-trad.html#vidix" title="6.2.13. VIDIX"><link rel="subsection" href="output-trad.html#directfb" title="6.2.14. DirectFB"><link rel="subsection" href="output-trad.html#dfbmga" title="6.2.15. DirectFB/Matrox (dfbmga)"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6.2. Video outputs for traditional video cards</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mtrr.html">����.</a>�</td><th width="60%" align="center">����� 6. Video output devices</th><td width="20%" align="right">�<a accesskey="n" href="mpeg_decoders.html">����.</a></td></tr></table><hr></div><div class="sect1" lang="ru"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="output-trad"></a>6.2. Video outputs for traditional video cards</h2></div></div></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="xv"></a>6.2.1. Xv</h3></div></div></div><p>
 
2
Under XFree86 4.0.2 or newer, you can use your card's hardware YUV routines
 
3
using the XVideo extension. This is what the option
 
4
'<tt class="option">-vo xv</tt>' uses. Also, this driver supports adjusting
 
5
brightness/contrast/hue/etc (unless you use the old, slow DirectShow DivX
 
6
codec, which supports it everywhere), see the man page.
 
7
</p><p>
 
8
In order to make this work, be sure to check the following:
 
9
 
 
10
</p><div class="orderedlist"><ol type="1"><li><p>
 
11
  You have to use XFree86 4.0.2 or newer (former versions don't have XVideo)
 
12
  </p></li><li><p>
 
13
  Your card actually supports hardware acceleration (modern cards do)
 
14
  </p></li><li><p>
 
15
  X loads the XVideo extension, it's something like this:
 
16
  </p><pre class="programlisting">(II) Loading extension XVideo</pre><p>
 
17
  in <tt class="filename">/var/log/XFree86.0.log</tt>
 
18
  </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">���������</h3><p>
 
19
   This loads only the XFree86's extension. In a good install, this is
 
20
   always loaded, and doesn't mean that the <span class="bold"><strong>card's</strong></span>
 
21
   XVideo support is loaded!
 
22
  </p></div><p>
 
23
  </p></li><li><p>
 
24
  Your card has Xv support under Linux. To check, try
 
25
  <span><strong class="command">xvinfo</strong></span>, it is the part of the XFree86 distribution. It
 
26
  should display a long text, similar to this:
 
27
  </p><pre class="screen">
 
28
X-Video Extension version 2.2
 
29
screen #0
 
30
  Adaptor #0: "Savage Streams Engine"
 
31
    number of ports: 1
 
32
    port base: 43
 
33
    operations supported: PutImage
 
34
    supported visuals:
 
35
      depth 16, visualID 0x22
 
36
      depth 16, visualID 0x23
 
37
    number of attributes: 5
 
38
(...)
 
39
    Number of image formats: 7
 
40
      id: 0x32595559 (YUY2)
 
41
        guid: 59555932-0000-0010-8000-00aa00389b71
 
42
        bits per pixel: 16
 
43
        number of planes: 1
 
44
        type: YUV (packed)
 
45
      id: 0x32315659 (YV12)
 
46
        guid: 59563132-0000-0010-8000-00aa00389b71
 
47
        bits per pixel: 12
 
48
        number of planes: 3
 
49
        type: YUV (planar)
 
50
(...etc...)</pre><p>
 
51
  It must support YUY2 packed, and YV12 planar pixel formats to be usable
 
52
  with <span class="application">MPlayer</span>.
 
53
  </p></li><li><p>
 
54
  And finally, check if <span class="application">MPlayer</span> was compiled
 
55
  with 'xv' support. Do a <span><strong class="command">mplayer -vo help | grep xv </strong></span>.
 
56
  If 'xv' support was built a line similar to this should appear:
 
57
  </p><pre class="screen">
 
58
  xv      X11/Xv</pre><p>
 
59
  </p></li></ol></div><p>
 
60
</p><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="tdfx"></a>6.2.1.1. 3dfx cards</h4></div></div></div><p>
 
61
Older 3dfx drivers were known to have problems with XVideo acceleration, it
 
62
didn't support either YUY2 or YV12, and so. Verify that you have XFree86
 
63
version 4.2.0 or greater, it works OK with YV12 and YUY2. Previous
 
64
versions, including 4.1.0, <span class="bold"><strong>crashes with YV12</strong></span>.
 
65
If you experience strange effects using <tt class="option">-vo xv</tt>, try SDL
 
66
(it has XVideo, too) and see if it helps. Check the
 
67
<a href="output-trad.html#sdl" title="6.2.3. SDL">SDL</a> section for details.
 
68
</p><p>
 
69
<span class="bold"><strong>OR</strong></span>, try the NEW
 
70
<tt class="option">-vo tdfxfb</tt> driver! See the <a href="output-trad.html#tdfxfb" title="6.2.7. 3Dfx YUV support">tdfxfb</a>
 
71
section.
 
72
</p></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="s3"></a>6.2.1.2. S3 cards</h4></div></div></div><p>
 
73
S3 Savage3D's should work fine, but for Savage4, use XFree86 version 4.0.3
 
74
or greater (in case of image problems, try 16bpp). As for S3 Virge: there is
 
75
xv support, but the card itself is very slow, so you better sell it.
 
76
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">���������</h3><p>
 
77
It's currently unclear which Savage models lack YV12 support, and convert by
 
78
driver (slow). If you suspect your card, get a newer driver, or ask politely
 
79
on the MPlayer-users mailing list for an MMX/3DNow! enabled driver.
 
80
</p></div></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="nvidia"></a>6.2.1.3. nVidia cards</h4></div></div></div><p>
 
81
nVidia isn't always a very good choice under Linux (according to nVidia, this
 
82
is <a href="nvidia-opinions.html" title="E.3. nVidia">not true</a>)... XFree86's
 
83
open-source driver supports most of these cards, but for some cases, you'll
 
84
have to use the binary closed-source nVidia driver, available at
 
85
<a href="http://www.nvidia.com/object/linux.html" target="_top">nVidia's web site</a>.
 
86
You'll always need this driver if you want 3D acceleration, too.
 
87
</p><p>
 
88
Riva128 cards don't have XVideo support with XFree86's nVidia driver :(
 
89
Complain to nVidia.
 
90
</p><p>
 
91
However, <span class="application">MPlayer</span> contains a
 
92
<a href="output-trad.html#vidix" title="6.2.13. VIDIX">VIDIX</a> driver for most nVidia cards. Currently it
 
93
is in beta stage, and has some drawbacks. For more information, see
 
94
<a href="output-trad.html#vidix-nvidia" title="6.2.13.5. nVidia cards">nVidia VIDIX</a> section.
 
95
</p></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="ati"></a>6.2.1.4. ATI cards</h4></div></div></div><p>
 
96
The <a href="http://gatos.sf.net" target="_top">GATOS driver</a>
 
97
(which you should use, unless you have Rage128 or Radeon) has VSYNC enabled
 
98
by default. It means that decoding speed (!) is synced to the monitor's
 
99
refresh rate. If playing seems to be slow, try disabling VSYNC somehow, or
 
100
set refresh rate to a n*(fps of the movie) Hz.
 
101
</p><p>
 
102
Radeon VE - if you need X, use XFree86 4.2.0 or greater for this card.
 
103
No TV out support. Of course with <span class="application">MPlayer</span> you can
 
104
happily get <span class="bold"><strong>accelerated</strong></span> display, with or without
 
105
<span class="bold"><strong>TV output</strong></span>, and no libraries or X are needed.
 
106
Read the <a href="output-trad.html#vidix" title="6.2.13. VIDIX">VIDIX</a> section.
 
107
</p></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="neomagic"></a>6.2.1.5. NeoMagic cards</h4></div></div></div><p>
 
108
These cards can be found in many laptops. You must use XFree86 4.3.0 or
 
109
above, or else use Stefan Seyfried's
 
110
<a href="http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/" target="_top">Xv-capable drivers</a>.
 
111
Just choose the one that applies to your version of XFree86.
 
112
</p><p>
 
113
XFree86 4.3.0 includes Xv support, yet Bohdan Horst sent a small
 
114
<a href="http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/neo_driver.patch" target="_top">patch</a>
 
115
against the XFree86 sources that speeds up framebuffer operations (so XVideo)
 
116
up to four times. The patch has been included in XFree86 CVS and should be in the
 
117
next release after 4.3.0.
 
118
</p><p>
 
119
To allow playback of DVD sized content change your XF86Config like this:
 
120
</p><pre class="programlisting">
 
121
Section "Device"
 
122
    [...]
 
123
    Driver "neomagic"
 
124
    <span class="emphasis"><em>Option "OverlayMem" "829440"</em></span>
 
125
    [...]
 
126
EndSection</pre><p>
 
127
</p></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="trident"></a>6.2.1.6. Trident cards</h4></div></div></div><p>
 
128
If you want to use Xv with a Trident card, provided that it doesn't work
 
129
with 4.1.0, install XFree 4.2.0. 4.2.0 adds support for fullscreen Xv
 
130
support with the Cyberblade XP card.
 
131
</p><p>
 
132
Alternatively, <span class="application">MPlayer</span> contains a
 
133
<a href="output-trad.html#vidix" title="6.2.13. VIDIX">VIDIX</a> driver for the Cyberblade/i1 card.
 
134
</p></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="kyro"></a>6.2.1.7. Kyro/PowerVR cards</h4></div></div></div><p>
 
135
If you want to use Xv with a Kyro based card (for example Hercules
 
136
Prophet 4000XT), you should download the drivers from the
 
137
<a href="http://www.powervr.com/" target="_top">PowerVR site</a>
 
138
</p></div></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="dga"></a>6.2.2. DGA</h3></div></div></div><p><b>PREAMBLE.�</b>
 
139
This document tries to explain in some words what DGA is in general and
 
140
what the DGA video output driver for <span class="application">MPlayer</span>
 
141
can do (and what it can't).
 
142
</p><p><b>WHAT IS DGA.�</b>
 
143
<span class="acronym">DGA</span> is short for <span class="emphasis"><em>Direct Graphics
 
144
Access</em></span> and is a means for a program to bypass the X server and
 
145
directly modifying the framebuffer memory. Technically spoken this happens
 
146
by mapping the framebuffer memory into the memory range of your process.
 
147
This is allowed by the kernel only if you have superuser privileges. You
 
148
can get these either by logging in as <code class="systemitem">root</code> or by setting the SUID bit on the
 
149
<span class="application">MPlayer</span> executable (<span class="bold"><strong>not
 
150
recommended</strong></span>).
 
151
</p><p>
 
152
There are two versions of DGA: DGA1 is used by XFree 3.x.x and DGA2 was
 
153
introduced with XFree 4.0.1.
 
154
</p><p>
 
155
DGA1 provides only direct framebuffer access as described above. For
 
156
switching the resolution of the video signal you have to rely on the
 
157
XVidMode extension.
 
158
</p><p>
 
159
DGA2 incorporates the features of XVidMode extension and also allows
 
160
switching the depth of the display. So you may, although basically
 
161
running a 32 bit depth X server, switch to a depth of 15 bits and vice
 
162
versa.
 
163
</p><p>
 
164
However DGA has some drawbacks. It seems it is somewhat dependent on the
 
165
graphics chip you use and on the implementation of the X server's video
 
166
driver that controls this chip. So it does not work on every system...
 
167
</p><p><b>INSTALLING DGA SUPPORT FOR MPLAYER.�</b>
 
168
First make sure X loads the DGA extension, see in
 
169
<tt class="filename">/var/log/XFree86.0.log</tt>:
 
170
 
 
171
</p><pre class="programlisting">(II) Loading extension XFree86-DGA</pre><p>
 
172
 
 
173
See, XFree86 4.0.x or greater is <span class="bold"><strong>highly recommended</strong></span>!
 
174
<span class="application">MPlayer</span>'s DGA driver is autodetected by
 
175
<tt class="filename">./configure</tt>, or you can force it
 
176
with <tt class="option">--enable-dga</tt>.
 
177
</p><p>
 
178
If the driver couldn't switch to a smaller resolution, experiment with
 
179
options <tt class="option">-vm</tt> (only with X 3.3.x), <tt class="option">-fs</tt>,
 
180
<tt class="option">-bpp</tt>, <tt class="option">-zoom</tt> to find a video mode that
 
181
the movie fits in. There is no converter right now :(
 
182
</p><p>
 
183
Become <code class="systemitem">root</code>. DGA needs root
 
184
access to be able to write directly video memory. If you want to run it as
 
185
user, then install <span class="application">MPlayer</span> SUID root:
 
186
 
 
187
</p><pre class="screen">
 
188
chown root <em class="replaceable"><code>/usr/local/bin/mplayer</code></em>
 
189
chmod 750 <em class="replaceable"><code>/usr/local/bin/mplayer</code></em>
 
190
chmod +s <em class="replaceable"><code>/usr/local/bin/mplayer</code></em>
 
191
</pre><p>
 
192
 
 
193
Now it works as a simple user, too.
 
194
</p><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Security risk</h3><p>
 
195
This is a <span class="bold"><strong>big</strong></span> security risk!
 
196
<span class="bold"><strong>Never</strong></span> do this on a server or on a computer that can be
 
197
accessed by other people because they can gain root privileges through SUID root
 
198
<span class="application">MPlayer</span>.
 
199
</p></div><p>
 
200
Now use <tt class="option">-vo dga</tt> option, and there you go! (hope so:) You
 
201
should also try if the <tt class="option">-vo sdl:dga</tt> option works for you!
 
202
It's much faster!
 
203
</p><p><a name="dga-modelines"></a><b>RESOLUTION SWITCHING.�</b>
 
204
The DGA driver allows for switching the resolution of the output signal.
 
205
This avoids the need for doing (slow) software scaling and at the same time
 
206
provides a fullscreen image. Ideally it would switch to the exact
 
207
resolution (except for honoring aspect ratio) of the video data, but the X
 
208
server only allows switching to resolutions predefined in
 
209
<tt class="filename">/etc/X11/XF86Config</tt>
 
210
(<tt class="filename">/etc/X11/XF86Config-4</tt> for XFree 4.X.X respectively).
 
211
Those are defined by so-called modelines and depend on
 
212
the capabilities of your video hardware. The X server scans this config
 
213
file on startup and disables the modelines not suitable for your hardware.
 
214
You can find out which modes survive with the X11 log file. It can be found
 
215
at: <tt class="filename">/var/log/XFree86.0.log</tt>.
 
216
</p><p>
 
217
These entries are known to work fine with a Riva128 chip, using the nv.o X
 
218
server driver module.
 
219
</p><pre class="programlisting">
 
220
Section "Modes"
 
221
  Identifier "Modes[0]"
 
222
  Modeline "800x600"  40     800 840 968 1056  600 601 605 628
 
223
  Modeline "712x600"  35.0   712 740 850 900   400 410 412 425
 
224
  Modeline "640x480"  25.175 640 664 760 800   480 491 493 525
 
225
  Modeline "400x300"  20     400 416 480 528   300 301 303 314 Doublescan
 
226
  Modeline "352x288"  25.10  352 368 416 432   288 296 290 310
 
227
  Modeline "352x240"  15.750 352 368 416 432   240 244 246 262 Doublescan
 
228
  Modeline "320x240"  12.588 320 336 384 400   240 245 246 262 Doublescan
 
229
EndSection
 
230
</pre><p><b>DGA &amp; MPLAYER.�</b>
 
231
DGA is used in two places with <span class="application">MPlayer</span>: The SDL
 
232
driver can be made to make use of it (<tt class="option">-vo sdl:dga</tt>) and
 
233
within the DGA driver (<tt class="option">-vo dga</tt>). The above said is true
 
234
for both; in the following sections I'll explain how the DGA driver for
 
235
<span class="application">MPlayer</span> works.
 
236
</p><p><b>FEATURES.�</b>
 
237
The DGA driver is invoked by specifying <tt class="option">-vo dga</tt> at the
 
238
command line. The default behavior is to switch to a resolution matching
 
239
the original resolution of the video as close as possible. It deliberately
 
240
ignores the <tt class="option">-vm</tt> and <tt class="option">-fs</tt> options
 
241
(enabling of video mode switching and fullscreen) - it always tries to
 
242
cover as much area of your screen as possible by switching the video mode,
 
243
thus refraining from using additional cycles of your CPU to scale the
 
244
image. If you don't like the mode it chooses you may force it to choose
 
245
the mode matching closest the resolution you specify by <tt class="option">-x</tt>
 
246
and <tt class="option">-y</tt>. By providing the <tt class="option">-v</tt> option, the
 
247
DGA driver will print, among a lot of other things, a list of all
 
248
resolutions supported by your current <tt class="filename">XF86Config</tt> file.
 
249
Having DGA2 you may also force it to use a certain depth by using the
 
250
<tt class="option">-bpp</tt> option. Valid depths are 15, 16, 24 and 32. It
 
251
depends on your hardware whether these depths are natively supported or if
 
252
a (possibly slow) conversion has to be done.
 
253
</p><p>
 
254
If you should be lucky enough to have enough offscreen memory left to
 
255
put a whole image there, the DGA driver will use double buffering, which
 
256
results in much smoother movie playback. It will tell you whether
 
257
double buffering is enabled or not.
 
258
</p><p>
 
259
Double buffering means that the next frame of your video is being drawn in
 
260
some offscreen memory while the current frame is being displayed. When the
 
261
next frame is ready, the graphics chip is just told the location in memory
 
262
of the new frame and simply fetches the data to be displayed from there.
 
263
In the meantime the other buffer in memory will be filled again with new
 
264
video data.
 
265
</p><p>
 
266
Double buffering may be switched on by using the option
 
267
<tt class="option">-double</tt> and may be disabled with
 
268
<tt class="option">-nodouble</tt>. Current default option is to disable
 
269
double buffering. When using the DGA driver, onscreen display (OSD) only
 
270
works with double buffering enabled. However, enabling double buffering may
 
271
result in a big speed penalty (on my K6-II+ 525 it used an additional 20%
 
272
of CPU time!) depending on the implementation of DGA for your hardware.
 
273
</p><p><b>SPEED ISSUES.�</b>
 
274
Generally spoken, DGA framebuffer access should be at least as fast as
 
275
using the X11 driver with the additional benefit of getting a fullscreen
 
276
image. The percentage speed values printed by
 
277
<span class="application">MPlayer</span> have to be interpreted with some care,
 
278
as for example, with the X11 driver they do not include the time used by
 
279
the X server needed for the actual drawing. Hook a terminal to a serial
 
280
line of your box and start <span><strong class="command">top</strong></span> to see what is really
 
281
going on in your box.
 
282
</p><p>
 
283
Generally spoken, the speedup done by using DGA against 'normal' use of X11
 
284
highly depends on your graphics card and how well the X server module for it
 
285
is optimized.
 
286
</p><p>
 
287
If you have a slow system, better use 15 or 16 bit depth since they require
 
288
only half the memory bandwidth of a 32 bit display.
 
289
</p><p>
 
290
Using a depth of 24 bit is even a good idea if your card natively just supports
 
291
32 bit depth since it transfers 25% less data compared to the 32/32 mode.
 
292
</p><p>
 
293
I've seen some AVI files be played back on a Pentium MMX 266. AMD K6-2
 
294
CPUs might work at 400 MHZ and above.
 
295
</p><p><b>KNOWN BUGS.�</b>
 
296
Well, according to some developers of XFree, DGA is quite a beast. They
 
297
tell you better not to use it. Its implementation is not always flawless
 
298
with every chipset driver for XFree out there.
 
299
</p><div class="itemizedlist"><ul type="disc"><li>
 
300
  With XFree 4.0.3 and <tt class="filename">nv.o</tt> there is a bug resulting
 
301
  in strange colors.
 
302
  </li><li>
 
303
  ATI driver requires to switch mode back more than once after finishing
 
304
  using of DGA.
 
305
  </li><li>
 
306
  Some drivers simply fail to switch back to normal resolution (use
 
307
  <span class="keycap"><b>Ctrl</b></span>+<span class="keycap"><b>Alt</b></span>+<span class="keycap"><b>Keypad +</b></span> and
 
308
  <span class="keycap"><b>Ctrl</b></span>+<span class="keycap"><b>Alt</b></span>+<span class="keycap"><b>Keypad -</b></span>
 
309
  to switch back manually).
 
310
  </li><li>
 
311
  Some drivers simply display strange colors.
 
312
  </li><li>
 
313
  Some drivers lie about the amount of memory they map into the process's
 
314
  address space, thus vo_dga won't use double buffering (SIS?).
 
315
  </li><li>
 
316
  Some drivers seem to fail to report even a single valid mode. In this
 
317
  case the DGA driver will crash telling you about a nonsense mode of
 
318
  100000x100000 or something like that.
 
319
  </li><li>
 
320
  OSD only works with double buffering enabled (else it flickers).
 
321
  </li></ul></div></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="sdl"></a>6.2.3. SDL</h3></div></div></div><p>
 
322
<span class="acronym">SDL</span> (Simple Directmedia Layer) is basically a unified
 
323
video/audio interface. Programs that use it know only about SDL, and not
 
324
about what video or audio driver does SDL actually use. For example a Doom
 
325
port using SDL can run on svgalib, aalib, X, fbdev, and others, you only
 
326
have to specify the (for example) video driver to use with the
 
327
<code class="envar">SDL_VIDEODRIVER</code> environment variable. Well, in theory.
 
328
</p><p>
 
329
With <span class="application">MPlayer</span>, we used its X11 driver's software
 
330
scaler ability for cards/drivers that doesn't support XVideo, until we made
 
331
our own (faster, nicer) software scaler. Also we used its aalib output, but
 
332
now we have ours which is more comfortable. Its DGA mode was better than
 
333
ours, until recently. Get it now? :)
 
334
</p><p>
 
335
It also helps with some buggy drivers/cards if the video is jerky (not slow
 
336
system problem), or audio is lagging.
 
337
</p><p>
 
338
SDL video output supports displaying subtitles under the movie, on the (if
 
339
present) black bar.
 
340
</p><div class="variablelist"><p class="title"><b>There are several command line switches for SDL:</b></p><dl><dt><span class="term"><tt class="option">-vo sdl:<em class="replaceable"><code>name</code></em></tt></span></dt><dd>
 
341
    specifies SDL video driver to use (i.e. <code class="literal">aalib</code>,
 
342
    <code class="literal">dga</code>, <code class="literal">x11</code>)
 
343
  </dd><dt><span class="term"><tt class="option">-ao sdl:<em class="replaceable"><code>name</code></em></tt></span></dt><dd>
 
344
    specifies SDL audio driver to use (i.e. <code class="literal">dsp</code>,
 
345
    <code class="literal">esd</code>, <code class="literal">artsc</code>)
 
346
  </dd><dt><span class="term"><tt class="option">-noxv</tt></span></dt><dd>
 
347
    disables XVideo hardware acceleration
 
348
  </dd><dt><span class="term"><tt class="option">-forcexv</tt></span></dt><dd>
 
349
    tries to force XVideo acceleration
 
350
  </dd></dl></div><div class="table"><a name="id2555015"></a><p class="title"><b>������� 6.1. SDL only keys</b></p><table summary="SDL only keys" border="1"><colgroup><col><col></colgroup><thead><tr><th>Key</th><th>Action</th></tr></thead><tbody><tr><td><span class="keycap"><b>c</b></span></td><td>
 
351
    cycles available fullscreen modes
 
352
    </td></tr><tr><td><span class="keycap"><b>n</b></span></td><td>
 
353
    changes back to normal mode
 
354
    </td></tr></tbody></table></div><div class="itemizedlist"><p class="title"><b>Known bugs:</b></p><ul type="disc"><li>
 
355
  Keys pressed under sdl:aalib console driver repeat forever. (use
 
356
  <tt class="option">-vo aa</tt>!) It's bug in SDL, I can't change it (tested with
 
357
  SDL 1.2.1).
 
358
  </li><li>
 
359
  DO NOT USE SDL with GUI! It won't work as it should.
 
360
  </li></ul></div></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="svgalib"></a>6.2.4. SVGAlib</h3></div></div></div><p><b>INSTALLATION.�</b>
 
361
You'll have to install svgalib and its development package in order for
 
362
<span class="application">MPlayer</span> build its SVGAlib driver (autodetected,
 
363
but can be forced), and don't forget to edit
 
364
<tt class="filename">/etc/vga/libvga.config</tt> to suit your card and monitor.
 
365
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">���������</h3><p>
 
366
Be sure not to use the <tt class="option">-fs</tt> switch, since it toggles the
 
367
usage of the software scaler, and it's slow. If you really need it, use the
 
368
<tt class="option">-sws 4</tt> option which will produce bad quality, but is
 
369
somewhat faster.
 
370
</p></div><p><b>EGA (4BPP) SUPPORT.�</b>
 
371
SVGAlib incorporates EGAlib, and <span class="application">MPlayer</span> has the
 
372
possibility to display any movie in 16 colors, thus usable in the following
 
373
sets:
 
374
</p><div class="itemizedlist"><ul type="disc"><li>
 
375
  EGA card with EGA monitor: 320x200x4bpp, 640x200x4bpp, 640x350x4bpp
 
376
  </li><li>
 
377
  EGA card with CGA monitor: 320x200x4bpp, 640x200x4bpp
 
378
  </li></ul></div><p>
 
379
The bpp (bits per pixel) value must be set to 4 by hand:
 
380
<tt class="option">-bpp 4</tt>
 
381
</p><p>
 
382
The movie probably must be scaled down to fit in EGA mode:
 
383
</p><pre class="screen">-vf scale=640:350</pre><p>
 
384
or
 
385
</p><pre class="screen">-vf scale=320:200</pre><p>
 
386
</p><p>
 
387
For that we need fast but bad quality scaling routine:
 
388
</p><pre class="screen">-sws 4</pre><p>
 
389
</p><p>
 
390
Maybe automatic aspect correction has to be shut off:
 
391
</p><pre class="screen">-noaspect</pre><p>
 
392
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">���������</h3><p>
 
393
According to my experience the best image quality on
 
394
EGA screens can be achieved by decreasing the brightness a bit:
 
395
<tt class="option">-vf eq=-20:0</tt>. I also needed to lower the audio
 
396
samplerate on my box, because the sound was broken on 44kHz:
 
397
<tt class="option">-srate 22050</tt>.
 
398
</p></div><p>
 
399
You can turn on OSD and subtitles only with the <tt class="option">expand</tt>
 
400
filter, see the man page for exact parameters.
 
401
</p></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="fbdev"></a>6.2.5. Framebuffer output (FBdev)</h3></div></div></div><p>
 
402
Whether to build the FBdev target is autodetected during
 
403
<tt class="filename">./configure</tt>. Read the framebuffer documentation in
 
404
the kernel sources (<tt class="filename">Documentation/fb/*</tt>) for more
 
405
information.
 
406
</p><p>
 
407
If your card doesn't support VBE 2.0 standard (older ISA/PCI cards, such as
 
408
S3 Trio64), only VBE 1.2 (or older?): Well, VESAfb is still available, but
 
409
you'll have to load SciTech Display Doctor (formerly UniVBE) before booting
 
410
Linux. Use a DOS boot disk or whatever. And don't forget to register your
 
411
UniVBE ;))
 
412
</p><p>
 
413
The FBdev output takes some additional parameters above the others:
 
414
</p><div class="variablelist"><dl><dt><span class="term"><tt class="option">-fb</tt></span></dt><dd>
 
415
    specify the framebuffer device to use (<tt class="filename">/dev/fb0</tt>)
 
416
    </dd><dt><span class="term"><tt class="option">-fbmode</tt></span></dt><dd>
 
417
    mode name to use (according to <tt class="filename">/etc/fb.modes</tt>)
 
418
    </dd><dt><span class="term"><tt class="option">-fbmodeconfig</tt></span></dt><dd>
 
419
    config file of modes (default <tt class="filename">/etc/fb.modes</tt>)
 
420
    </dd><dt><span class="term"><tt class="option">-monitor-hfreq</tt>, </span><span class="term"><tt class="option">-monitor-vfreq</tt>, </span><span class="term"><tt class="option">-monitor-dotclock</tt></span></dt><dd>
 
421
    <span class="bold"><strong>important</strong></span> values, see
 
422
    <tt class="filename">example.conf</tt>
 
423
    </dd></dl></div><p>
 
424
If you want to change to a specific mode, then use
 
425
</p><pre class="screen">
 
426
mplayer -vm -fbmode <em class="replaceable"><code>name_of_mode</code></em> <em class="replaceable"><code>filename</code></em>
 
427
</pre><p>
 
428
</p><div class="itemizedlist"><ul type="disc"><li><p>
 
429
  <tt class="option">-vm</tt> alone will choose the most suitable mode from
 
430
  <tt class="filename">/etc/fb.modes</tt>. Can be used together with
 
431
  <tt class="option">-x</tt> and <tt class="option">-y</tt> options too. The
 
432
  <tt class="option">-flip</tt> option is supported only if the movie's pixel
 
433
  format matches the video mode's pixel format. Pay attention to the bpp
 
434
  value, fbdev driver tries to use the current, or if you specify the
 
435
  <tt class="option">-bpp</tt> option, then that.
 
436
  </p></li><li><p>
 
437
  <tt class="option">-zoom</tt> option isn't supported (use <tt class="option">-vf scale</tt>).
 
438
  You can't use 8bpp (or less) modes.
 
439
  </p></li><li><p>
 
440
  You possibly want to turn the cursor off:
 
441
  </p><pre class="screen">echo -e '\033[?25l'</pre><p>
 
442
  or
 
443
  </p><pre class="screen">setterm -cursor off</pre><p>
 
444
  and the screen saver:
 
445
  </p><pre class="screen">setterm -blank 0</pre><p>
 
446
  To turn the cursor back on:
 
447
  </p><pre class="screen">echo -e '\033[?25h'</pre><p>
 
448
  or
 
449
  </p><pre class="screen">setterm -cursor on</pre><p>
 
450
  </p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">���������</h3><p>
 
451
FBdev video mode changing <span class="emphasis"><em>does not work</em></span> with the VESA
 
452
framebuffer, and don't ask for it, since it's not an
 
453
<span class="application">MPlayer</span> limitation.
 
454
</p></div></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="mga_vid"></a>6.2.6. Matrox framebuffer (mga_vid)</h3></div></div></div><p>
 
455
This section is about the Matrox G200/G400/G450/G550 BES (Back-End Scaler)
 
456
support, the mga_vid kernel driver. It's actively developed by A'rpi, and
 
457
it has hardware VSYNC support with triple buffering. It works on both
 
458
framebuffer console and under X.
 
459
</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">��������</h3><p>
 
460
This is Linux only! On non-Linux (tested on FreeBSD) systems, you can use
 
461
<a href="output-trad.html#vidix" title="6.2.13. VIDIX">VIDIX</a> instead!
 
462
</p></div><div class="procedure"><a name="id2555523"></a><p class="title"><b>Installation:</b></p><ol type="1"><li><p>
 
463
  To use it, you first have to compile <tt class="filename">mga_vid.o</tt>:
 
464
  </p><pre class="screen">
 
465
cd drivers
 
466
make</pre><p>
 
467
  </p></li><li><p>
 
468
  Then create <tt class="filename">/dev/mga_vid</tt> device:
 
469
  </p><pre class="screen">mknod /dev/mga_vid c 178 0</pre><p>
 
470
  and load the driver with
 
471
  </p><pre class="screen">insmod mga_vid.o</pre><p>
 
472
  </p></li><li><p>
 
473
  You should verify the memory size detection using the
 
474
  <span><strong class="command">dmesg</strong></span> command. If it's bad, use the
 
475
  <tt class="option">mga_ram_size</tt> option
 
476
  (<span><strong class="command">rmmod mga_vid</strong></span> first),
 
477
  specify card's memory size in MB:
 
478
  </p><pre class="screen">insmod mga_vid.o mga_ram_size=16</pre><p>
 
479
  </p></li><li><p>
 
480
  To make it load/unload automatically when needed, first insert the
 
481
  following line at the end of <tt class="filename">/etc/modules.conf</tt>:
 
482
 
 
483
  </p><pre class="programlisting">alias char-major-178 mga_vid</pre><p>
 
484
 
 
485
  Then copy the <tt class="filename">mga_vid.o</tt> module to the appropriate
 
486
  place under <tt class="filename">/lib/modules/<em class="replaceable"><code>kernel
 
487
  version</code></em>/<em class="replaceable"><code>somewhere</code></em></tt>.
 
488
  </p><p>
 
489
  Then run
 
490
  </p><pre class="screen">depmod -a</pre><p>
 
491
  </p></li><li><p>
 
492
  Now you have to (re)compile <span class="application">MPlayer</span>,
 
493
  <tt class="filename">./configure</tt> will detect
 
494
  <tt class="filename">/dev/mga_vid</tt> and build the 'mga' driver. Using it
 
495
  from <span class="application">MPlayer</span> goes by <tt class="option">-vo mga</tt>
 
496
  if you have matroxfb console, or <tt class="option">-vo xmga</tt> under XFree86
 
497
  3.x.x or 4.x.x.
 
498
  </p></li></ol></div><p>
 
499
The mga_vid driver cooperates with Xv.
 
500
</p><p>
 
501
The <tt class="filename">/dev/mga_vid</tt> device file can be read for some
 
502
info, for example by
 
503
</p><pre class="screen">cat /dev/mga_vid</pre><p>
 
504
and can be written for brightness change:
 
505
</p><pre class="screen">echo "brightness=120" &gt; /dev/mga_vid</pre><p>
 
506
</p></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="tdfxfb"></a>6.2.7. 3Dfx YUV support</h3></div></div></div><p>
 
507
This driver uses the kernel's tdfx framebuffer driver to play movies with
 
508
YUV acceleration. You'll need a kernel with tdfxfb support, and recompile
 
509
with
 
510
</p><pre class="screen">./configure --enable-tdfxfb</pre><p>
 
511
</p></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="opengl"></a>6.2.8. OpenGL output</h3></div></div></div><p>
 
512
<span class="application">MPlayer</span> supports displaying movies using OpenGL,
 
513
but if your platform/driver supports xv as should be the case on a PC with
 
514
Linux, use xv instead, OpenGL performance is considerably worse. If you
 
515
have an X11 implementation without xv support, OpenGL is a viable
 
516
alternative.
 
517
</p><p>
 
518
Unfortunately not all drivers support this feature. The Utah-GLX drivers
 
519
(for XFree86 3.3.6) support it for all cards.
 
520
See <a href="http://utah-glx.sf.net" target="_top">http://utah-glx.sf.net</a> for details about how to
 
521
install it.
 
522
</p><p>
 
523
XFree86(DRI) 4.0.3 or later supports OpenGL with Matrox and Radeon cards,
 
524
4.2.0 or later supports Rage128.
 
525
See <a href="http://dri.sf.net" target="_top">http://dri.sf.net</a> for download and installation
 
526
instructions.
 
527
</p><p>
 
528
A hint from one of our users: the GL video output can be used to get
 
529
vsynced TV output. You'll have to set an environment variable (at
 
530
least on nVidia):
 
531
</p><p>
 
532
<span><strong class="command">export $__GL_SYNC_TO_VBLANK=1</strong></span>
 
533
</p></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="aalib"></a>6.2.9. AAlib - text mode displaying</h3></div></div></div><p>
 
534
AAlib is a library for displaying graphics in text mode, using powerful
 
535
ASCII renderer. There are <span class="emphasis"><em>lots</em></span> of programs already
 
536
supporting it, like Doom, Quake, etc. <span class="application">MPlayer</span>
 
537
contains a very usable driver for it. If <tt class="filename">./configure</tt>
 
538
detects aalib installed, the aalib libvo driver will be built.
 
539
</p><p>
 
540
You can use some keys in the AA Window to change rendering options:
 
541
</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Key</th><th>Action</th></tr></thead><tbody><tr><td><span class="keycap"><b>1</b></span></td><td>
 
542
  decrease contrast
 
543
  </td></tr><tr><td><span class="keycap"><b>2</b></span></td><td>
 
544
  increase contrast
 
545
  </td></tr><tr><td><span class="keycap"><b>3</b></span></td><td>
 
546
  decrease brightness
 
547
  </td></tr><tr><td><span class="keycap"><b>4</b></span></td><td>
 
548
  increase brightness
 
549
  </td></tr><tr><td><span class="keycap"><b>5</b></span></td><td>
 
550
  switch fast rendering on/off
 
551
  </td></tr><tr><td><span class="keycap"><b>6</b></span></td><td>
 
552
  set dithering mode (none, error distribution, Floyd Steinberg)
 
553
  </td></tr><tr><td><span class="keycap"><b>7</b></span></td><td>
 
554
  invert image
 
555
  </td></tr><tr><td><span class="keycap"><b>8</b></span></td><td>
 
556
  toggles between aa and <span class="application">MPlayer</span> control
 
557
  </td></tr></tbody></table></div><div class="variablelist"><p class="title"><b>The following command line options can be used:</b></p><dl><dt><span class="term"><tt class="option">-aaosdcolor=<em class="replaceable"><code>V</code></em></tt></span></dt><dd><p>
 
558
    change OSD color
 
559
    </p></dd><dt><span class="term"><tt class="option">-aasubcolor=<em class="replaceable"><code>V</code></em></tt></span></dt><dd><p>
 
560
    change subtitle color
 
561
    </p><p>
 
562
    where <em class="replaceable"><code>V</code></em> can be:
 
563
    <code class="literal">0</code> (normal),
 
564
    <code class="literal">1</code> (dark),
 
565
    <code class="literal">2</code> (bold),
 
566
    <code class="literal">3</code> (bold font),
 
567
    <code class="literal">4</code> (reverse),
 
568
    <code class="literal">5</code> (special).
 
569
    </p></dd></dl></div><div class="variablelist"><p class="title"><b>AAlib itself provides a large sum of options. Here are some
 
570
important:</b></p><dl><dt><span class="term"><tt class="option">-aadriver</tt></span></dt><dd>
 
571
    set recommended aa driver (X11, curses, Linux)
 
572
    </dd><dt><span class="term"><tt class="option">-aaextended</tt></span></dt><dd>
 
573
    use all 256 characters
 
574
    </dd><dt><span class="term"><tt class="option">-aaeight</tt></span></dt><dd>
 
575
    use eight bit ASCII
 
576
    </dd><dt><span class="term"><tt class="option">-aahelp</tt></span></dt><dd>
 
577
    prints out all aalib options
 
578
    </dd></dl></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">���������</h3><p>
 
579
The rendering is very CPU intensive, especially when using AA-on-X
 
580
(using aalib on X), and it's least CPU intensive on standard,
 
581
non-framebuffer console. Use SVGATextMode to set up a big textmode,
 
582
then enjoy! (secondary head Hercules cards rock :)) (but IMHO you
 
583
can use <tt class="option">-vf 1bpp</tt> option to get graphics on hgafb:)
 
584
</p></div><p>
 
585
Use the <tt class="option">-framedrop</tt> option if your computer isn't fast
 
586
enough to render all frames!
 
587
</p><p>
 
588
Playing on terminal you'll get better speed and quality using the Linux
 
589
driver, not curses (<tt class="option">-aadriver linux</tt>). But therefore you
 
590
need write access on
 
591
<tt class="filename">/dev/vcsa<em class="replaceable"><code>&lt;terminal&gt;</code></em></tt>!
 
592
That isn't autodetected by aalib, but vo_aa tries to find the best mode.
 
593
See <a href="http://aa-project.sf.net/tune" target="_top">http://aa-project.sf.net/tune</a> for further
 
594
tuning issues.
 
595
</p></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="caca"></a>6.2.10. <code class="systemitem">libcaca</code> - Color ASCII Art library</h3></div></div></div><p>
 
596
The <a href="http://sam.zoy.org/projects/libcaca/" target="_top"><code class="systemitem">libcaca</code></a>
 
597
library is a graphics library that outputs text instead of pixels, so that it
 
598
can work on older video cards or text terminals. It is not unlike the famous
 
599
<code class="systemitem">AAlib</code> library.
 
600
<code class="systemitem">libcaca</code> needs a terminal to work, thus
 
601
it should work on all Unix systems (including Mac OS X) using either the
 
602
<code class="systemitem">slang</code> library or the
 
603
<code class="systemitem">ncurses</code> library, on DOS using the
 
604
<code class="systemitem">conio.h</code> library, and on Windows systems
 
605
using either <code class="systemitem">slang</code> or
 
606
<code class="systemitem">ncurses</code> (through Cygwin emulation) or
 
607
<code class="systemitem">conio.h</code>. If
 
608
<tt class="filename">./configure</tt>
 
609
detects <code class="systemitem">libcaca</code>, the caca libvo driver
 
610
will be built.
 
611
</p><div class="itemizedlist"><p class="title"><b>The differences with <code class="systemitem">AAlib</code> are
 
612
  the following:</b></p><ul type="disc"><li>
 
613
   16 available colors for character output (256 color pairs)
 
614
  </li><li>
 
615
   color image dithering
 
616
  </li></ul></div><div class="itemizedlist"><p class="title"><b>But <code class="systemitem">libcaca</code> also has the
 
617
  following limitations:</b></p><ul type="disc"><li>
 
618
   no support for brightness, contrast, gamma
 
619
  </li></ul></div><p>
 
620
You can use some keys in the caca window to change rendering options:
 
621
</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Key</th><th>Action</th></tr></thead><tbody><tr><td><span class="keycap"><b>d</b></span></td><td>
 
622
  Toggle <code class="systemitem">libcaca</code> dithering methods.
 
623
  </td></tr><tr><td><span class="keycap"><b>a</b></span></td><td>
 
624
  Toggle <code class="systemitem">libcaca</code> antialiasing.
 
625
  </td></tr><tr><td><span class="keycap"><b>b</b></span></td><td>
 
626
  Toggle <code class="systemitem">libcaca</code> background.
 
627
  </td></tr></tbody></table></div><div class="variablelist"><p class="title"><b><code class="systemitem">libcaca</code> will also look for certain environment variables:</b></p><dl><dt><span class="term"><tt class="option">CACA_DRIVER</tt></span></dt><dd>
 
628
    Set recommended caca driver. e.g. ncurses, slang, x11.
 
629
    </dd><dt><span class="term"><tt class="option">CACA_GEOMETRY (X11 only)</tt></span></dt><dd>
 
630
    Specifies the number of rows and columns. e.g. 128x50.
 
631
    </dd><dt><span class="term"><tt class="option">CACA_FONT (X11 only)</tt></span></dt><dd>
 
632
    Specifies the font to use. e.g. fixed, nexus.
 
633
    </dd></dl></div><p>
 
634
Use the <tt class="option">-framedrop</tt> option if your computer is not fast
 
635
enough to render all frames.
 
636
</p></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="vesa"></a>6.2.11. VESA - output to VESA BIOS</h3></div></div></div><p>
 
637
This driver was designed and introduced as a <span class="bold"><strong>generic
 
638
driver</strong></span> for any video card which has VESA VBE 2.0 compatible
 
639
BIOS. Another advantage of this driver is that it tries to force TV output
 
640
on.
 
641
<em class="citetitle">VESA BIOS EXTENSION (VBE) Version 3.0 Date: September 16,
 
642
1998</em> (Page 70) says:
 
643
</p><div class="blockquote"><blockquote class="blockquote"><p><b>Dual-Controller Designs.�</b>
 
644
VBE 3.0 supports the dual-controller design by assuming that since both
 
645
controllers are typically provided by the same OEM, under control of a
 
646
single BIOS ROM on the same graphics card, it is possible to hide the fact
 
647
that two controllers are indeed present from the application. This has the
 
648
limitation of preventing simultaneous use of the independent controllers,
 
649
but allows applications released before VBE 3.0 to operate normally. The
 
650
VBE Function 00h (Return Controller Information) returns the combined
 
651
information of both controllers, including the combined list of available
 
652
modes. When the application selects a mode, the appropriate controller is
 
653
activated. Each of the remaining VBE functions then operates on the active
 
654
controller.
 
655
</p></blockquote></div><p>
 
656
So you have chances to get working TV-out by using this driver.
 
657
(I guess that TV-out frequently is standalone head or standalone output
 
658
at least.)
 
659
</p><div class="itemizedlist"><p class="title"><b>ADVANTAGES</b></p><ul type="disc" compact><li>
 
660
  You have chances to watch movies <span class="bold"><strong>if Linux even doesn't
 
661
  know</strong></span> your video hardware.
 
662
  </li><li>
 
663
  You don't need to have installed any graphics' related things on your
 
664
  Linux (like X11 (AKA XFree86), fbdev and so on). This driver can be run
 
665
  from <span class="bold"><strong>text-mode</strong></span>.
 
666
  </li><li>
 
667
  You have chances to get <span class="bold"><strong>working TV-out</strong></span>.
 
668
  (It's known at least for ATI's cards).
 
669
  </li><li>
 
670
  This driver calls <code class="function">int 10h</code> handler thus it's not
 
671
  an emulator - it calls <span class="bold"><strong>real</strong></span> things of
 
672
  <span class="emphasis"><em>real</em></span> BIOS in <span class="emphasis"><em>real-mode</em></span>
 
673
  (actually in vm86 mode).
 
674
  </li><li>
 
675
  You can use VIDIX with it, thus getting accelerated video display
 
676
  <span class="bold"><strong>and</strong></span> TV output at the same time!
 
677
  (Recommended for ATI cards.)
 
678
  </li><li>
 
679
  If you have VESA VBE 3.0+, and you had specified
 
680
  <tt class="option">monitor-hfreq, monitor-vfreq, monitor-dotclock</tt> somewhere
 
681
  (config file, or command line) you will get the highest possible refresh rate.
 
682
  (Using General Timing Formula). To enable this feature you have to specify
 
683
  <span class="bold"><strong>all</strong></span> your monitor options.
 
684
  </li></ul></div><div class="itemizedlist"><p class="title"><b>DISADVANTAGES</b></p><ul type="disc" compact><li>
 
685
   It works only on <span class="bold"><strong>x86 systems</strong></span>.
 
686
  </li><li>
 
687
  It can be used only by <code class="systemitem">root</code>.
 
688
  </li><li>
 
689
  Currently it's available only for <span class="bold"><strong>Linux</strong></span>.
 
690
  </li></ul></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">�����</h3><p>
 
691
Don't use this driver with <span class="bold"><strong>GCC 2.96</strong></span>!
 
692
It won't work!
 
693
</p></div><div class="variablelist"><p class="title"><b>COMMAND LINE OPTIONS AVAILABLE FOR VESA</b></p><dl><dt><span class="term"><tt class="option">-vo vesa:<em class="replaceable"><code>opts</code></em></tt></span></dt><dd>
 
694
    currently recognized: <code class="literal">dga</code> to force dga mode and
 
695
    <code class="literal">nodga</code> to disable dga mode. In dga mode you can enable
 
696
    double buffering via the <tt class="option">-double</tt> option. Note: you may omit
 
697
    these parameters to enable <span class="bold"><strong>autodetection</strong></span> of
 
698
    dga mode.
 
699
    </dd></dl></div><div class="itemizedlist"><p class="title"><b>KNOWN PROBLEMS AND WORKAROUNDS</b></p><ul type="disc" compact><li>
 
700
  If you have installed <span class="bold"><strong>NLS</strong></span> font on your
 
701
  Linux box and run VESA driver from text-mode then after terminating
 
702
  <span class="application">MPlayer</span> you will have
 
703
  <span class="bold"><strong>ROM font</strong></span> loaded instead of national.
 
704
  You can load national font again by using <span><strong class="command">setsysfont</strong></span>
 
705
  utility from the Mandrake/Mandriva distribution for example.
 
706
  (<span class="bold"><strong>Hint</strong></span>: The same utility is used for
 
707
  localization of fbdev).
 
708
  </li><li>
 
709
  Some <span class="bold"><strong>Linux graphics drivers</strong></span> don't update
 
710
  active <span class="bold"><strong>BIOS mode</strong></span> in DOS memory.
 
711
  So if you have such problem - always use VESA driver only from
 
712
  <span class="bold"><strong>text-mode</strong></span>. Otherwise text-mode (#03) will
 
713
  be activated anyway and you will need restart your computer.
 
714
  </li><li>
 
715
  Often after terminating VESA driver you get <span class="bold"><strong>black</strong></span>
 
716
  screen. To return your screen to original state - simply switch to other console
 
717
  (by pressing <span class="keycap"><b>Alt</b></span>+<span class="keycap"><b>F&lt;x&gt;</b></span>)
 
718
  then switch to your previous console by the same way.
 
719
  </li><li>
 
720
  To get <span class="bold"><strong>working TV-out</strong></span> you need have plugged
 
721
  TV-connector in before booting your PC since video BIOS initializes
 
722
  itself only once during POST procedure.
 
723
  </li></ul></div></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="x11"></a>6.2.12. X11</h3></div></div></div><p>
 
724
Avoid if possible. Outputs to X11 (uses shared memory extension), with no
 
725
hardware acceleration at all. Supports (MMX/3DNow/SSE accelerated, but
 
726
still slow) software scaling, use the options <tt class="option">-fs -zoom</tt>.
 
727
Most cards have hardware scaling support, use the <tt class="option">-vo xv</tt>
 
728
output for them, or <tt class="option">-vo xmga</tt> for Matrox cards.
 
729
</p><p>
 
730
The problem is that most cards' driver doesn't support hardware
 
731
acceleration on the second head/TV. In those cases, you see green/blue
 
732
colored window instead of the movie. This is where this driver comes in
 
733
handy, but you need powerful CPU to use software scaling. Don't use the SDL
 
734
driver's software output+scaler, it has worse image quality!
 
735
</p><p>
 
736
Software scaling is very slow, you better try changing video modes instead.
 
737
It's very simple. See the <a href="output-trad.html#dga-modelines">DGA section's
 
738
modelines</a>, and insert them into your <tt class="filename">XF86Config</tt>.
 
739
 
 
740
</p><div class="itemizedlist"><ul type="disc" compact><li>
 
741
  If you have XFree86 4.x.x: use the <tt class="option">-vm</tt> option. It will
 
742
  change to a resolution your movie fits in. If it doesn't:
 
743
  </li><li>
 
744
  With XFree86 3.x.x: you have to cycle through available resolutions
 
745
  with the
 
746
  <span class="keycap"><b>Ctrl</b></span>+<span class="keycap"><b>Alt</b></span>+<span class="keycap"><b>plus</b></span>
 
747
  and
 
748
  <span class="keycap"><b>Ctrl</b></span>+<span class="keycap"><b>Alt</b></span>+<span class="keycap"><b>minus</b></span>
 
749
  keys.
 
750
  </li></ul></div><p>
 
751
</p><p>
 
752
If you can't find the modes you inserted, browse XFree86's output. Some
 
753
drivers can't use low pixelclocks that are needed for low resolution
 
754
video modes.
 
755
</p></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="vidix"></a>6.2.13. VIDIX</h3></div></div></div><p><b>PREAMBLE.�</b>
 
756
<span class="acronym">VIDIX</span> is the abbreviation for <span class="bold"><strong>VID</strong></span>eo
 
757
<span class="bold"><strong>I</strong></span>nterface for *ni<span class="bold"><strong>X</strong></span>.
 
758
VIDIX was designed and introduced as an interface for fast user-space drivers
 
759
providing such video performance as mga_vid does for Matrox cards. It's also very
 
760
portable.
 
761
</p><p>
 
762
This interface was designed as an attempt to fit existing video
 
763
acceleration interfaces (known as mga_vid, rage128_vid, radeon_vid,
 
764
pm3_vid) into a fixed scheme. It provides a high level interface to chips
 
765
which are known as BES (BackEnd scalers) or OV (Video Overlays). It doesn't
 
766
provide low level interface to things which are known as graphics servers.
 
767
(I don't want to compete with X11 team in graphics mode switching). I.e.
 
768
main goal of this interface is to maximize the speed of video playback.
 
769
</p><div class="itemizedlist"><p class="title"><b>USAGE</b></p><ul type="disc" compact><li>
 
770
  You can use standalone video output driver: <tt class="option">-vo xvidix</tt>.
 
771
  This driver was developed as X11's front end to VIDIX technology. It
 
772
  requires X server and can work only under X server. Note that, as it directly
 
773
  accesses the hardware and circumvents the X driver, pixmaps cached in the
 
774
  graphics card's memory may be corrupted. You can prevent this by limiting
 
775
  the amount of video memory used by X with the XF86Config option "VideoRam"
 
776
  in the device section. You should set this to the amount of memory installed
 
777
  on your card minus 4MB. If you have less than 8MB of video ram, you can use
 
778
  the option "XaaNoPixmapCache" in the screen section instead.
 
779
  </li><li>
 
780
  There is a console VIDIX driver: <tt class="option">-vo cvidix</tt>.
 
781
  This requires a working and initialized framebuffer for most cards (or else
 
782
  you'll just mess up the screen), and you'll have a similar effect as with
 
783
  <tt class="option">-vo mga</tt> or <tt class="option">-vo fbdev</tt>. nVidia cards however
 
784
  are able to output truly graphical video on a real text console. See the
 
785
  <a href="output-trad.html#vidix-nvidia" title="6.2.13.5. nVidia cards">nvidia_vid</a> section for more information.
 
786
  </li><li>
 
787
  You can use VIDIX subdevice which was applied to several video output
 
788
  drivers, such as: <tt class="option">-vo vesa:vidix</tt>
 
789
  (<span class="bold"><strong>Linux only</strong></span>) and
 
790
  <tt class="option">-vo fbdev:vidix</tt>.
 
791
  </li></ul></div><p>
 
792
Indeed it doesn't matter which video output driver is used with
 
793
<span class="bold"><strong>VIDIX</strong></span>.
 
794
</p><div class="itemizedlist"><p class="title"><b>REQUIREMENTS</b></p><ul type="disc" compact><li>
 
795
  Video card should be in graphics mode (except nVidia cards with the
 
796
  <tt class="option">-vo cvidix</tt> output driver).
 
797
  </li><li>
 
798
  <span class="application">MPlayer</span>'s video output driver should know
 
799
  active video mode and be able to tell to VIDIX subdevice some video
 
800
  characteristics of server.
 
801
  </li></ul></div><p><b>USAGE METHODS.�</b>
 
802
When VIDIX is used as <span class="bold"><strong>subdevice</strong></span> (<tt class="option">-vo
 
803
vesa:vidix</tt>) then video mode configuration is performed by video
 
804
output device (<span class="bold"><strong>vo_server</strong></span> in short). Therefore you can
 
805
pass into command line of <span class="application">MPlayer</span> the same keys
 
806
as for vo_server. In addition it understands <tt class="option">-double</tt> key
 
807
as globally visible parameter. (I recommend using this key with VIDIX at
 
808
least for ATI's card). As for <tt class="option">-vo xvidix</tt>, currently it
 
809
recognizes the following options: <tt class="option">-fs -zoom -x -y -double</tt>.
 
810
</p><p>
 
811
Also you can specify VIDIX's driver directly as third subargument in
 
812
command line:
 
813
 
 
814
</p><pre class="screen">mplayer -vo xvidix:mga_vid.so -fs -zoom -double <em class="replaceable"><code>file.avi</code></em></pre><p>
 
815
or
 
816
</p><pre class="screen">mplayer -vo vesa:vidix:radeon_vid.so -fs -zoom -double -bpp 32 <em class="replaceable"><code>file.avi</code></em></pre><p>
 
817
 
 
818
But it's dangerous, and you shouldn't do that. In this case given driver
 
819
will be forced and result is unpredictable (it may
 
820
<span class="bold"><strong>freeze</strong></span> your computer). You should do that
 
821
ONLY if you are absolutely sure it will work, and
 
822
<span class="application">MPlayer</span> doesn't do it automatically. Please tell
 
823
about it to the developers. The right way is to use VIDIX without arguments
 
824
to enable driver autodetection.
 
825
</p><p>
 
826
VIDIX is new technology and it's extremely possible that on your
 
827
system it won't work. In this case only solution for you
 
828
it's port it (mainly libdha). But there is hope that it will work on those
 
829
systems where X11 does.
 
830
</p><p>
 
831
Since VIDIX requires direct hardware access you can either run it as root
 
832
or set the SUID bit on the <span class="application">MPlayer</span> binary
 
833
(<span class="bold"><strong>Warning: This is a security risk!</strong></span>).
 
834
Alternatively, you can use a special kernel module, like this:
 
835
</p><div class="procedure"><ol type="1"><li><p>
 
836
  Download the <a href="http://www.arava.co.il/matan/svgalib/" target="_top">development version</a>
 
837
  of svgalib (for example 1.9.17), <span class="bold"><strong>OR</strong></span>
 
838
  download a version made by Alex especially for usage with <span class="application">MPlayer</span>
 
839
  (it doesn't need the svgalib source to compile) from
 
840
  <a href="http://www.mplayerhq.hu/MPlayer/contrib/svgalib/svgalib_helper-1.9.17-mplayer.tar.bz2" target="_top">here</a>.
 
841
  </p></li><li><p>
 
842
  Compile the module in the <tt class="filename">svgalib_helper</tt>
 
843
  directory (it can be found inside the <tt class="filename">svgalib-1.9.17/kernel/</tt>
 
844
  directory if you've downloaded the source from the svgalib site) and insmod it.
 
845
  </p></li><li><p>
 
846
  To create the necessary devices in the <tt class="filename">/dev</tt>
 
847
  directory, do a </p><pre class="screen">make device</pre><p> in the <tt class="filename">svgalib_helper</tt>
 
848
  dir, as root.
 
849
  </p></li><li><p>
 
850
  Move the <tt class="filename">svgalib_helper</tt> directory to
 
851
  <tt class="filename">mplayer/main/libdha/svgalib_helper</tt>.
 
852
  </p></li><li><p>
 
853
  Required if you download the source from the svgalib site: Remove the comment before the
 
854
  CFLAGS line containing "svgalib_helper" string from the
 
855
  <tt class="filename">libdha/Makefile</tt>.
 
856
  </p></li><li><p>
 
857
  Recompile and install libdha.
 
858
  </p></li></ol></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="vidix-ati"></a>6.2.13.1. ATI cards</h4></div></div></div><p>
 
859
Currently most ATI cards are supported natively, from Mach64 to the
 
860
newest Radeons.
 
861
</p><p>
 
862
There are two compiled binaries: <tt class="filename">radeon_vid</tt> for Radeon and
 
863
<tt class="filename">rage128_vid</tt> for Rage 128 cards. You may force one or let
 
864
the VIDIX system autoprobe all available drivers.
 
865
</p></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="vidix-mga"></a>6.2.13.2. Matrox cards</h4></div></div></div><p>
 
866
Matrox G200, G400, G450 and G550 have been reported to work.
 
867
</p><p>
 
868
The driver supports video equalizers and should be nearly as fast as the
 
869
<a href="output-trad.html#mga_vid" title="6.2.6. Matrox framebuffer (mga_vid)">Matrox framebuffer</a>
 
870
</p></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="vidix-trident"></a>6.2.13.3. Trident cards</h4></div></div></div><p>
 
871
There is a driver available for the Trident Cyberblade/i1 chipset, which
 
872
can be found on VIA Epia motherboards.
 
873
</p><p>
 
874
The driver was written and is maintained by
 
875
<a href="http://www.blackfiveservices.co.uk/EPIAVidix.shtml" target="_top">Alastair M. Robinson</a>
 
876
</p></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="vidix-3dlabs"></a>6.2.13.4. 3DLabs cards</h4></div></div></div><p>
 
877
Although there is a driver for the 3DLabs GLINT R3 and Permedia3 chips, no one
 
878
has tested it, so reports are welcome.
 
879
</p></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="vidix-nvidia"></a>6.2.13.5. nVidia cards</h4></div></div></div><p>
 
880
There's a relatively new nVidia driver out there, it's known to work on Riva
 
881
128, TNT and GeForce2 chipsets, also others have been reported working.
 
882
</p><div class="itemizedlist"><p class="title"><b>LIMITATIONS</b></p><ul type="disc" compact><li><p>
 
883
  It's recommended to use the binary nVidia drivers for X before using this
 
884
  VIDIX driver, because some of the registers which need to be initialized
 
885
  haven't been discovered yet, so it will probably fail with the Open Source
 
886
  XFree86 <tt class="filename">nv.o</tt> driver.
 
887
  </p></li><li><p>
 
888
  Currently only codecs capable of UYVY colorspace output
 
889
  can work in conjunction with this driver. Unfortunately, this excludes
 
890
  every single decoder from the
 
891
  <code class="systemitem">libavcodec</code> family. This leaves
 
892
  us with the following usable popular codecs:
 
893
  <code class="systemitem">cvid, divxds, xvid, divx4, wmv7, wmv8</code> and some
 
894
  others. Please note that this is only
 
895
  a temporal inconvenience. The usage syntax is as follows:
 
896
  </p><pre class="screen">
 
897
    mplayer -vf format=uyvy -vc divxds <em class="replaceable"><code>divx3file.avi</code></em>
 
898
  </pre><p>
 
899
  </p></li></ul></div><p>
 
900
  An unique feature of the nvidia_vid driver is its ability to display video on
 
901
  <span class="bold"><strong>plain, pure, text-only console</strong></span> - with no
 
902
  framebuffer or X magic whatsoever. For this purpose, we'll have to use the
 
903
  <tt class="option">cvidix</tt> video output, as the following example shows:
 
904
  </p><pre class="screen">
 
905
    mplayer -vf format=uyvy -vc divxds -vo cvidix <em class="replaceable"><code>example.avi</code></em>
 
906
  </pre><p>
 
907
</p><p>
 
908
Reports awaited!
 
909
</p></div><div class="sect3" lang="ru"><div class="titlepage"><div><div><h4 class="title"><a name="vidix-sis"></a>6.2.13.6. SiS cards</h4></div></div></div><p>
 
910
This is very experimental code, just like nvidia_vid.
 
911
</p><p>
 
912
It's been tested on SiS 650/651/740 (the most common chipsets used in the
 
913
SiS versions of the "Shuttle XPC" barebones boxes out there)
 
914
</p><p>
 
915
Reports awaited!
 
916
</p></div></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="directfb"></a>6.2.14. DirectFB</h3></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
 
917
"DirectFB is a graphics library which was designed with embedded systems
 
918
in mind. It offers maximum hardware accelerated performance at a minimum
 
919
of resource usage and overhead." - quoted from <a href="http://www.directfb.org" target="_top">http://www.directfb.org</a>
 
920
</p></blockquote></div><p>I'll exclude DirectFB features from this section.</p><p>
 
921
Though <span class="application">MPlayer</span> is not supported as a "video
 
922
provider" in DirectFB, this output driver will enable video playback through
 
923
DirectFB. It will - of course - be accelerated, on my Matrox G400 DirectFB's speed
 
924
was the same as XVideo.
 
925
</p><p>
 
926
Always try to use the newest version of DirectFB. You can use DirectFB options on
 
927
the command line, using the <tt class="option">-dfbopts</tt> option. Layer selection can
 
928
be done by the subdevice method, e.g.: <tt class="option">-vo directfb:2</tt>
 
929
(layer -1 is default: autodetect)
 
930
</p></div><div class="sect2" lang="ru"><div class="titlepage"><div><div><h3 class="title"><a name="dfbmga"></a>6.2.15. DirectFB/Matrox (dfbmga)</h3></div></div></div><p>
 
931
Please read the <a href="output-trad.html#directfb" title="6.2.14. DirectFB">main DirectFB</a> section for general
 
932
information.
 
933
</p><p>
 
934
This video output driver will enable CRTC2 (on the second head) on Matrox
 
935
G400/G450/G550 cards, displaying video
 
936
<span class="bold"><strong>independent</strong></span> of the first head.
 
937
</p><p>
 
938
Ville Syrjala's has a
 
939
<a href="http://www.sci.fi/~syrjala/directfb/Matrox_TV-out_README.txt" target="_top">README</a>
 
940
and a
 
941
<a href="http://www.sci.fi/~syrjala/directfb/matrox-tv-out-howto" target="_top">HOWTO</a>
 
942
on his homepage that explain how to make DirectFB TV output run on Matrox cards.
 
943
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">���������</h3><p>
 
944
the first DirectFB version with which we could get this working was
 
945
0.9.17 (it's buggy, needs that <code class="systemitem">surfacemanager</code>
 
946
patch from the URL above). Porting the CRTC2 code to
 
947
<a href="output-trad.html#mga_vid" title="6.2.6. Matrox framebuffer (mga_vid)">mga_vid</a> has been planned for years,
 
948
<a href="../../tech/patches.txt" target="_top">patches</a> are welcome.
 
949
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mtrr.html">����.</a>�</td><td width="20%" align="center"><a accesskey="u" href="video.html">������� ����</a></td><td width="40%" align="right">�<a accesskey="n" href="mpeg_decoders.html">����.</a></td></tr><tr><td width="40%" align="left" valign="top">6.1. Setting up MTRR�</td><td width="20%" align="center"><a accesskey="h" href="index.html">������</a></td><td width="40%" align="right" valign="top">�6.3. MPEG decoders</td></tr></table></div></body></html>