📄 xv.html
字号:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>8.2.聽Xv</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="MPlayer - The Movie Player"><link rel="up" href="video.html" title="Chapter聽8.聽Video output devices"><link rel="prev" href="mtrr.html" title="8.1.聽Setting up MTRR"><link rel="next" href="dga.html" title="8.3.聽DGA"><link rel="preface" href="howtoread.html" title="How to read this documentation"><link rel="chapter" href="intro.html" title="Chapter聽1.聽Introduction"><link rel="chapter" href="install.html" title="Chapter聽2.聽Installation"><link rel="chapter" href="usage.html" title="Chapter聽3.聽Usage"><link rel="chapter" href="cd-dvd.html" title="Chapter聽4.聽CD/DVD usage"><link rel="chapter" href="faq.html" title="Chapter聽5.聽Frequently Asked Questions"><link rel="chapter" href="containers.html" title="Chapter聽6.聽Containers"><link rel="chapter" href="codecs.html" title="Chapter聽7.聽Codecs"><link rel="chapter" href="video.html" title="Chapter聽8.聽Video output devices"><link rel="chapter" href="audio.html" title="Chapter聽9.聽Audio output devices"><link rel="chapter" href="tv.html" title="Chapter聽10.聽TV"><link rel="chapter" href="radio.html" title="Chapter聽11.聽Radio"><link rel="chapter" href="ports.html" title="Chapter聽12.聽Ports"><link rel="chapter" href="mencoder.html" title="Chapter聽13.聽Basic usage of MEncoder"><link rel="chapter" href="encoding-guide.html" title="Chapter聽14.聽Encoding with MEncoder"><link rel="appendix" href="bugreports.html" title="Appendix聽A.聽How to report bugs"><link rel="appendix" href="bugs.html" title="Appendix聽B.聽Known bugs"><link rel="appendix" href="skin.html" title="Appendix聽C.聽MPlayer skin format"><link rel="appendix" href="history.html" title="Appendix聽D.聽History"><link rel="subsection" href="xv.html#tdfx" title="8.2.1.聽3dfx cards"><link rel="subsection" href="xv.html#s3" title="8.2.2.聽S3 cards"><link rel="subsection" href="xv.html#nvidia" title="8.2.3.聽nVidia cards"><link rel="subsection" href="xv.html#ati" title="8.2.4.聽ATI cards"><link rel="subsection" href="xv.html#neomagic" title="8.2.5.聽NeoMagic cards"><link rel="subsection" href="xv.html#trident" title="8.2.6.聽Trident cards"><link rel="subsection" href="xv.html#kyro" title="8.2.7.聽Kyro/PowerVR cards"><link rel="subsection" href="xv.html#intel" title="8.2.8.聽Intel cards"></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">8.2.聽Xv</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mtrr.html">Prev</a>聽</td><th width="60%" align="center">Chapter聽8.聽Video output devices</th><td width="20%" align="right">聽<a accesskey="n" href="dga.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xv"></a>8.2.聽Xv</h2></div></div></div><p>
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
<tt class="option">-vo xv</tt> uses. Also, this driver supports adjusting
brightness/contrast/hue/etc. (unless you use the old, slow DirectShow DivX
codec, which supports it everywhere), see the man page.
</p><p>
In order to make this work, be sure to check the following:
</p><div class="orderedlist"><ol type="1"><li><p>
You have to use XFree86 4.0.2 or newer (former versions don't have XVideo)
</p></li><li><p>
Your card actually supports hardware acceleration (modern cards do)
</p></li><li><p>
X loads the XVideo extension, it's something like this:
</p><pre class="programlisting">(II) Loading extension XVideo</pre><p>
in <tt class="filename">/var/log/XFree86.0.log</tt>
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
This loads only the XFree86's extension. In a good install, this is
always loaded, and doesn't mean that the
<span class="bold"><strong>card's</strong></span> XVideo support is loaded!
</p></div><p>
</p></li><li><p>
Your card has Xv support under Linux. To check, try
<span class="command"><strong>xvinfo</strong></span>, it is the part of the XFree86 distribution. It
should display a long text, similar to this:
</p><pre class="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...)</pre><p>
It must support YUY2 packed, and YV12 planar pixel formats to be usable
with <span class="application">MPlayer</span>.
</p></li><li><p>
And finally, check if <span class="application">MPlayer</span> was compiled
with 'xv' support. Do a <span class="command"><strong>mplayer -vo help | grep xv </strong></span>.
If 'xv' support was built a line similar to this should appear:
</p><pre class="screen"> xv X11/Xv</pre><p>
</p></li></ol></div><p>
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="tdfx"></a>8.2.1.聽3dfx cards</h3></div></div></div><p>
Older 3dfx drivers were known to have problems with XVideo acceleration, it
didn't support YUY2 or YV12 colorspaces. Verify that you have XFree86
version 4.2.0 or later, it can handle YV12 and YUY2 while previous
versions, including 4.1.0, <span class="bold"><strong>crash with YV12</strong></span>.
If you experience strange effects using <tt class="option">-vo xv</tt>, try SDL
(it has XVideo, too) and see if it helps. Check the
<a class="link" href="sdl.html" title="8.4.聽SDL">SDL</a> section for details.
</p><p>
<span class="bold"><strong>OR</strong></span>, try the NEW
<tt class="option">-vo tdfxfb</tt> driver! See the <a class="link" href="tdfxfb.html" title="8.8.聽3Dfx YUV support">tdfxfb</a>
section.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="s3"></a>8.2.2.聽S3 cards</h3></div></div></div><p>
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.
</p><p>
There is now a native framebuffer driver for S3 Virge cards similiar to
tdfxfb. Set up your framebuffer (e.g. append
"<tt class="option">vga=792 video=vesa:mtrr</tt>" to your kernel comand line) and use
<tt class="option">-vo s3fb</tt> (<tt class="option">-vf yuy2</tt> and <tt class="option">-dr</tt>
will also help).
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
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.
</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="nvidia"></a>8.2.3.聽nVidia cards</h3></div></div></div><p>
nVidia isn't always a very good choice under Linux ... XFree86's
open-source driver supports most of these cards, but for some cases, you'll
have to use the binary closed-source nVidia driver, available at
<a class="ulink" href="http://www.nvidia.com/object/linux.html" target="_top">nVidia's web site</a>.
You'll always need this driver if you want 3D acceleration, too.
</p><p>
Riva128 cards don't have XVideo support with XFree86's nVidia driver :(
Complain to nVidia.
</p><p>
However, <span class="application">MPlayer</span> contains a
<a class="link" href="vidix.html" title="8.15.聽VIDIX">VIDIX</a> driver for most nVidia cards. Currently it
is in beta stage, and has some drawbacks. For more information, see
<a class="link" href="vidix.html#vidix-nvidia" title="8.15.5.聽nVidia cards">nVidia VIDIX</a> section.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ati"></a>8.2.4.聽ATI cards</h3></div></div></div><p>
The <a class="ulink" href="http://gatos.sf.net" target="_top">GATOS driver</a>
(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.
</p><p>
Radeon VE - if you need X, use XFree86 4.2.0 or greater for this card.
No TV out support. Of course with <span class="application">MPlayer</span> you can
happily get <span class="bold"><strong>accelerated</strong></span> display, with or
without <span class="bold"><strong>TV output</strong></span>, and no libraries or X are
needed.
Read the <a class="link" href="vidix.html" title="8.15.聽VIDIX">VIDIX</a> section.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="neomagic"></a>8.2.5.聽NeoMagic cards</h3></div></div></div><p>
These cards can be found in many laptops. You must use XFree86 4.3.0 or
above, or else use Stefan Seyfried's
<a class="ulink" href="http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/" target="_top">Xv-capable drivers</a>.
Just choose the one that applies to your version of XFree86.
</p><p>
XFree86 4.3.0 includes Xv support, yet Bohdan Horst sent a small
<a class="ulink" href="http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/neo_driver.patch" target="_top">patch</a>
against the XFree86 sources that speeds up framebuffer operations (so XVideo)
up to four times. The patch has been included in XFree86 CVS and should be in
the next release after 4.3.0.
</p><p>
To allow playback of DVD sized content change your XF86Config like this:
</p><pre class="programlisting">
Section "Device"
[...]
Driver "neomagic"
<span class="emphasis"><em>Option "OverlayMem" "829440"</em></span>
[...]
EndSection</pre><p>
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="trident"></a>8.2.6.聽Trident cards</h3></div></div></div><p>
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.
</p><p>
Alternatively, <span class="application">MPlayer</span> contains a
<a class="link" href="vidix.html" title="8.15.聽VIDIX">VIDIX</a> driver for the Cyberblade/i1 card.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="kyro"></a>8.2.7.聽Kyro/PowerVR cards</h3></div></div></div><p>
If you want to use Xv with a Kyro based card (for example Hercules
Prophet 4000XT), you should download the drivers from the
<a class="ulink" href="http://www.powervr.com/" target="_top">PowerVR site</a>.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="intel"></a>8.2.8.聽Intel cards</h3></div></div></div><p>
These cards can be found in many laptops. Recent Xorg is recommended.
</p><p>
To allow playback of DVD sized (and larger) content change your XF86Config/xorg.conf like this:
</p><pre class="programlisting">
Section "Device"
[...]
Driver "intel"
<span class="emphasis"><em>Option "LinearAlloc" "6144"</em></span>
[...]
EndSection
</pre><p>
Lack of this option usually results in an error like
</p><pre class="screen">X11 error: BadAlloc (insufficient resources for operation)</pre><p>
when attempting to use <tt class="option">-vo xv</tt>.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mtrr.html">Prev</a>聽</td><td width="20%" align="center"><a accesskey="u" href="video.html">Up</a></td><td width="40%" align="right">聽<a accesskey="n" href="dga.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">8.1.聽Setting up MTRR聽</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">聽8.3.聽DGA</td></tr></table></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -