diff options
author | nicolas <nicolas@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-03-23 23:35:12 +0000 |
---|---|---|
committer | nicolas <nicolas@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-03-23 23:35:12 +0000 |
commit | 413a60419542895a13fa54640b44e074df8de162 (patch) | |
tree | 6f4940f2ac5bf154f5586f7436d6cca12546ec1c /DOCS/xml/en/video.xml | |
parent | 5b1bd414021a75c10bcff405266df99f729a91da (diff) | |
download | mpv-413a60419542895a13fa54640b44e074df8de162.tar.bz2 mpv-413a60419542895a13fa54640b44e074df8de162.tar.xz |
XML version of MPlayer's doc
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9676 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'DOCS/xml/en/video.xml')
-rw-r--r-- | DOCS/xml/en/video.xml | 2141 |
1 files changed, 2141 insertions, 0 deletions
diff --git a/DOCS/xml/en/video.xml b/DOCS/xml/en/video.xml new file mode 100644 index 0000000000..bf55bc8981 --- /dev/null +++ b/DOCS/xml/en/video.xml @@ -0,0 +1,2141 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<sect2 id="video-dev"> +<title>Video output devices</title> + +<sect3 id="mtrr"> +<title>Setting up MTRR</title> + +<para> +It is VERY recommended to check if the MTRR registers +are set up properly, because they can give a big performance boost. +</para> + +<para> +Do a <command>/proc/mtrr</command>: +<screen> +<prompt>--($:~)--</prompt> cat /proc/mtrr +reg00: base=0xe4000000 (3648MB), size= 16MB: write-combining, count=9 +reg01: base=0xd8000000 (3456MB), size= 128MB: write-combining, count=1<!-- +--></screen> +</para> + +<para> +It's right, shows my Matrox G400 with 16MB memory. I did this from +XFree 4.x.x , which sets up MTRR registers automatically. +</para> + +<para> +If nothing worked, you have to do it manually. First, you have to find the +base address. You have 3 ways to find it: + +<orderedlist> +<listitem><para> + from X11 startup messages, for example: + <screen> +(--) SVGA: PCI: Matrox MGA G400 AGP rev 4, Memory @ 0xd8000000, 0xd4000000 +(--) SVGA: Linear framebuffer at 0xD8000000<!-- +--></screen> + </para></listitem> +<listitem><para> + from <filename>/proc/pci</filename> (use <command>lspci -v</command> + command): + <screen> +01:00.0 VGA compatible controller: Matrox Graphics, Inc.: Unknown device 0525 +Memory at d8000000 (32-bit, prefetchable) + </screen> + </para></listitem> +<listitem><para> + from mga_vid kernel driver messages (use <command>dmesg</command>): + <screen>mga_mem_base = d8000000</screen> + </para></listitem> +</orderedlist> +</para> + +<para> +Then let's find the memory size. This is very easy, just convert video RAM +size to hexadecimal, or use this table: +<informaltable frame="none"> +<tgroup cols="2"> +<tbody> +<row><entry>1 MB</entry><entry>0x100000</entry></row> +<row><entry>2 MB</entry><entry>0x200000</entry></row> +<row><entry>4 MB</entry><entry>0x400000</entry></row> +<row><entry>8 MB</entry><entry>0x800000</entry></row> +<row><entry>16 MB</entry><entry>0x1000000</entry></row> +<row><entry>32 MB</entry><entry>0x2000000</entry></row> +</tbody> +</tgroup> +</informaltable> +</para> + +<para> +You know base address and memory size, let's setup MTRR registers! +For example, for the Matrox card above (<literal>base=0xd8000000</literal>) +with 32MB ram (<literal>size=0x2000000</literal>) just execute: +<screen> +echo "base=0xd8000000 size=0x2000000 type=write-combining" >| /proc/mtrr +</screen> +</para> + +<para> +Not all CPUs support MTRRs. For example older K6-2's (around 266MHz, +stepping 0) doesn't support MTRR, but stepping 12's do (<command>cat /proc/cpuinfo +</command> to check it). +</para> +</sect3> + +<sect3 id="output-trad"> +<title>Video outputs for traditional video cards</title> +<sect4 id="xv"> +<title>Xv</title> + +<para> +Under XFree86 4.0.2 or newer, you can use your card's hardware YUV routines +using the XVideo extension. This is what the option '<option>-vo +xv</option>' uses. Also, this is driver supports adjusting +brightness/contrast/hue/etc (unless you use the old, slow DirectShow DivX +codec, which supports it everywhere), see the man page. +</para> + +<para> +In order to make this work, be sure to check the following: + +<orderedlist> +<listitem><para> + You have to use XFree86 4.0.2 or newer (former versions don't have XVideo) + </para></listitem> +<listitem><para> + Your card actually supports hardware acceleration (modern cards do) + </para></listitem> +<listitem><para> + X loads the XVideo extension, it's something like this: + <programlisting>(II) Loading extension XVideo</programlisting> + in <filename>/var/log/XFree86.0.log</filename> + <note><para> + This loads only the XFree86's extension. In a good install, this is + always loaded, and doesn't mean that the <emphasis role="bold">card's</emphasis> + XVideo support is loaded! + </para></note> + </para></listitem> +<listitem><para> + Your card has Xv support under Linux. To check, try + <command>xvinfo</command>, it is the part of the XFree86 distribution. It + should display a long text, similar to this: + <screen> +X-Video Extension version 2.2 +screen #0 + Adaptor #0: "Savage Streams Engine" + number of ports: 1 + port base: 43 + operations supported: PutImage + supported visuals: + depth 16, visualID 0x22 + depth 16, visualID 0x23 + number of attributes: 5 +(...) + Number of image formats: 7 + id: 0x32595559 (YUY2) + guid: 59555932-0000-0010-8000-00aa00389b71 + bits per pixel: 16 + number of planes: 1 + type: YUV (packed) + id: 0x32315659 (YV12) + guid: 59563132-0000-0010-8000-00aa00389b71 + bits per pixel: 12 + number of planes: 3 + type: YUV (planar) +(...etc...)<!-- +--></screen> + It must support YUY2 packed, and YV12 planar pixel formats to be usable + with <application>MPlayer</application>. + </para></listitem> +<listitem><para> + And finally, check if <application>MPlayer</application> was compiled + with 'xv' support. <filename>./configure</filename> prints this. + </para></listitem> +</orderedlist> +</para> + +<sect5 id="tdfx"> +<title>3dfx cards</title> + +<para> +Older 3dfx drivers were known to have problems with XVideo acceleration, it +didn't support either YUY2 or YV12, and so. Verify that you have XFree86 +version 4.2.0 or greater, it works OK with YV12 and YUY2. Previous +versions, including 4.1.0, <emphasis role="bold">crashes with YV12</emphasis>. +If you experience strange effects using -vo xv, try SDL (it has XVideo too) and +see if it helps. Check the <link linkend="sdl">SDL section</link> for details. +</para> + +<para> +<emphasis role="bold">OR</emphasis>, try the NEW +<option>-vo tdfxfb</option> driver! See the <link linkend="tdfxfb">tdfxfb</link> +section. +</para> +</sect5> + + +<sect5 id="s3"> +<title>S3 cards</title> + +<para> +S3 Savage3D's should work fine, but for Savage4, use XFree86 version 4.0.3 +or greater (in case of image problems, try 16bpp). As for S3 Virge: there is +xv support, but the card itself is very slow, so you better sell it. +</para> + +<note> +<para> +It's currently unclear which Savage models lack YV12 support, and convert by +driver (slow). If you suspect your card, get a newer driver, or ask politely +on the mplayer-users mailing list for an MMX/3DNow enabled driver. +</para> +</note> +</sect5> + + +<sect5 id="nvidia"> +<title>nVidia cards</title> + +<para> +nVidia isn't a very good choice under Linux (according to nVidia, this is +<link linkend="nvidia-opinions">not true</link>)... You'll have to use the +binary closed-source nVidia driver, available at nVidia's web site. The +standard XFree86 driver doesn't support XVideo for these cards, due to +nVidia's closed sources/specifications. +</para> + +<para> +As far as I know the latest XFree86 driver contains XVideo support for +GeForce 2 and 3. +</para> + +<para> +Riva128 cards don't have XVideo support even with the nVidia driver :( +Complain to nVidia. +</para> +</sect5> + + +<sect5 id="ati"> +<title>ATI cards</title> + +<para> +The <ulink url="http://www.linuxvideo.org/gatos">GATOS driver</ulink> +(which you should use, unless you have Rage128 or Radeon) has VSYNC enabled +by default. It means that decoding speed (!) is synced to the monitor's +refresh rate. If playing seems to be slow, try disabling VSYNC somehow, or +set refresh rate to a n*(fps of the movie) Hz. +</para> + +<para> +Radeon VE - currently only XFree86 CVS has driver for this card, version +4.1.0 doesn't. And no TV out support. Of course with +<application>MPlayer</application> you can +happily get <emphasis role="bold">accelerated</emphasis> display, with or without +<emphasis role="bold">TV output</emphasis>, and no libraries or X are needed. +Read the <link linkend="vidix">VIDIX</link> section. +</para> +</sect5> + + +<sect5 id="neomagic"> +<title>NeoMagic cards</title> + +<para> +These cards can be found in many laptops. Unfortunately, the driver in X +4.2.0 can't do Xv, but we have a modified, Xv-capable driver for you. +<ulink url="http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/neomagic_drv.o.4.2.0.bz2"> +Download from here</ulink>. +Driver provided by Stefan Seyfried. +</para> + +<para> +To allow playback of DVD sized content change your XF86Config like this: +<programlisting> +Section "Device" + [...] + Driver "neomagic" + <emphasis>Option "OverlayMem" "829440"</emphasis> + [...] +EndSection<!-- +--></programlisting> +</para> +</sect5> + + +<sect5 id="trident"> +<title>Trident cards</title> +<para> +If you want to use xv with a trident card, provided that it doesn't work +with 4.1.0, install XFree 4.2.0. 4.2.0 adds support for fullscreen xv +support with the Cyberblade XP card. +</para> +</sect5> + + +<sect5 id="kyro"> +<title>Kyro/PowerVR cards</title> +<para> +If you want to use Xv with a Kyro based card (for example Hercules +Prophet 4000XT), you should download the drivers from the +<ulink url="http://www.powervr.com/">PowerVR site</ulink> +</para> +</sect5> +</sect4> + +<!-- ********** --> + +<sect4 id="dga"> +<title>DGA</title> + +<formalpara> +<title>PREAMBLE</title> +<para> +This document tries to explain in some words what DGA is in general and +what the DGA video output driver for <application>MPlayer</application> +can do (and what it can't). +</para> +</formalpara> + +<formalpara> +<title>WHAT IS DGA</title> +<para> +<acronym>DGA</acronym> is short for <emphasis>Direct Graphics +Access</emphasis> and is a means for a program to bypass the X server and +directly modifying the framebuffer memory. Technically spoken this happens +by mapping the framebuffer memory into the memory range of your process. +This is allowed by the kernel only if you have superuser privileges. You +can get these either by logging in as <systemitem +class="username">root</systemitem> or by setting the SUID bit on the +<application>MPlayer</application> executable (<emphasis role="bold">not +recommended</emphasis>). +</para> +</formalpara> +<para> +There are two versions of DGA: DGA1 is used by XFree 3.x.x and DGA2 was +introduced with XFree 4.0.1. +</para> + +<para> +DGA1 provides only direct framebuffer access as described above. For +switching the resolution of the video signal you have to rely on the +XVidMode extension. +</para> + +<para> +DGA2 incorporates the features of XVidMode extension and also allows +switching the depth of the display. So you may, although basically +running a 32 bit depth X server, switch to a depth of 15 bits and vice +versa. +</para> + +<para> +However DGA has some drawbacks. It seems it is somewhat dependent on the +graphics chip you use and on the implementation of the X server's video +driver that controls this chip. So it does not work on every system... +</para> + +<formalpara> +<title>INSTALLING DGA SUPPORT FOR MPLAYER</title> + +<para> +First make sure X loads the DGA extension, see in +<filename>/var/log/XFree86.0.log</filename>: + +<programlisting>(II) Loading extension XFree86-DGA</programlisting> + +See, XFree86 4.0.x or greater is VERY RECOMMENDED! +<application>MPlayer</application>'s DGA driver is autodetected by +<filename>./configure</filename>, or you can force it +with <option>--enable-dga</option>. +</para> +</formalpara> + +<para> +If the driver couldn't switch to a smaller resolution, experiment with +options <option>-vm</option> (only with X 3.3.x), <option>-fs</option>, +<option>-bpp</option>, <option>-zoom</option> to find a video mode that +the movie fits in. There is no converter right now :( +</para> + +<para> +Become <systemitem class="username">root</systemitem>. DGA needs root +access to be able to write directly video memory. If you want to run it as +user, then install <application>MPlayer</application> SUID root: + +<screen> +chown root /usr/local/bin/mplayer +chmod 750 /usr/local/bin/mplayer +chmod +s /usr/local/bin/mplayer +</screen> + +Now it works as a simple user, too. +</para> + +<caution> +<title>Security risk</title> +<para> +This is a <emphasis role="bold">big</emphasis> security risk! Never do this +on a server or on a computer can be accessed by other people because they +can gain root privileges through SUID root +<application>MPlayer</application>. +</para> +</caution> + +<para> +Now use <option>-vo dga</option> option, and there you go! (hope so:) You +should also try if the <option>-vo sdl:dga</option> option works for you! +It's much faster! +</para> + + +<formalpara id="dga-modelines"> +<title>RESOLUTION SWITCHING</title> + +<para> +The DGA driver allows for switching the resolution of the output signal. +This avoids the need for doing (slow) software scaling and at the same time +provides a fullscreen image. Ideally it would switch to the exact +resolution (except for honoring aspect ratio) of the video data, but the X +server only allows switching to resolutions predefined in +<filename>/etc/X11/XF86Config</filename> +(<filename>/etc/X11/XF86Config-4</filename> for XFree 4.X.X respectively). +Those are defined by so-called modelines and depend on +the capabilities of your video hardware. The X server scans this config +file on startup and disables the modelines not suitable for your hardware. +You can find out which modes survive with the X11 log file. It can be found +at: <filename>/var/log/XFree86.0.log</filename>. +</para> +</formalpara> + +<para> +These entries are known to work fine with a Riva128 chip, using the nv.o X +server driver module. +</para> + + +<para><programlisting> +Section "Modes" + Identifier "Modes[0]" + Modeline "800x600" 40 800 840 968 1056 600 601 605 628 + Modeline "712x600" 35.0 712 740 850 900 400 410 412 425 + Modeline "640x480" 25.175 640 664 760 800 480 491 493 525 + Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan + Modeline "352x288" 25.10 352 368 416 432 288 296 290 310 + Modeline "352x240" 15.750 352 368 416 432 240 244 246 262 Doublescan + Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan +EndSection +</programlisting></para> + + +<formalpara> +<title>DGA & MPLAYER</title> +<para> +DGA is used in two places with <application>MPlayer</application>: The SDL +driver can be made to make use of it (<option>-vo sdl:dga</option>) and +within the DGA driver (<option>-vo dga</option>). The above said is true +for both; in the following sections I'll explain how the DGA driver for +<application>MPlayer</application> works. +</para> +</formalpara> + + +<formalpara> +<title>FEATURES</title> + +<para> +The DGA driver is invoked by specifying <option>-vo dga</option> at the +command line. The default behavior is to switch to a resolution matching +the original resolution of the video as close as possible. It deliberately +ignores the <option>-vm</option> and <option>-fs</option> options +(enabling of video mode switching and fullscreen) - it always tries to +cover as much area of your screen as possible by switching the video mode, +thus refraining to use a single additional cycle of your CPU to scale the +image. If you don't like the mode it chooses you may force it to choose +the mode matching closest the resolution you specify by <option>-x</option> +and <option>-y</option>. By providing the <option>-v</option> option, the +DGA driver will print, among a lot of other things, a list of all +resolutions supported by your current <filename>XF86Config</filename> file. +Having DGA2 you may also force it to use a certain depth by using the +<option>-bpp</option> option. Valid depths are 15, 16, 24 and 32. It +depends on your hardware whether these depths are natively supported or if +a (possibly slow) conversion has to be done. +</para> +</formalpara> +<para> +If you should be lucky enough to have enough offscreen memory left to +put a whole image there, the DGA driver will use doublebuffering, which +results in much smoother movie replaying. It will tell you whether +double-buffering is enabled or not. +</para> + +<para> +Doublebuffering means that the next frame of your video is being drawn in +some offscreen memory while the current frame is being displayed. When the +next frame is ready, the graphics chip is just told the location in memory +of the new frame and simply fetches the data to be displayed from there. +In the meantime the other buffer in memory will be filled again with new +video data. +</para> + +<para> +Doublebuffering may be switched on by using the option +<option>-double</option> and may be disabled with +<option>-nodouble</option>. Current default option is to disable +doublebuffering. When using the DGA driver, onscreen display (OSD) only +works with doublebuffering enabled. However, enabling doublebuffering may +result in a big speed penalty (on my K6-II+ 525 it used an additional 20% +of CPU time!) depending on the implementation of DGA for your hardware. +</para> + + +<formalpara> +<title>SPEED ISSUES</title> + +<para> +Generally spoken, DGA framebuffer access should be at least as fast as +using the X11 driver with the additional benefit of getting a fullscreen +image. The percentage speed values printed by +<application>MPlayer</application> have to be interpreted with some care, +as for example, with the X11 driver they do not include the time used by +the X server needed for the actual drawing. Hook a terminal to a serial +line of your box and start <command>top</command> to see what is really +going on in your box. +</para> +</formalpara> + +<para> +Generally spoken, the speedup done by using DGA against 'normal' use of X11 +highly depends on your graphics card and how well the X server module for it +is optimized. +</para> + +<para> +If you have a slow system, better use 15 or 16 bit depth since they require +only half the memory bandwidth of a 32 bit display. +</para> + +<para> +Using a depth of 24 bit is even a good idea if your card natively just supports +32 bit depth since it transfers 25% less data compared to the 32/32 mode. +</para> + +<para> +I've seen some AVI files already be replayed on a Pentium MMX 266. AMD K6-2 +CPUs might work at 400 MHZ and above. +</para> + + +<formalpara> +<title>KNOWN BUGS</title> + +<para> +Well, according to some developers of XFree, DGA is quite a beast. They +tell you better not to use it. Its implementation is not always flawless +with every chipset driver for XFree out there. +</para> +</formalpara> + +<itemizedlist> +<listitem><simpara> + With XFree 4.0.3 and <filename>nv.o</filename> there is a bug resulting + in strange colors. + </simpara></listitem> +<listitem><simpara> + ATI driver requires to switch mode back more than once after finishing + using of DGA. + </simpara></listitem> +<listitem><simpara> + Some drivers simply fail to switch back to normal resolution (use + <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>Keypad +</keycap> and + <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>Keypad -</keycap> + to switch back manually). + </simpara></listitem> +<listitem><simpara> + Some drivers simply display strange colors. + </simpara></listitem> +<listitem><simpara> + Some drivers lie about the amount of memory they map into the process's + address space, thus vo_dga won't use doublebuffering (SIS?). + </simpara></listitem> +<listitem><simpara> + Some drivers seem to fail to report even a single valid mode. In this + case the DGA driver will crash telling you about a nonsense mode of + 100000x100000 or something like that. + </simpara></listitem> +<listitem><simpara> + OSD only works with doublebuffering enabled (else it flickers). + </simpara></listitem> +</itemizedlist> + +</sect4> +<!--</sect3>--> + +<!-- ********** --> + +<sect4 id="sdl"> +<title>SDL</title> + +<para> +SDL (Simple Directmedia Layer) is basically a unified +video/audio interface. Programs that use it know only about SDL, and not +about what video or audio driver does SDL actually use. For example a Doom +port using SDL can run on svgalib, aalib, X, fbdev, and others, you only +have to specify the (for example) video driver to use with the +<envar>SDL_VIDEODRIVER</envar> environment variable. Well, in theory. +</para> + +<para> +With <application>MPlayer</application>, we used its X11 driver's software +scaler ability for cards/drivers that doesn't support XVideo, until we made +our own (faster, nicer) software scaler. Also we used its aalib output, but +now we have ours which is more comfortable. Its DGA mode was better than +ours, until recently. Get it now? :) +</para> + +<para> +It also helps with some buggy drivers/cards if the video is jerky (not slow +system problem), or audio is lagging. +</para> + +<para> +SDL video output supports displaying subtitles under the movie, on the (if +present) black bar. +</para> + +<variablelist> +<title>There are several command line switches for SDL:</title> +<varlistentry> + <term><option>-vo sdl:<replaceable>name</replaceable></option></term> + <listitem><simpara> + specifies SDL video driver to use (i.e. <literal>aalib</literal>, + <literal>dga</literal>, <literal>x11</literal>) + </simpara></listitem> +</varlistentry> +<varlistentry> + <term><option>-ao sdl:<replaceable>name</replaceable></option></term> + <listitem><simpara> + specifies SDL audio driver to use (i.e. <literal>dsp</literal>, + <literal>esd</literal>, <literal>arts</literal>) + </simpara></listitem> +</varlistentry> +<varlistentry> + <term><option>-noxv</option></term> + <listitem><simpara> + disables XVideo hardware acceleration + </simpara></listitem> +</varlistentry> +<varlistentry> + <term><option>-forcexv</option></term> + <listitem><simpara> + tries to force XVideo acceleration + </simpara></listitem> +</varlistentry> +</variablelist> + +<table> +<title>SDL keys</title> +<tgroup cols="2"> +<thead> +<row><entry>Key</entry><entry>Action</entry></row> +</thead> +<tbody> +<row><entry><keycap>F</keycap></entry><entry> + toggles fullscreen/windowed mode + </entry></row> +<row><entry><keycap>C</keycap></entry><entry> + cycles available fullscreen modes + </entry></row> +<row><entry><keycap>W</keycap>/<keycap>S</keycap></entry><entry> + mappings for <keycap>*</keycap> and <keycap>/</keycap> (mixer control) + </entry></row> +</tbody> +</tgroup> +</table> + +<itemizedlist> +<title>Known bugs:</title> +<listitem><simpara> + Keys pressed under sdl:aalib console driver repeat forever. (use + <option>-vo aa</option>!) It's bug in SDL, I can't change it (tested with + SDL 1.2.1). + </simpara></listitem> +<listitem><simpara> + DO NOT USE SDL with GUI! It won't work as it should. + </simpara></listitem> +</itemizedlist> +</sect4> + + +<sect4 id="svgalib"> +<title>SVGAlib</title> + +<formalpara> +<title>INSTALLATION</title> +<para> +You'll have to install svgalib and its development package in order for +<application>MPlayer</application> build its SVGAlib driver (autodetected, +but can be forced), and don't forget to edit +<filename>/etc/vga/libvga.config</filename> to suit your card and monitor. +</para> +</formalpara> + +<note> +<para> +Be sure not to use the <option>-fs</option> switch, since it toggles the +usage of the software scaler, and it's slow. If you really need it, use the +<option>-sws 4</option> option which will produce bad quality, but is +somewhat faster. +</para> +</note> + +<formalpara><title>EGA (4BPP) SUPPORT</title> +<para> +SVGAlib incorporates EGAlib, and <application>MPlayer</application> has the +possibility to display any movie in 16 colors, thus usable in the following +sets: +</para> +</formalpara> + +<itemizedlist> +<listitem><simpara> + EGA card with EGA monitor: 320x200x4bpp, 640x200x4bpp, 640x350x4bpp + </simpara></listitem> +<listitem><simpara> + EGA card with CGA monitor: 320x200x4bpp, 640x200x4bpp + </simpara></listitem> +</itemizedlist> + +<para> +The bpp (bits per pixel) value must be set to 4 by hand: +<option>-bpp 4</option> +</para> + +<para> +The movie probably must be scaled down to fit in EGA mode: +<screen>-vop scale=640:350</screen> +or +<screen>-vop scale=320:200</screen> +</para> + +<para> +For that we need fast but bad quality scaling routine: +<screen>-sws 4</screen> +</para> + +<para> +Maybe automatic aspect correction has to be shut off: +<screen>-noaspect</screen> +</para> + +<note><para> +according to my experience the best image quality on +EGA screens can be achieved by decreasing the brightness a bit: +<option>-vop eq=-20:0</option>. I also needed to lower the audio +samplerate on my box, because the sound was broken on 44kHz: +<option>-srate 22050</option>. +</para></note> + +<para> +ou can turn on OSD and subtitles only with the <systemitem>expand</systemitem> +filter, see the man page for exact parameters. +</para> +</sect4> + + +<sect4 id="fbdev"> +<title>Framebuffer output (FBdev)</title> + +<para> +Whether to build the FBdev target is autodetected during +<filename>./configure</filename>. Read the framebuffer documentation in +the kernel sources (<filename>Documentation/fb/*</filename>) for more +information. +</para> + +<para> +If your card doesn't support VBE 2.0 standard (older ISA/PCI cards, such as +S3 Trio64), only VBE 1.2 (or older?): Well, VESAfb is still available, but +you'll have to load SciTech Display Doctor (formerly UniVBE) before booting +Linux. Use a DOS boot disk or whatever. And don't forget to register your +UniVBE ;)) +</para> + +<para> +The FBdev output takes some additional parameters above the others: +</para> + +<variablelist> +<varlistentry> + <term><option>-fb</option></term> + <listitem><simpara> + specify the framebuffer device to use (<filename>/dev/fb0</filename>) + </simpara></listitem> +</varlistentry> +<varlistentry> + <term><option>-fbmode</option></term> + <listitem><simpara> + mode name to use (according to <filename>/etc/fb.modes</filename>) + </simpara></listitem> +</varlistentry> +<varlistentry> + <term><option>-fbmodeconfig</option></term> + <listitem><simpara> + config file of modes (default <filename>/etc/fb.modes</filename>) + </simpara></listitem> +</varlistentry> +<varlistentry> + <term><option>-monitor_hfreq</option></term> + <term><option>-monitor_vfreq</option></term> + <term><option>-monitor_dotclock</option></term> + <listitem><simpara> + <emphasis role="bold">important</emphasis> values, see + <filename>example.conf</filename> + </simpara></listitem> +</varlistentry> +</variablelist> + +<para> +If you want to change to a specific mode, then use +<screen>mplayer -vm -fbmode <replaceable>name_of_mode</replaceable> <replaceable>filename</replaceable></screen> +</para> + +<itemizedlist> +<listitem><para> + <option>-vm</option> alone will choose the most suitable mode from + <filename>/etc/fb.modes</filename>. Can be used together with + <option>-x</option> and <option>-y</option> options too. The + <option>-flip</option> option is supported only if the movie's pixel + format matches the video mode's pixel format. Pay attention to the bpp + value, fbdev driver tries to use the current, or if you specify the + <option>-bpp</option> option, then that. + </para></listitem> +<listitem><para> + <option>-zoom</option> option isn't supported (software scaling is slow). + <option>-fs</option> option isn't supported. You can't use 8 bpp (or less) + modes. + </para></listitem> +<listitem><para> + You possibly want to turn the cursor off: + <screen>echo -e '\033[?25l'</screen> + or + <screen>setterm -cursor off</screen> + and the screen saver: + <screen>setterm -blank 0</screen> + To turn the cursor back on: + <screen>echo -e '\033[?25h'</screen> + or + <screen>setterm -cursor on</screen> + </para></listitem> +</itemizedlist> + +<note> +<para> +FBdev video mode changing <emphasis>does not work</emphasis> with the VESA +framebuffer, and don't ask for it, since it's not an +<application>MPlayer</application> limitation. +</para> +</note> +</sect4> + + +<sect4 id="mga_vid"> +<title>Matrox framebuffer (mga_vid)</title> + +<para> +This section is about the Matrox G200/G400/G450/G550 BES (Back-End Scaler) +support, the mga_vid kernel driver. It's actively developed by A'rpi, and +it has hardware VSYNC support with triple buffering. It works on both +framebuffer console and under X. +</para> + +<warning> +<para> +This is Linux only! On non-Linux (tested on FreeBSD) systems, you can use +<link linkend="vidix">VIDIX</link> instead! +</para> +</warning> + +<procedure> +<title>Installation:</title> +<step><para> + To use it, you first have to compile <filename>mga_vid.o</filename>: + <screen> +cd drivers +make<!-- +--></screen> + </para></step> +<step><para> + Then create <filename>/dev/mga_vid</filename> device: + <screen>mknod /dev/mga_vid c 178 0</screen> + and load the driver with + <screen>insmod mga_vid.o</screen> + </para></step> +<step><para> + You should verify the memory size detection using the + <command>dmesg</command> command. If it's bad, use the + <option>mga_ram_size</option> option + (<command>rmmod mga_vid</command> first), + specify card's memory size in MB: + <screen>insmod mga_vid.o mga_ram_size=16</screen> + </para></step> +<step><para> + To make it load/unload automatically when needed, first insert the + following line at the end of <filename>/etc/modules.conf</filename>: + + <programlisting>alias char-major-178 mga_vid</programlisting> + + Then copy the <filename>mga_vid.o</filename> module to the appropriate + place under <filename>/lib/modules/<replaceable>kernel + version</replaceable>/<replaceable>somewhere</replaceable></filename>. + </para><para> + Then run + <screen>depmod -a</screen> + </para></step> +<step><para> + Now you have to (re)compile <application>MPlayer</application>, + <filename>./configure</filename> will detect + <filename>/dev/mga_vid</filename> and build the 'mga' driver. Using it + from <application>MPlayer</application> goes by <option>-vo mga</option> + if you have matroxfb console, or <option>-vo xmga</option> under XFree86 + 3.x.x or 4.x.x. + </para></step> +</procedure> + +<para> +The mga_vid driver cooperates with Xv. +</para> + +<para> +The <filename>/dev/mga_vid</filename> device file can be read for some +info, for example by +<screen>cat /dev/mga_vid</screen> +and can be written for brightness change: +<screen>echo "brightness=120" > /dev/mga_vid</screen> +</para> +</sect4> + + +<sect4 id="tdfxfb" xreflabel="3Dfx YUV support (tdfxfb)"> +<title>3Dfx YUV support</title> +<para> +This driver uses the kernel's tdfx framebuffer driver to play movies with +YUV acceleration. You'll need a kernel with tdfxfb support, and |