The xine engine FAQ

Copyright (C) 2001-2003 the xine project team

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Table of Contents
 

    General questions about xine and this document

        What is the xine engine?
        What's the aim and scope of this text?
        My question is not yet covered here - where can I ask for help?
        How do I pronounce "xine"?
        What are those xine-lib, xine-ui, gnome-xine, ... modules in cvs for?
        Where and how do I get the latest development version?
        Why is gxine's CVS module named "gnome-xine"?
        Where can I find pre-compiled binaries, e.g. RPMs?

    Building and installing xine from source

        What do I need to compile everything properly?
        Oki, xine doesn't drop frames now but video output still is not really
            smooth!
        I have problems when using xine on FreeBSD, Solaris, ... !
        What is aalib? How do I use it in xine?
        Does xine support my dxr3 / hollywood+ card?

    Audio related questions

        What audio drivers does xine support? OSS? Alsa? Arts? Esd?
        When I'm watching a movie, the sound effects are much higher in volume
            than the voices!
        When I play this stream, xine shows video but there's no audio!
        Can xine produce 4-/5-channel surround audio output?
        What about ac3 output via spdif to an external ac3 decoder?
        Getting SPDIF output from a SBLive 5.1 using OSS drivers
        Changing the volume with the GUI control has no effect! What's up!?
        Audio is stuttering and i see a lot of "metronom: fixing sound card
            drift by -2115 pts" on the console output
        xine seems to lose sound arbitrarily during playback, especially with
            DVDs

    Video related questions

        I can hear the audio - but I don't see a picture!
        I only see a blue (or green or black) video image most of the time.
        The image looks strange, it is shifted, cropped or shows weird lines!
        How can I make xine use the Xv extension and what drivers do I need?
        Some parts of my X Desktop get transparent when xine plays the video!
        The aspect ratio of the video is wrong!
        What is the difference between discarded and skipped frames?
        My xine is runing in black and white! / I only get a gray video output!
        Which is the best video driver to use?

    OSD and overlay related questions

        What is this "unscaled" OSD about?
        I can't see the OSD or it leaves a black box over the image!
        Why colors of overlays/subtitles seem to be "leaking"?
        Why external subtitles look so ugly?
        Why subtitles can't be displayed outside the video?
        What kinds of subtitle fonts does xine use?
        How to create own xine subtitle fonts?
        Encoding of external subtitles is bad. What is wrong?

    Error Messages: What they mean and what you can do

        Starting xine crashes XFree, I am logged out of my desktop!
        Starting xine fails with complains about audio drivers/devices!
        "no video port found"
        "Unable to open dvd drive (/dev/dvd)"
        My drive doesn't work and the kernel says "status=0x51 { DriveReady
            SeekComplete Error }"
        "demux error! 00 00 00 (should be 0x000001)"
        "audio driver 'oss' failed, using null driver instead"
        "video_out: throwing away image with pts xxx because it's too old"
        "No video plugin available to decode 'xxxxxx'."
        "w32codec: decoder failed to start. Is 'xxxxxx' installed?"
        xine just crashed on me - i didn't get any error message

General questions about xine and this document

What is the xine engine?

The xine engine is a free media player engine. It comes in the form of a shared
libarary and is typically used by media player frontends and other multimedia
applications for playback of multimedia streams such as movies, radio/tv
network streams, DVDs, VCDs.

Since there are several frontends for the xine library available, this document
has a problem when it comes to examples. The two most common frontends xine-ui
and gxine are mixed in command line examples throughout this FAQ. When you use
a different frontend, some of these will not work for you. The filename of the
config file also varies amongst frontends. If you get confused, I recommend you
try with one of xine-ui or gxine.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What's the aim and scope of this text?

The primary goal of this FAQ is to cover all recurring questions related to the
xine engine. Frontend specific questions are usually not covered here.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

My question is not yet covered here - where can I ask for help?

First of all be sure that your question is really not covered here and that you
haven't just been a bit too lazy to read through all of this text. ;-). Also
check out the documentation specific to the frontend (e.g. xine-ui or gxine or
totem).

That said - you are welcome to mail to our user mailing list: <
xine-user@lists.sourceforge.net> Please provide some info about your setup so
people have a chance to help you, e.g. include information about your audio/
video hardware and drivers you use, operating system, cpu type and some console
output/any error messages. Also include command line parameters you have
specified and information about the type of stream you're trying to play back.
Also very important is the version of xine you're using and information about
any additional plugins you may have installed on your system.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

How do I pronounce "xine"?

As long as people know what you are talking about, you are free to pronounce it
the way you like, but the official pronounciation is [ksi:n], like the name
"Maxine" with the "Ma" removed.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What are those xine-lib, xine-ui, gnome-xine, ... modules in cvs for?

Some time ago xine just became too complex to be just one big program.
Therefore it was split into two major parts.

xine-lib is simply speaking the engine of xine. It contains all basic plugins
and is necessary to run anything that relies on xine. (This is the part that is
covered in this FAQ.)

Then there are frontends - applications that use xine. The most common frontend
is that of a media player. There are currently two frontends being developed in
the xine project, xine-ui (skinned dvd-player style frontend directly based on
xlib) and gxine, a desktop media-player style frontend using the standard gtk
widget set and comes with a mozilla browser plugin. External projects like
kaffeine, sinek and totem develop additional frontends. In the future you will
likely see more and different types of applications being developed which will
use the xine engine for video processing and other multimedia purposes.

If you simply want a media/dvd player, you'll need to install xine-lib first
and then choose and install a player frontend like xine-ui or gxine.

Other modules in CVS are: xine-plugin a mozilla browser plugin for streaming
media playback using xine, xine-www the xine project website sources.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Where and how do I get the latest development version?

Be advised that end-users should stick to the official xine releases. CVS is
only intended for developers and for others who know why they use it.

To check out xine-modules from CVS, first do this:

   cvs -d :pserver:anonymous@xine.cvs.sourceforge.net:/cvsroot/xine login

The password is empty, just press Enter.

Then, to check out individual modules (e.g. xine-lib, gnome-xine or xine-ui):

   cvs -d :pserver:anonymous@xine.cvs.sourceforge.net:/cvsroot/xine co <modulename>

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Why is gxine's CVS module named "gnome-xine"?

Historical reasons: gxine was originally named gnome-xine.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Where can I find pre-compiled binaries, e.g. RPMs?

The xine project does not provide pre-compiled binaries for legal reasons (some
parts of xine may be covered by patents in some countries). Some OS projects/
vendors (e.g. debian, freebsd, ...) offer binaries for their distributions -
please contact them or use their package search tools for further info. You can
also find links to third parties providing xine RPMs on the xine homepage at
http://xinehq.de/index.php/releases.

See the next section of this FAQ for instructions on how to build xine from
source.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Building and installing xine from source

What do I need to compile everything properly?

First of all an official and stable release of gcc. Also be aware that patched
gcc versions may break parts of xine and are therefore not supported by the
xine project.

Furthermore you'll have to use GNU make to compile xine. On most GNU/Linux
systems "make" is GNU make - on other platforms use "gmake" instead. Also, zlib
is required (including the appropriate header files, which are often found in a
package called zlib-devel or similar.)

If you want to compile xine from CVS, you'll need to have the autobuild tools
installed (automake, autoconf and libtool - in recent versions).

Frontends might need additional libraries, e.g. for gxine you'll need to have
GTK2 installed. Make sure you have not only the shared libraries themselves but
also the header files (often packaged seperately as so-called -dev packages) on
your system.

Some plugins that come with the xine engine need additional libraries
(otherwise they will not be built). For example, libogg and libvorbis (plus
their include files) are needed for ogg/vorbis support. Most notably, if you
want to see any video on your X11 desktop (and that's what you're here for,
isn't it?), you need the XFree developer packages as well.

Don't worry about this too much right now, xine's configure (see below) will
check for all the stuff needed and will tell you what's missinkernel's buffer
cache, Linux will not try to cache the DVDs you play. This would not be useful,
because xine does its own caching and you usually play DVDs sequentially, which
means you won't reuse anything from the cache. But the problem would be that
Linux throws everything out of the cache that might be in there.

Raw devices should be available in linux kernel 2.4.x and there are patches for
older kernels available from: ftp://ftp.kernel.org/pub/linux/kernel/people/sct/
raw-io/

To use raw devices, first connect a free raw device to your dvd device, use
something like:

   raw /dev/raw1 /dev/dvd

Then create a link named "rdvd" pointing to that raw device:

   ln -s raw1 /dev/rdvd

For slow / high-latency dvd drives it might help to increase the number of
video buffers xine allocates. Try setting engine.buffers.video_num_buffers:500
to a higher value (e.g. 1000 or 2500).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Oki, xine doesn't drop frames now but video output still is not really smooth!

Video output can be further improved by tuning your linux kernel:

  • Set HZ to 1000 in /usr/src/linux/include/asm-i386/param.h

  • Try applying scheduler patches, especially the O(1) and the preemptive
    patches have proven useful at the time of this writing (spring 2003).

Linux 2.5/2.6 will probably have these improvements out of the box.

Miguel Freitas has written a nice article about his kernel multimedia
experiments .

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

I have problems when using xine on FreeBSD, Solaris, ... !

Check out the the corresponding README files in the directory xine-lib/doc.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What is aalib? How do I use it in xine?

aalib is an ascii art library. xine comes with an aalib video output plugin so
you can watch movies in your xterm, on the console or on your old vt100 - very
cool ;> ... another nice option is to preview movies on a remote server in your
shell over ssh.

To use it make sure you have aalib installed correctly before you configure/
build xine-lib and xine-ui. In addition to the xine binary a binary named
aaxine should get built and installed. You can then use something like:

   aaxine foo.mpg

to use aalib video output.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Does xine support my dxr3 / hollywood+ card?

While xine's focus is clearly on software decoding, the dxr3 is supported.

You can find more information about using xine with the dxr3 here (also covers
how to do tv output using the dxr3).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Audio related questions

What audio drivers does xine support? OSS? Alsa? Arts? Esd?

Currently xine support audio output via OSS (kernel audio drivers), ALSA 0.9.x
(ALSA 0.5.x is no longer supported), arts (KDE's sound daemon) and esound (esd,
gnome's sound daemon - not recommended because it has serious issues with a/v
sync).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

When I'm watching a movie, the sound effects are much higher in volume than the
voices!

Congratulations, you seem to have an original movie audio track there.

Uhm. So you don't like it. Well, there are two things you can do:

  • You can enable xine's audio compressor. Most frontends have a settings
    window and in that you'll find a slider for the compressor setting. The
    values are percent values, so a slider setting of 200 means that xine will
    double the volume of silent parts of the movie (loud parts stay the same).

    If your frontend does not have such a compression slider, you can pass the
    value with the MRL:

       xine dvd:/#compression:150

  • If you have a dolby digital (AC3) soundtrack, you can try to enable
    liba52's dynamic range compression setting audio.a52.dynamic_range:1 in
    your xine config file (or use some gui config dialog).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

When I play this stream, xine shows video but there's no audio!

If this happens with any video, first try a different audio driver (gxine -A
oss, gxine -A arts, xine -A alsa ...).

If this problem only occurs with one specific stream, maybe switching to a
different audio channel (using the gui) helps. Some DVD streams have audio on
strange channels.

If all this doesn't help, maybe you're missing an audio codec or you found a
bug. If you decide to post your problem on the xine-user mailing list, make
sure to include all console output xine produced and also clearly state what
type of stream you tried to play back or, even better, make a test stream
available somewhere for developers to download and try.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Can xine produce 4-/5-channel surround audio output?

Yep, it can do that using OSS or ALSA drivers, provided that the driver
supports it. However, since xine cannot detect if there are actually speakers
connected to the additional channels, you'll have to activate that feature
manually.

You can do this either in the config dialog while xine is running (press the
config button on the xine panel and go to the AUDIO tab) or have it the
complicated way by editing the config file yourself which is located in your
home directory in .gxine or .xine:

   audio.output.speaker_arrangement:Surround 4.0
   audio.output.speaker_arrangement:Surround 4.1
   audio.output.speaker_arrangement:Surround 5.1

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What about ac3 output via spdif to an external ac3 decoder?

xine can do that too. Pretty much the same story as for 4-/5-channel surround
(see above). You can either use the config dialog or edit the config file (~
/.xine/config or ~/.gxine/config) yourself:

   audio.output.speaker_arrangement:Pass Through

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Getting SPDIF output from a SBLive 5.1 using OSS drivers

The following explains how to get the above configuration going with xine. Some
parts of it may applicable to other configurations (cards that use the EMU10k1
chip) as well.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Requirements

 1. xine-lib >= 1.x.x

 2. OSS driver

 3. an external decoder

 4. a cable to connect the SBLive to the external decoder

The configuration described was tested using a Soundblaster live 5.1 (rev 7)
with a Yamaha DSP-AX620 external decoder.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Retrieving the driver

The OSS driver is maintained by creative and can be downloaded at http://
opensource.creative.com/. The driver package contains documentation on how to
install it. Besides that I'd like to add the following notes.

In order to compile and install these drivers, you need a valid kernel
configuration file. For RedHat Linux's pre-compiled kernels these configuration
files can be found in /usr/src/linux/configs. After you've located the correct
config file for your kernel, you need to copy it to /usr/src/linux/.config For
example, when you run the 2.4.18-i686 kernel do :

   cp /usr/src/linux/configs/kernel-2.4.18-i686.config /usr/src/linux/.config

Make sure that the emu10k1 module that is currently installed is not loaded. To
unload the modules:

   /sbin/modprobe -rv emu10k1.o ac97_codec.o

If this mentions that the device is busy, some program is using the driver.
Some example could be a mixer application or sound daemon like artsd. You'll
need to close down the applications before continuing. At success it should
print something like:

   # delete emu10k1
   # delete ac97_codec
   # delete soundcore

Run make in the directory where you unpacked the driver and follow the
instructions printed at the end of each step. The last step should be:

   make install-tools

As the README of the driver package mentions the SPDIF AC3 output doesn't work
by default. In the directory utils/scripts an emu10k1.conf file can be found
which need to be placed in the default installation directory (/usr/local/etc).
After this the emu10k1.conf needs to be modified. The following settings worked
fine for me (I don't use the analog outputs of the card):

   CARD_IS_5_1=yes
   USE_DIGITAL_OUTPUT=yes
   ENABLE_TONE_CONTROL=yes
   AC3PASSTHROUGH=yes
   ENABLE_LIVEDRIVE_IR=no
   INVERT_REAR=no
   MULTICHANNEL=yes
   ROUTE_ALL_TO_SUB=no
   ANALOG_FRONT_BOOST=no
   SURROUND=no
   PROLOGIC=no
   ENABLE_CD_Spdif=yes
   ENABLE_OPTICAL_SPDIF=no
   ENABLE_LINE2_MIC2=no
   ENABLE_RCA_SPDIF=no
   ENABLE_RCA_AUX=no

After modifying the emu10k1.conf, you need to modify your /etc/modules.conf and
make sure the following lines are in there.

   alias sound-slot-0 emu10k1
   post-install emu10k1 /usr/local/etc/emu-script

After saving the changes to modules.conf, run

   /sbin/depmod -a

Now, you're ready to load the new modules and set the correct options for it.
To load the modules run:

   /sbin/modprobe emu10k1

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Setting up xine for SPDIF (AC3 passthrough) output

You can either use the config dialog of your frontend or edit the config file
(~/.xine/config) yourself:

   audio.output.speaker_arrangement:Pass Through

In case the setting is not in the file you can add it.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The cable used for the SBLive can easily be self-made or buy a stereo 3.5mm
jack to dual RCA cable.

What you need to make the cable yourself:

  • stereo 3.5mm jack plug

  • RCA plug

  • shielded cable (video coax 75 Ohm will do)

Connect them as follows :

   center pin jackplug ------|----- center pin RCA plug
                   GND     __|__    GND

In order to test it use a DVD with AC3 or DTS track start xine and select the
right audio track from user interface or start xine as:

   xine dvd:/1 -a 0

The external decoder should display something like "Dolby Digital" in case the
selected audio track contains AC3 data or "DTS" in case the selected audio
track contains DTS data. Of course stereo audio also goes through the SPDIF
output, so the analog outputs of the SBLive 5.1 are not needed anymore.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Changing the volume with the GUI control has no effect! What's up!?

Some xine drivers do not support volume changing although the GUI will show the
volume bar. Usually this is not xine's fault: aRts C API, for example, doesn't
offer any volume property to applications. Similarly, with ac3 pass through it
is not possible to set the volume.

Note that recently we added support to "simulate" volume in aRts by changing
sample values on-the-fly before delivering them to the driver. Not as good as
having access to sound card's mixer but at least users will not complain about
lacking of volume bar anymore! :)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Audio is stuttering and i see a lot of "metronom: fixing sound card drift by
-2115 pts" on the console output

Might be a soundcard problem, if it only comes in longer intervals. Your
soundcard does not keep it's sampling frequency accurately enough, which
results in audio and video getting out of sync and xine has to compensate. If
you see the message only from time to time, you might remedy it by using the
resampling sync method. You can do this by setting the configuration entry
audio.synchronization.av_sync_method to resample.

If you receive the metronom message more often, maybe switching to different
drivers (alsa to oss or vise-versa) can help here. It has also been reported
that setting the configuration entry audio.synchronization.force_rate to the
native sampling rate of your soundcard (try 44100 and 48000) helps sometimes.

Another, whole different possibility is that you have some background process
running which is messing with the clock (like some ntp client - chronny, ntpd,
...).

Occasional messages of "fixing sound card drift" may happen on start and when
playing a long stream (like a movie). This is normal behaviour, nothing to
worry about.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

xine seems to lose sound arbitrarily during playback, especially with DVDs

You are using the OSS audio output plugin, right? In order to keep video and
audio in sync, xine regularly queries the audio driver for the amount of delay
induced by the current length of the driver's audio buffer. Unfortunately some
OSS drivers seem to be broken because the can return strange values here. This
confuses the xine audio subsystem and makes it drop audio.

You should try the various settings of the configuration entry
audio.oss_sync_method. The options getodelay and getoptr ask the driver and
might therefore show the problem. But chances are that only one is broken and
the other works, so you should try them both first, since they are the most
accurate. The option probebuffer does not ask the driver directly but tries to
determine the buffer length from outside. This should work with any driver and
is the way to go, of the driver dependent methods fail. softsync is the least
accurate and should be used only in emergency situations.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Video related questions

I can hear the audio - but I don't see a picture!

Probably your hardware is simply too slow - see above for some hints on how to
speed things up.

Another possibility is that you using a buggy Xv driver, see the next
questions.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

I only see a blue (or green or black) video image most of the time.

You are either watching a very boring video (just kidding) or you are suffering
from a bug in the Xorg 6.7 implementation of X11.

The workaround is to add the line

   Option "XaaNoOffscreenPixmaps"

in the Device section of your X server configuration (usually /etc/X11/
xorg.conf or /etc/X11/XF86Config).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The image looks strange, it is shifted, cropped or shows weird lines!

This points to a problem with the Xv extension, which is used by xine to
display the video image. To verify this, try running xine with the XShm video
output plugin:

   xine -V XShm

If that works fine, you just proved, that the Xv extension is buggy. xine will
remember the last used video output plugin, so the setting will stay at XShm.
You could simply continue using this, but XShm is a lot slower than Xv, so read
on and see if you can get it working. Usually you should look for updated
versions of the XFree driver module that belongs to your graphics card.

Other possibilites are limitations in either your XFree driver module or your
graphics hardware. If your card could somehow be running out of ressources
(graphics RAM perhaps) and displays an incorrect Xv overlay because of that,
try reducing the display resolution and/or colour depth.

Consult the next question for more details on Xv.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

How can I make xine use the Xv extension and what drivers do I need?

xine will normally use Xv by default if it is available. In some cases you
might need to choose Xv playback manually (when the ~/.xine/config file for
some reason says that you want to use XShm):

   xine -V Xv

If this doesn't work for you, it may be possible that Xv is not present on your
system.

First you need to install/use XFree 4.x. Once you got that you have to make
sure the XFree drivers you're using are supporting Xv on your hardware. Here
are some hints for individual gfx chips:

  • 3Dfx: if all you get is a solid black window, upgrade at least to XFree
    4.1.0

  • ATI: if you only get "half a picture", try lowering your resolution or bit
    depth, disable DRI (looks like you ran out of video RAM)

  • Trident card: If you see vertical bands jumbled, upgrade to the latest
    xfree/experimental trident drivers (for the CyberBlade XP a driver exists
    here: http://www.xfree86.org/~alanh/ )

  • nVidia: With newer GeForce cards, Xv should work with XFree 4.2.0 or newer,
    for older RivaTNT cards use the binary drivers from nvidia (of course the
    binary drivers work as well for GeForce cards)

  • Mach64/Rage3D (not Rage128/Radeon) cards/chips get no XVideo with standard
    drivers, try GATOS drivers instead

  • intel: i815 has Xv support in XFree 4.x, others unknown

  • Permedia 2/3 has Xv support in XFree 4.x

  • Savage: at least some older drivers tend to lock up the whole machine, try
    the drivers available from http://www.probo.com/timr/savage40.html .

  • SIS: certain controllers (more info needed!) have Xv support in XFree 4.x

  • Chips and Tech 6555x, 68554, 69000, 69030 have Xv support in XFree 4.x

  • NeoMagic: certain controllers (more info needed!) have Xv support in Xfree
    4.x

  • SiliconMotion: certain controllers (more info needed!) have Xv support in
    Xfree 4.x

  • Matrox: G200 or newer (but not Parhelia) have Xv support in XFree 4.x. For
    Parhelia, use the binary only drivers available from matrox' website.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Some parts of my X Desktop get transparent when xine plays the video!

Looks like some colors on your GUI match the colorkey Xv uses. You can change
the colorkey value to avoid this. There should be a line like:

   video.XV_COLORKEY:2110

in your ~/.xine/config file where you can change the color that's used by xine
for the video overlay.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The aspect ratio of the video is wrong!

Usually xine discovers the screen aspect ratio by querying the X-server and
then adjusts the video automatically to make it look right. However, if that
doesn't work try pressing "a" to manually change the aspect ratio.

If you have a wide screen monitor, make sure the X-server is correctly
configured. The X-server must know the physical size of the screen, which is
independent of the resolution being used.

For XFree86 the screen size should be set with the file /etc/X11/XF86Config,
under the section "Monitor" as in the example below:

   Section "Monitor"
      Identifier   "Monitor0"
      VendorName   "Monitor Vendor"
      ModelName    "DDC Probed Monitor - ViewSonic G773-2"
      DisplaySize  320  240
      HorizSync    30.0 - 70.0
      VertRefresh  50.0 - 180.0
   EndSection

Where DisplaySize specifies, in millimeters, the physical size of the monitor's
picture area.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What is the difference between discarded and skipped frames?

Sometimes xine will output a message like that:

   200 frames delivered, XX frames skipped, YY frames discarded

The difference between these counters is a little subtle for the non developer.
There are two threads running in order to display video: the decoder thread
will deliver frames to the video output thread. The latter is responsible for
scheduling the frames to be displayed at the right time.

If your system can't keep up with decoding requirements, decoder will deliver
overdue frames. Imagine if it finished decoding the frame tagged for displaying
at 11:30 but xine clock marks 11:31. When this situation is detected, xine will
try to skip decoding a few frames to recover. Not every decoder may support
this feature.

When the frame is decoded to be shown somewhere in future but the output thread
doesn't get scheduled in time by the operating system to complete the
operation, the frame is discarded. One cause might be the disk access
operation, which may halt the system for a few miliseconds without DMA. See
performance section tips above.

Note that if a decoder can't skip frames for some reason, you would never see
frames skipped (they would be all discarded).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

My xine is runing in black and white! / I only get a gray video output!

This frequently happens with new Xv drivers or when switching to a different
video card. Background is that different Xv drivers often use different ranges
for the contrast/brightness/saturation settings.

To fix this, try opening the xine settings window and try adjusting the sliders
for contrast, brightness and saturation.

Please note that some frontends save these settings in their config file so
when you have found a working combination, make sure you exit xine cleanly so
the values are saved.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Which is the best video driver to use?

xine support several video drivers for outputing the image. These will differ
on how the frames are copied to the video card memory, whether colorspace
conversion and scaling is done in software or hardware, among other things.
They may also differ on ease of use and stability.

Most of the time, Xv should give the users a good trade-off between quality,
compatibility and ease of use. This is why xine tries to use Xv by default.

However some users may want to explore better the available hardware
capabilities (eg. syncing frame drawing with monitor refresh). Also some Xv
drivers contain slow copies and accessing the video card directly may yield
performance gains.

Drivers that access hardware directly includes VIDIX (warning: requires root
priviledges or kernel helper) and SyncFB (requires kernel helper - Matrox
only). User may try one of those, but should be warned that with root access
they can cause the system to crash hard. The support is also limited to a
couple of graphics cards only.

Graphic workstations like SGI have usually a good support for OpenGL. In that
case, using OpenGL may be a better choice than XShm. However for most desktop
systems the performance of OpenGL will be quite bad.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

OSD and overlay related questions

What is this "unscaled" OSD about?

Since version 1-rc3 of xine-lib supports a new method for rendering OSD (On
Screen Display) and subtitles. This method uses a X11 extension called XShape
that allows using screen resolution instead of stream resolution. It is called
"unscaled" OSD because it does not scales with the video being played.

Suppose you are watching a 320x200 video in full screen. Normal OSD would be
blended at 320x200 and then scaled to full screen (lets say, 1024x768),
resulting in big and ugly fonts. The unscaled overlay is drawn directly to
screen, creating a sharper and better looking OSD.

There are side effects too. Sometimes the unscaled overlay show some glitch
just before disappearing. Some people may be annoyed enough by that and might
want to disable the usage of unscaled overlay altogether.

Unscaled OSD usage by subtitles and xine-ui is controlled by the following
settings (~/.xine/config or ~/.gxine/config):

   gui.osd_use_unscaled:0

   subtitles.separate.use_unscaled_osd:0

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

I can't see the OSD or it leaves a black box over the image!

If you are using xine-lib version 1-rc3 or newer, this is probably due buggy XV
drivers that do not support unscaled OSD (the XShape extension) properly.

There have being reports of some ATI drivers that don't allow displaying
anything over the video. The VIA Epia binary drivers is reported to leave a
black box where the OSD was displayed.

The problem may be fixed by either updating the video driver, or disabling xine
unscaled OSD support.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Why colors of overlays/subtitles seem to be "leaking"?

xine blends most overlays, specially the ones from DVD discs, directly over the
image (scaled OSD). Unfortunately most codecs (like MPEG2) use a subsampled
image format (YV12) that makes properly blending an interesting challenge.

In short, this is a known xine bug. There have being discussions on improving
the blending quality but, so far, nobody implemented a better (scaled) overlay
renderer. Contact developers if you want to try doing something about it.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Why external subtitles look so ugly?

You are probably using a xine-lib version older than 1-rc3. Try upgrading your
copy and read the section about unscaled osd.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Why subtitles can't be displayed outside the video?

It is possible, but older xine versions may not support it. There are two
alternatives for rendering the subtitles outside the video image:

  • Use the "expand" post plugin to increase frame height adding black bars to
    it. This will allow blending the subtitles over the black bars, since they
    will be part of the video now.

  • Use unscaled OSD, as it does not requires any video to render the subtitles
    on.

Also notice that DVD overlays (including subtitles) are meant to be displayed
in a fixed position, this is how the DVD menu highlighting works. xine does not
support moving them.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What kinds of subtitle fonts does xine use?

xine can use two kinds of fonts:

  • TTF fonts

    If xine is compiled with freetype library xine recognizes and uses TTF
    fonts directly.

  • xine fonts

    This is xine's native format. It's better because the font generator
    utility implements more features than the "on the fly" TTF renderer.

The font for text subtitles is selected via config option
subtitles.separate.font. You can specify xine font name (sans, serif, ...) or
file name of the TTF font. The directories $prefix/share/xine/libxine1/fonts
and ~/.xine/fonts are searched for the fonts, with $prefix being the place
xine-lib was installed to. Usually this is /usr/local or /usr. TTF fonts are
also searched for in the current directory.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

How to create own xine subtitle fonts?

xine's native subtitle fonts can be generated from TTF fonts with the utility
xine-fontconv. It isn't compiled and installed by default but you can make it
manually. You'll need freetype and zlib packages together with their versions
for development plus a compiler, of course ;) Here's how you build
xine-fontconv:

  • Get the source of xine-fontconv utility from the misc directory within the
    xine-lib sources.

  • Compile it:

       gcc xine-fontconv.c -o xine-fontconv `freetype-config --cflags --libs` -lz


You'll need some TTF font for generating. Characters in this font should cover
all codepages you want supported, otherwise you'll have missing characters.

Syntax is:

   ./xine-fontconf font.ttf font_name [encoding1 [encoding2 [...]]]

For example default font sans was generated with following command:

   ./xine-fontconv Aril_Bold.ttf sans iso-8859-1 iso-8859-2 iso-8859-5 \
                                      iso-8859-9 iso-8859-15 cp1250 cp1251

There are displayed messages about missing characters on the screen during
generating. It's OK if the missing characters are U+007f..U+009F. These
characters come from iso-8859-1 and they aren't displayable.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Encoding of external subtitles is bad. What is wrong?

The encoding of the external subtitles is expected to be iso-8859-1 by default.
You need to set an appropriate encoding in the config option
subtitles.separate.src_encoding. Note that you also need a font which contains
all characters from the given encoding.

The default font sans and fonts serif and mono cover these encodings:

  • iso-8859-1

  • iso-8859-2

  • iso-8859-5

  • iso-8859-9

  • iso-8859-15

  • windows-1250

  • windows-1251

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Error Messages: What they mean and what you can do

Starting xine crashes XFree, I am logged out of my desktop!

xine itself is unable to crash XFree, so when your X server just shuts down or
restarts with the login screen, there is something wrong with your X setup.
Most common are problems with the Xv extension. Try running xine with the XShm
video output plugin:

   xine -V XShm

If that works fine, you just proved, that the Xv extension is buggy. xine will
remember the last used video output plugin, so the setting will stay at XShm.
You could simply continue using this, but XShm is a lot slower than Xv, so
consult the section on Xv and see if you can get it working. Usually you should
look for updated versions of the XFree driver module that belongs to your
graphics card.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Starting xine fails with complains about audio drivers/devices!

You can select the audio driver using the -A option. So try:

   xine -A null

If you have ALSA drivers installed, try:

   xine -A alsa

If you run ESD (not recommended), try:

   xine -A esd

If you run artsd, try:

   xine -A arts

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

"no video port found"

You got the Xv extension, but your video card driver doesn't support it. First
try to find a driver that does support Xv on your hardware (check your graphics
card vendor). If your driver has Xv support but you can't get it working, try
at a lower resolution (1024x768 is enough even for anamorphic DVDs).

If all that fails, you can still use plain X11/XShm:

   gxine -V XShm foo.vob

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

"Unable to open dvd drive (/dev/dvd)"

You probably don't have /dev/dvd (check that). If so, simply create a link /dev
/dvd that points to your DVD device. Something like...

   ln -s hdc /dev/dvd

...should do the job. Also make sure you have read and write access on the
device the symlink points to. See the dvd playback section for more
information.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

My drive doesn't work and the kernel says "status=0x51 { DriveReady
SeekComplete Error }"

This error can be fixed by recompiling your kernel with the option "Use
multi-mode by default" enabled in the IDE settings.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

"demux error! 00 00 00 (should be 0x000001)"

Probably xine can't access your input source. Most commonly this happens when
you're trying to play locked/encrypted DVDs. Remember that xine can't play such
DVDs out-of-the box for legal reasons (see above).

If it is legal where you live, you can try to install libdvdcss. Once you have
done that and re-start xine, it should automatically detect and use it to play
back encrypted DVDs.

Another reason could be that your (RPC-2) DVD drive isn't set up for the right
region (see above).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

"audio driver 'oss' failed, using null driver instead"

First of all, make sure that your OSS Audio drivers are working (i.e. you can
play music with other software). Maybe you're using alsa? If so, try gxine -A
alsa to see if this helps.

The most common reason for oss not working is that some other program is
accesing your audio device. If you're using linux, the command fuser /dev/dsp
should give you the PID of the process.

If you are using GNOME, chances are that this is caused by ESD. Now you have
two possibilities. Either deactivate ESD (temporarily) by right clicking on the
sound monitor applet and selecting "Place Esound in standby" or just kill it.
Then xine will use OSS audio output. The other method is to make xine use ESD
for audio output with:

   gxine -A esd

This may result in worse playback - exact syncronization is not possible with
esd, so using oss should be preferred.

If you are using KDE, there is the possibility that the aRts sound daemon is
currently running and thus blocking your sound device. You can check that by
starting the aRts control (in your KDE menu it should be under Multimedia). If
it is running, you can either use the aRts audio output plugin:

   gxine -A arts

Or you suspend the aRts daemon by checking the appropriate option in your aRts
control. (recommended)

Newer versions of arts have an auto-suspend mode - this can lead to some
nondeterministic behaviour of xine if it is set up to use the audio device
directly. Using arts is recommended in that case, however you will loose the
ability to do four/five channel audio output.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

"video_out: throwing away image with pts xxx because it's too old"

This is a performance related problem. If you have a fast computer and this
message shows from time to time playing dvd/cdrom, it's very likely that your
drive is not DMA enabled.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

"No video plugin available to decode 'xxxxxx'."

You have tried to play a stream using a unknown or unhandled codec. Possibly
the file uses some obscure proprietary format and no information is available
on how to decode it.

If you're on an x86 platform (e.g. PC hardware) you might want to try
installing binary-only windows medial, real networks and quicktime codecs (see
above).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

"w32codec: decoder failed to start. Is 'xxxxxx' installed?"

You probably don't have the win32 dll needed to decode this file.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

xine just crashed on me - i didn't get any error message

OK, yes, that shouldn't happen and you're upset. We can understand that. But,
to help you and of course to fix this, we need some information. So, let's go
through the checklist and maybe prepare a nice bug report for the xine-user
mailing list:

  • Did xine really crash (segfault) or did it hang (deadlock)?

  • Can you reproduce the bug? (e.g. do you remember what you did and when you
    do it again it crashes again?)

  • Is that a specific media file or format which crashes xine? (Have you tried
    other files types?)

  • Check the console output (and include it in a bug report), maybe earlier
    there is some output that points to the problem.

  • Your X server just froze on you? unfortunately that's a known problem with
    some chipsets and drivers (most commonly Savage chipsets) when using Xv.
    You might want to try running gxine -V XShm to see if the problem is
    related to the Xv driver. This will unfortunately be much slower, as lots
    of things are now done in software instead of hardware scaling/colour space
    conversion.

    Maybe at the time you read this, there's an XFree upgrade which fixes this
    for the Savage driver. If that works for you, please notify the xine crew
    at <xine-user@lists.sourceforge.net>, so they can update this FAQ!

  • Even though we try to make each release as bug free as possible, xine is
    still under heavy development (nice excuse, isn't it? *grin*).

    If you write to the xine user mailing list <xine-user@lists.sourceforge.net
    > make sure you include a the above information (when applicable) and also
    some information about your machine (operating system, cpu type and speed,
    gfx card, sound card, ...) and please use a meaningfull subject line ("xine
    bug" is bad, "xine fails to play this quicktime trailer in fullscreen mode"
    ist much better).

    Thanks for taking the time to help improve xine.

