======================================================== The xine HOWTO is deprecated and no longer maintained. Please use the xine FAQ or one of the other resources on http://xinehq.de/ if you have any questions about xine. ======================================================== The xine Video Player HOWTO Rich Wareham, v1.31, 2002 August 2 This document describes how to install, configure and use the xine Video Player. It relates only to versions of xine after 0.5 and, in general, those of the 0.9.x series. ______________________________________________________________________ Table of Contents 1. Introduction 1.1 New versions of this document 1.2 Feedback 1.3 Disclaimer 1.4 Copyright information 1.5 How do I submit changes or additions to the HOWTO? 2. About xine 2.1 Where can I obtain xine? 2.2 xine Features 2.3 Supported platforms and requirements 2.4 Where can I ask questions about or report bugs on xine? 3. Compiling and installing xine 3.1 Where are the installation instructions? 3.2 Quick-start installation guide 3.3 Installing xine in a different directory 3.4 How can I supply additional flags to the C-compiler? 3.5 Pre-built binaries 3.5.1 Debian packages (.deb) 3.5.2 Red-Hat packages (.rpm) 4. Using xine 4.1 Quick Start 4.2 Specifying a video source on the command-line. 4.2.1 Examples 4.3 Selecting Audio tracks 4.4 Changing skin 4.5 Displaying subtitles 4.6 Changing video output method 4.7 Forcing the use of a particular audio driver 4.8 Auto-play 4.9 Configuring xine 4.10 Tips and tricks 4.10.1 Removing the console output 4.10.2 Doing this automatically 4.11 Tweaking xine 5. Playing DVDs with xine 5.1 DVD terminology 5.2 Preparing your system to watch DVDs 5.3 `Alternate' DVD plugins 5.3.1 The DVDNAV plugin 5.3.2 The Captain CSS plugin 5.3.3 The DMD (Digital Movie Disc) plugin 6. Watching AVI files with xine 6.1 What to do if xine crashes when I try to play AVI files 7. Getting output from xine onto a TV xine has the ability to output via the TV-out on some NVidia cards. It does this using the nvtvd program available from AURL CDATA http://sourceforge.net/projects/nv-tv-out/ANAME CDATA http://sourceforge.net/projects/nv-tv-out/(HTMLURL)HTMLURL. Check the web-page to see if your card is supported. Install the program according to the sintructions on the site. If its correctly installed pressing 'F' twice in xine should switch to TV output mode. 8. Platform Specific Notes and Requirements 8.1 FreeBSD 8.1.1 xine fails when allocating images 8.1.2 Playing Video CDs 9. Increasing Performance 9.1 Hardware 9.1.1 AGP bus and graphics card. 9.1.2 Speeding up RAM (expert only!) 9.2 Set up and use raw devices for dvd access 9.3 The XVideo extension 9.4 MTRR (Linux) 9.5 Optimising drive access 10. Troubleshooting 10.1 I see "tvmode: not connected to nvtvd for switching". What's that ? 10.2 xine keeps complaining about not being able to connect to a socket 10.3 I use a kernel between 2.4.10 and 2.4.15 inclusive and xine and am getting strange errors 10.4 I don't get a DVD button in xine 10.5 All seems good but halfway through a DVD the playback stops or loops 10.6 I get this message: demux error! 00 00 00 (should be 0x000001) 10.7 I get lots of ``200 frames delivered, 200 frames skipped, 0 frames discarded'' 10.8 When I play a particular file/stream, xine shows some pictures but there's no audio 10.9 Using Linux, I get an error which contains status=0x51 { DriveReady SeekComplete Error } 10.10 I am having trouble playing a SVCD 10.11 xine drops a lot of frames 10.12 Fullscreen doesn't work 10.13 The AC3 via S/PDIF does not work with my soundcard 10.14 Where and how do I get the latest development version? 10.15 How do I use the dvd plugin and/or dvd:// MRL? 10.16 I get the message unable to open dvd drive (/dev/dvd) or xine is unable to detect my DVD player 10.17 How do I play streams from STDIN? 10.18 How do I change the skin? 10.19 How can I change color/brightness/contrast? 10.20 Some parts of my X Desktop get transparent when xine plays the video! 10.21 I get no sound, but ``audio driver 'oss' failed, using null driver instead.'' 10.22 After running xine several times it fail's to allocated shared memory 10.23 I have problems when using xine on FreeBSD 10.24 I think I am pronouncing xine wrong 10.25 I think I found a bug! 11. Contributing to xine 12. Further resources 12.1 DVD information 12.2 Developer resources ______________________________________________________________________ 1. Introduction This document has been written to provide end-users with information on how to use the xine video player to play video files and un- encrypted DVDs. Please note that xine in its unmodified state will not play CSS-encrypted DVDs. Links are given in this HOWTO for plugins which allow such DVDs to be played. This document only relates to versions of the xine video player after 0.5 due to the large number of architectural changes xine underwent at that time. 1.1. New versions of this document New versions of this document can be obtained from various locations including: o http://xine.sourceforge.net/ o http://dvd.sourceforge.net/ Finally the very latest version of this document should also be available in various formats from: http://dvd.sourceforge.net/ This HOWTO is written in English (that is English as opposed to American). Other versions may be available but the English one is most likely to be up-to-date. 1.2. Feedback All comments, error reports, additional information and criticism of all sorts should be directed to: richwareham@users.sourceforge.net 1.3. Disclaimer No liability for the contents of this documents can be accepted. Use the concepts, examples and other content at your own risk. Additionally, this is an early version, with many possibilities for inaccuracies and errors. One of many possible setups will be described. In the Linux world, there is usually a number of ways in which to accomplish things. As far as I know, all of the programmes mentioned here are released under the GNU General Public License or the Lesser GNU Public License. 1.4. Copyright information This document is copyrighted (C)2001 The xine Project and distributed under the following terms: o This document may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions. o All translations, derivative works, or aggregate works incorporating any parts of this document must be covered under this copyright notice. That is, you may not produce a derivative work from this HOWTO and impose additional restrictions on its distribution. 1.5. How do I submit changes or additions to the HOWTO? The preferred method is to edit the file xine-HOWTO.sgml to incorporate the changes, create a diff file by typing something like diff -uw original-file new-file and send it to richwareham@users.sourceforge.net. If you do not know SGML, that's OK. Changes or new information in any form will be accepted. Creating the diff file just makes it easier on the HOWTO maintainer. :-) 2. About xine xine is a free GNU General Public License (GPL) licensed video player for Unix-like systems. It supports many popular video and audio formats. xine plays the video and audio data of the stream and synchronises the playback of both. Depending on the properties of the stream, playback will need more or less processor power. Full frame rate for MPEG 2 has been seen on a 400 MHz PII system. xine can play Video CDs, SVCDs and DVDs directly. Unfortunately the legal status of encrypted/locked DVD playback is uncertain in some countries so we cannot include any DVD unlock/decrypt code with xine. To play back such DVDs you'll need external programs or a special xine plugin. More details can be found in the Playing DVDs section. xine tries to be simple to use and effective. No bells and whistles are being developed at this time. The primary aim is to achieve good playback of video. 2.1. Where can I obtain xine? xine can be obtained from . The most current version as of the time of writing is 0.9.12. xine is available as a tar.gz archive and Debian and RPM packages. 2.2. xine Features xine supports playback of the following video formats: o MPEG-1 and MPEG-2. o MPEG-4, also known as `OpenDivX'. o Microsoft MPEG-4, also known as `DivX ;-)'. o Motion JPEG. o Quicktime Sorenson video codec v2 (note newer Quicktime files may not play) o and many more! On x86 platforms, xine may make use of Video For Windows Dynamic-Link- Libraries (DLLs) for playback of Indeo, Cinepak, Windows Media 7/8 and many other files. xine supports the following audio formats: o MPEG audio layers 1,2 and 3 (also known as `MP3'). o a/52 (also known as AC3 and Dolby Digital). o DTS (via an external decoder). o Ogg Vorbis (a patent free alternative to MP3). on x86 platforms, xine may make use of Video For Windows Dynamic-Link- Libraries (DLLs) for playback of DivX audio (WMA), ADPCM, GSM and many other files. xine understands the following file formats (methods of combining separate audio and video streams into one file): o Un-encrypted DVDs (see section on DVDs for more information). o Video CD. This does not include the Video-on-CD hybrid format. o MPEG program streams (i.e. .mpg or .mpeg files). o MPEG transport streams (.ts). o Ogg Vorbis container streams (.ogg). o Microsoft Audio Video Interleave (.avi). o Microsoft Advanced Streaming Format (.asf). o Quicktime -- Note: xine does not support the Sorenson codec used in many Quicktime files. o Raw MPEG audio and video streams (.mpv and .mp3). 2.3. Supported platforms and requirements xine needs a locally attached graphics device and monitor (playback over a networked X-session is at best slow and more usually completely unwatchable). xine needs either MIT-SHM (The MIT Shared Memory Extension), which is supported in XFree86 for quite some time (3.3.x will be fine), or the X-Video Extension (Xv) which is faster and supports fullscreen operation but is only provided by some XFree86 4.x drivers. For more information on Xv (and if it is supported on your video card), refer to the section on increasing the performance of xine below or look at the XFree86 organisation's website (). Experimental plugins exist for accelerated output via OpenGL and the SyncFB device available for Matrox cards (more information at http://teletux.sourceforge.net/. See the README.syncfb file included in the xine distribution for more details. The main advantage of using this driver is the synchronisation of the video picture with the refresh of your monitor removing the `tearing' artifacts which may occur in fast-moving scenes. Under Linux, xine also supports the use of the Dxr3/Holywood+ DVD decoder cards for DVD output. xine can only use these cards to play MPEG and DVD input and can transcode other formats for display via the Dxr3. More information about setting up the Dxr3 device is available on http://dxr3.sourceforge.net. It is recommended that, if you do not use Xv, you set your screen colour depth to 16 bits-per-pixel (bpp) for reasons of speed. Xv seems to work fine at both 16bpp and 24bpp. You need to have a sound card which is supported by the OSS or ALSA drivers. The ESD and aRts sound daemons are also supported. The remainder of this HOWTO assumes that you have correctly setup and configured your sound card and X server. Software decoding of video is a computationally intensive task. It is recommended that, for smooth DVD playback, an x86 system should have at least a 400MHz processor. Greater resources are required for the unaccelerated XShm output plugin. xine has successfully been installed and run on non-x86 platforms (e.g. PPC or Solaris/IRIX Unices). 2.4. Where can I ask questions about or report bugs on xine? There is a mailing list called xine-user hosted at Sourceforge on which you may ask questions. Full details are available on the xine website (). Please review the FAQ and this HOWTO to see if your question is answered before posting to the list. There is also an IRC chat room, #xine which is hosted on irc.openprojects.net. 3. Compiling and installing xine The following instructions assume that you are installing from the source archives available from the xine website. You will need at least two packages (named xine-lib.x.y.z.tar.gz and xine- ui.x.y.z.tar.gz). Ensure that both archives correspond to the same version of xine. Firstly it is recommended that you remove any previous instances of xine form your system. You can do this using the following instructions. Here $PREFIX (e.g. if your xine program is /usr/bin/xine $PREFIX /usr/bin/ $ rm -r $PREFIX/share/xine $ rm -r $PREFIX/lib/xine $ rm $PREFIX/bin/xine $ rm $PREFIX/lib/libxine.* Download the files to some convenient directory. Open a terminal and change to that directory. For example, if you downloaded the file to the directory /home/rich/src/ type the following: $ cd /home/rich/src/ The xine-lib file is the xine run-time library which contains the code for the xine engine itself. The xine-ui file contains a number of user interfaces for xine. Currently there is a X-windows based graphical user interface and an experimental text-only interface (which renders video as so-called 'ASCII-art'). Type the following. It will extract the xine library and user interface source archives. Substitute x.y.z for the version of xine that you downloaded. $ tar xvzf xine-lib.x.y.z.tar.gz $ tar xvzf xine-ui.x.y.z.tar.gz 3.1. Where are the installation instructions? The full installation instructions are included in the file INSTALL. What follows here are a brief cut-down version of the instructions. 3.2. Quick-start installation guide Extract the xine source archives as outlined in the section entitled ``Compiling and installing xine''. The xine-lib archive must be installed first. Change to the xine-lib.x.y.z directory and configure the source code for your machine and compile the code by typing: $ ./configure $ make You may wish to use the ./configure --help command to see if you have to setup any machine specific options. Now, as the user root, enter the following command: $ make all install IMPORTANT! Before you can compile xine-ui, you may need to inform your system of the location of the xine libraries, you may need to set the LD_LIBRARY_PATH environment variable to the directory you installed the xine library and/or run the ldconfig program. For example, if you had installed xine-lib to /usr/local, you may need to enter the following command before compiling xine-ui. $ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH Once the xine library is installed, you can repeat these steps with the xine-ui.x.y.z directory. 3.3. Installing xine in a different directory To install xine in, for example, the directory /usr/local/xine, use the following option to configure $ ./configure --prefix=/usr/local/xine and, as root enter $ make install 3.4. How can I supply additional flags to the C-compiler? You can do so by setting the GLOBAL_CFLAGS variable and then run ./configure again. This can be useful to specify additional include paths or library paths to the compiler. For example: $ export GLOBAL_CFLAGS="-I/usr/include -L/home/guenter/xine_libs" 3.5. Pre-built binaries If you do not wish to compile xine from source, there are several pre- built `packages' available from the xine web-site. Also there are several packages containing common third-party plugins and patches available at http://cambuca.ldhs.cetuc.puc-rio.br/~jcm/skyblade/. Note that there are other methods of installing packages, you may wish to use graphical programmes such as kpackage. 3.5.1. Debian packages (.deb) If you are using the `unstable' branch of Debian, you can install xine by using the following command as root: $ apt-get install xine-ui 3.5.2. Red-Hat packages (.rpm) Download the RPMs from the xine web-site and enter the following command as root, substituting in the name of the file you downloaded. $ rpm -ivh xine-lib.x.x.x.rpm xine-ui.x.x.x.rpm 4. Using xine 4.1. Quick Start You can start xine with or without command-line parameters. If you wish to play a VCD or DVD, the simplest method is to invoke xine with the following command: $ xine Then click on the DVD or VCD button on the xine control panel. This causes Xine to scan for a DVD or VCD as appropriate. If xine finds one, you can press the `play' button to start the movie. When xine first starts up, the main Xine window will be displayed (black with the xine logo in it). Clicking the right mouse button in the window will toggle the display of the xine control panel. The xine control panel has a selection of familiar VCR-type controls for playing, pausing, stopping and moving to the beginning or end of file as appropriate. For a usage summary, use the following command-line $ xine --help 4.2. Specifying a video source on the command-line. xine specifies video sources using a media resource locater (MRL). Valid MRLs are: o file://some/file.vob - Specifies the file /some/file.vob. o fifo://[[mpeg1:mpeg2]:/]some/fifo - xine gets the video from the special FIFO pipe /some/fifo. By default, xine assumes the stream is mpeg-2, use mpeg1 or mpeg2 in the MRL to specify it explicitly. o stdin://[mpeg1:mpeg2] - xine takes the video stream from stdin. As with the fifo:// MRL, xine assumes mpeg2 unless told otherwise. o dvd://VTS_xx_y.VOB - Use the VOB file specified on a DVD. This is different to using the file:// MRL as xine reads the data directly from the DVD rather than using the Unix file system. o vcd://track - Plays the track specified on a VCD. o html://server.somewhere.tld/foo/bar.mpg - Streams the specified URL and attempts to play it. o mms://server/dir/file - An streaming protocol developed by some obscure company in Washington. Sometimes used for videos on news sites. In all cases, xine is invoked by $ xine For example, to play the file /some/where/foo.vob: $ xine file://some/where/foo.vob In addition to the above methods, you can specify a file directly, for example: $ xine /some/where/foo.vob You may also imply the MRL stdin://mpeg2 with: $ xine - 4.2.1. Examples The following both play the file /path/foo.vob: $ xine /path/foo.vob $ xine file://path/foo.vob xine supports the xdnd protocol (Version 3) so if you have a file browser application supporting that protocol (e.g. gmc) you can drop video files on xine for playback. Playing track 3 from a VCD: $ xine vcd://3 Example for direct DVD access: $ xine dvd://VTS_01_1.VOB 4.3. Selecting Audio tracks Some video files can have multiple audio tracks (e.g. DVDs). There are two ways to select audio tracks. The simplest is to use the arrows next to the audio track icon on the xine control panel (usually a speaker). Alternatively, you can use the -a command line parameter. For example to play the third audio track in the file /path/foo.mpg: $ xine -a 3 /path/foo.mpg For MPEG-1 video, only mpeg audio (layer 1, 2 and 3) is supported. MPEG-2 streams can have different types of audio streams, though. xine supports AC3 (dolby digital), mpeg and LPCM sound. These are mapped to the following tracks: Track selected audio stream 0- 7 AC3 stream 0-7 8-15 MPG audio stream 0-7 16-23 PCM audio stream 0-7 For example, to play PCM stream 0 use $ xine -a 16 file.vob 4.4. Changing skin xine supports skinning (like the XMMS or Winamp programs). The skin may be changed by clicking on its name in the `control' dialogue box. To identify the correct button on the main xine control panel, hover your mouse over the buttons for a short while and a small window pops up to identify each button. 4.5. Displaying subtitles DVDs and VOB files may contain subtitle information within them that xine can use to display subtitles over the video. This feature is by default off but one can enable it by changing the subtitle track number to the right of the subtitle icon on the xine control panel. Alternatively, you may use the -u command-line parameter. For example, to display the subtitles with id 0, use: $ xine -u 0 4.6. Changing video output method To change the method of video output, use the -V command line parameter. For example to start using the MIT-SHM (XShm) output method, use $ xine -V XShm and to use the XVideo (Xv) output: $ xine -V Xv xine `remembers' changes to the video output so your change will still take effect after exiting and restarting xine. 4.7. Forcing the use of a particular audio driver The -A command-line parameter can be used to select the OSS (oss), ALSA 0.9 (alsa), ESD (esd), ARTS (arts) or NULL (null) output driver. For example, to force the use of the ALSA driver: $ xine -A oss /path/file.mpg The NULL driver does not use any sound hardware and is best used for testing purposes. xine `remembers' changes to the audio output so your change will still take effect after exiting and restarting xine. 4.8. Auto-play xine can be set to automatically play when it starts through the use of the -p command-line parameter. For example: $ xine -p /path/file.mpg The -p parameter also accepts an optional single character to control xine farther: o f - Start xine in Fullscreen mode (Xv only). o h - Hide the control panel. o q - Quit xine when finished playing the video. o d - Attempt to retrieve playlist from DVD. o v - Attempt to retrieve playlist from VCD. For example, to auto-play, in fullscreen mode and attempt to retrieve the playlist from a DVD: $ xine -pfhd 4.9. Configuring xine xine is a highly configurable program. This configuration may be performed from the settings window (locate the correct button in the GUI as above for the control window). More information on a particular setting may usually be found by examining the comments in the ~/.xine/config file. 4.10. Tips and tricks The following are some tips and tricks for getting the most out of xine. 4.10.1. Removing the console output As xine is still in its developmental stage, it outputs a lot of information to the console when it runs. To remove this output start xine like this: $ xine mrl 2>&1 >/dev/null 4.10.2. Doing this automatically You can use this simple shell script to automatically do this when loading xine. #!/bin/sh xine "$@" 2>&1 >/dev/null 4.11. Tweaking xine The xine config file (~/.xine/config) has a number of useful options. They can be changed from the xine stup dialogue box (click the 'spanner' icon on most skins). 5. Playing DVDs with xine DVD support in xine is a little complex due to the uncertain legal situation regarding software capable of decoding DVDs encrypted with the Content Scrambling System (CSS). If you wish to just watch un- encrypted DVDs with no support for menus, title selection or multiple- angles, the bundled xine DVD plugin will suffice. In general, however, most DVDs are encrypted and most people want support for the more advanced features. 5.1. DVD terminology Since DVDs are a complex subject, people often get confused with terminology and myths surrounding them. The following is a brief primer on the important aspects of DVD technology. It is included here since they are often the source of common mistakes. o Region Coding -- A DVD has encoded on it a set of `regions' for which the Copyright owner has licensed distribution of the DVD contents. There are two kinds of DVD drive in existence, those who defer to the decoding software to allow playback (so-called RPC1 drives) and those which prevent playbeack themselves of out-of- region discs (RPC2 drives). As of 1st January 2000, all licensed DVD drive manufacturers were required to produce only RPC2 drives. An RPC2 drive must have its region set before playback may commence. A suitable utility to perform this for Linux is available from http://www.linuxtv.org/download/dvd/dvd_disc_20000215.tar.gz. o CSS -- The intended aim of the CSS is orthogonal to regon coding; it is not intended to prevent playback, rather to prevent unauthorised copying. In practice all DVD players must implement some form of CSS support to playback encrypted discs. Due to the uncertain legal implications of CSS support code created as a by- product of reverse engineering in some countries (most notably the United States of America), it was decided that xine would not officially contain any CSS support. To play encrypted discs a separate CSS-enabled plugin must be downloaded (see later). 5.2. Preparing your system to watch DVDs DVD plugins expect to find your DVD device at /dev/dvd although most allow this to be specified within the MRL and/or from the xine configuration dialogue box. In the interests of simplicity you may wish to symlink your DVD device to /dev/dvd. For example, suppose your DVD drive was /dev/hdc, you could create the symlink via: $ ln -s /dev/hdc /dev/dvd If you are using DevFS the procedure is more complex, however since you are using DevFS I assume you have read the devfsd manpage ;-). Many people also forget to give themselves read access to the DVD device (and find that they can only watch DVDs as root). 5.3. `Alternate' DVD plugins Disclosure: The main author of this HOWTO also authored parts of the DVDNAV plugin. Due to the limitations of the default xine DVD plugin, a number of people have attempted to create better plugins for separate distribution. There are three popular DVD plugins available for xine. 5.3.1. The DVDNAV plugin This is probably one of the more ambitious plugins for xine. Its ultimate aim is complete support for all DVD features (including interactive menus, multiple angles, etc.). Initial versions have been available for some time but once the Ogle DVD player (http://www.dtek.chalmers.se/groups/dvd/) came to prominence, some of the original code was replaced with code from Ogle for which the original creators of Ogle deserve thanks. Since the specifications for the special DVD features is not freely- accessible, the plugin has had to reverse-engineer some of the specifications so the DVDNAV plugin may be of questionable legality in those countries which take an overly dim view of reverse engineering. The plugin may be obtained from http://dvd.sourceforge.net. It requires the following support libraries to be installed before the plugin. Links to them are available on the plugin's web-site above. They are: o libdvdcss (version >=1.0.0). o libdvdread (versions 0.9.3 and above). o libdvdnav (version >=0.1.2). This plugin is also available in the unstable branch of the Debian GNU/Linux distribution and may be installed via the following commands: $ apt-get install xine-dvdnav 5.3.2. The Captain CSS plugin One of the oldest plugins this supports CSS DVDs with no dependencies on external libraries. Recent versions of the plugin have also used some code from the DVDNAV plugin to support DVD special features. The web-site for this plugin changes often and it is probably best to follow the link on the main xine web-site. 5.3.3. The DMD (Digital Movie Disc) plugin A simple CSS-enabled plugin designed for viewing DVDs without any special features. It does, however, support multiple angles. It may be obtained from http://www.geocities.com/xinedvdplugin/. 6. Watching AVI files with xine Since version 0.3.6 xine has been able to play Windows AVI files out of the box. To do this it uses the Windows driver files (DLLs) to play some files. By default, xine expects to find these in the PREFIX/lib/win32/ directory, where PREFIX is the directory you installed xine into. If you didn't specify any --prefix option to ./configure, this will be /usr/local. This path can be overridden in the xine configuration dialogue box. A tar-ball containing DLLs to watch most AVI files is available from http://bpinaud.dyndns.org/video/w32codec.tar.bz2 and http://divx.euro.ru/ (the file is called binaries.zip). Note that this is only available on Intel-like platforms. xine also supports the decoding of DivX ;-) and MJPEG avi files natively using an embedded copy of the ffmpeg library. xine attempts to use this decoder in preference as it also may work on non-x86 platforms. 6.1. What to do if xine crashes when I try to play AVI files It should work OK if your system meets these requirements: o The Xv driver is working. o The AVI file contains video and audio streams supported by the DLLs below. o You have the proper DLLs in /usr/lib/win32/ but it may crash for no specific reason at the moment. There are known problems with files which have strange audio streams. 7. Getting output from xine onto a TV xine has the ability to output via the TV-out on some NVidia cards. It does this using the nvtvd pro- gram available fromhttp://sourceforge.net/projects/nv-tv-out/. Check the web-page to see if your card is supported. Install the program according to the sintructions on the site. If its correctly installed pressing 'F' twice in xine should switch to TV output mode. 8. Platform Specific Notes and Requirements 8.1. FreeBSD 8.1.1. xine fails when allocating images Make sure you have enough shared memory enabled. This is very limited by default. Edit the /etc/sysctl.conf file: kern.ipc.shmmax=67108864 kern.ipc.shmall=32768 8.1.2. Playing Video CDs Currently (because of issues with the FreeBSD kernel) xine can only play VCDs from ATAPI cdrom drives. not from SCSI drives. Currently (Jan 2001), FreeBSD-stable (and thus the current releases also) needs a patch to the kernel sources to make VCDs work (please check the FreeBSD documentation if you are unsure on how to build a custom kernel with this patch included). The file you have to patch is /sys/dev/ata/atapi-cd.c and the patch is included in the README.freebsd file included with the xine source distribution. 9. Increasing Performance Playing Videos (especially DVDs) is very processor intensive. To help smooth playback, xine attempts to use various forms of hardware acceleration. The following info is mostly relevant to x86 PCs and Linux so please send in any tips for other architectures/Unices. 9.1. Hardware This section lists some hardware which is useful. 9.1.1. AGP bus and graphics card. An AGP graphics card allows the computer to send video data more efficiently to the card. Consequently this allows for smoother video. It is strongly recommended that you have one. 9.1.2. Speeding up RAM (expert only!) If you are a BIOS bit-twiddler you can try putting all RAM related timing settings (like CAS delay, RAS to CAS delay, etc) in the BIOS to 2. You might want to try some really nasty tricks, as explained on (for example) . This website centers around a Windows-tool to tweak the chipset, you can do the same on FreeBSD with pciconf. On some linux distributions there are similar tools. Please contact heiko (heiko@users.sourceforge.net) if you have any problems or tips about via apollo pro chipset tweaking. A nice performance tuning tool can also be found at . 9.2. Set up and use raw devices for dvd access Raw devices are available in linux kernel 2.4.x and there are patches for older kernels available from . To use raw devices, first connect a free raw device to your dvd device, use something like $ raw /dev/raw1 /dev/hdc then create a link named "rdvd" pointing to that raw device $ ln -s /dev/raw1 /dev/rdvd Some distributions may require you to set up the link as: $ raw /dev/raw/raw1 /dev/hdc $ ln -s /dev/raw/raw1 /dev/rdvd instead. Also some distributions may lack the /dev/rawctl device which may be created using $ mknod /dev/rawctl c 162 0 9.3. The XVideo extension The XVideo extension is a feature of versions of the XFree86 X-server from version 4.0 onwards. It currently is supported on the following cards: 3DFX Voodoo 3 The 3dfx driver works in XFree86 version 4.0.3 and above. nVidia GeForce Xv only works with nVidia's own drivers (prior to XFree86 4.2.0). After 4.2.0 Xv works with the standard drivers. NVidia's own drivers can be downloaded from nVidia TNT2 and TNT1 As with the GeForce, only NVidia's drivers work prior to XFree86 4.2.0. ATI cards Xv is reported to work with Rage 128 and Mach64 based cards with drivers from the GATOS project (). With XFree86 4.2.0 and higher it should owrk 'out-of-the-box'. Matrox Gx00 and G450 cards Xv works `out-of-the-box' except that it only works on the first screen on G450 cards. Intel i810 and i815 Xv works `out-of-the-box'. Savage chips Xv has been reported to work with some Savage cards using a modified driver module. There is more information and a list of working cards on . If the Xv extension is correctly installed, the output of the xvinfo program should be similar to the following: Adaptor #1: "Matrox G-Series Backend Scaler" number of ports: 1 port base: 47 operations supported: PutImage supported visuals: depth 16, visualID 0x23 depth 16, visualID 0x24 depth 16, visualID 0x25 depth 16, visualID 0x26 number of attributes: 3 "XV_COLORKEY" (range 0 to 16777215) client settable attribute client gettable attribute (current value is 2110) "XV_BRIGHTNESS" (range -128 to 127) client settable attribute client gettable attribute (current value is 0) "XV_CONTRAST" (range 0 to 255) client settable attribute client gettable attribute (current value is 128) maximum XvImage size: 1024 x 1024 Number of image formats: 0 You may also need to load the v4l (Video4Linux) X extension. Type xdpyinfo | grep XV. If 'XVideo' forms part of the output, then you have it. If not add XF86Config file (normally /etc/X11/XF86Config) and try again. Then try the 'xvinfo' command. If the output is don't have XV support. Check if your video card is supported on the XFree86 website (), install any necessary software and try again. 9.4. MTRR (Linux) From the Linux Kernel documentation: On Intel P6 family processors (Pentium Pro, Pentium II and later) the Memory Type Range Registers (MTRRs) may be used to control processor access to memory ranges. This is most useful when you have a video (VGA) card on a PCI or AGP bus. Enabling write-combining allows bus write transfers to be combined into a larger transfer before bursting over the PCI/AGP bus. This can increase performance of image write operations 2.5 times or more. The Cyrix 6x86, 6x86MX and M II processors have Address Range Registers (ARRs) which provide a similar functionality to MTRRs. For these, the ARRs are used to emulate the MTRRs. The AMD K6-2 (stepping 8 and above) and K6-3 processors have two MTRRs. These are supported. The Centaur C6 (WinChip) has 8 MCRs, allowing write-combining. These are supported. Making sure MTRRs are setup correctly can considerably improve playback when using the XShm output method. To check that your kernel supports MTRR, check for the presence of the /proc/mtrr file. Type cat /proc/mtrr and check that there is an entry relating to your video card's memory. If not then consult the file mtrr.txt file in the Linux kernel source documentation. 9.5. Optimising drive access The following applies only to IDE drive units. Firstly make sure that your motherboard supports the UDMA/33 protocol (or a higher numbered UDMA protocol). You can use the hdparm utility to make Linux use this interface to optimise drive data transfers. More details on hdparm can be found on http://linux.oreillynet.com/pub/a/linux/2000/06/29/hdparm.html. Warning: hdparm is a dangerous utility and incorrect use may impact on your computer's ability to read the drive. USE IT AT YOUR OWN RISK. Check the output of the hdparm drive_device includes the following line: S hdparm /dev/dvd ... using_dma = 1 (on) ... If it is off or if you want to change any options consult the hdparm manual page for details. 10. Troubleshooting The following section lists some common problems and their solutions. If you are a regular xine user and feel that there is a common problem not stated here, please e-mail the HOWTO maintainer: richwareham@users.sourceforge.net 10.1. I see "tvmode: not connected to nvtvd for switching". What's that ? xine can use the TV-output features of some video cards to display video on TV screens. If you don't care about this feature or your card is not supported you may safely ignore this message. 10.2. xine keeps complaining about not being able to connect to a socket If you get errors like the following in xine's output: xine: could not connect to socket xine: No such file or directory They may be safely disregarded. They are due to xine attempting to use a particular program called LIRC to allow control via a Infra-red remote control. If you don't have/wish for this feature, pretend the errors aren't there. You can stop xine trying to use LIRC by passing it the '-L' command line option. 10.3. I use a kernel between 2.4.10 and 2.4.15 inclusive and xine and am getting strange errors There is a problem with 2.4.10 and upwards which can somtimes cause xine to pause at odd times. If you suffer from this problem, try downgrading the kernel to 2.4.9 or upgrading to 2.4.16. 10.4. I don't get a DVD button in xine Make sure that you have the /dev/dvd file setup correctly (see the section on playing DVDs above). 10.5. All seems good but halfway through a DVD the playback stops or loops There is a bug in the 2.4.1 kernel. You will need to upgrade. 10.6. I get this message: 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. xine can't play such DVDs out-of-the box (for legal reasons). You could use an css-enabled DVD input plugin to avoid this. More information is available on . Note that playing CSS encrypted DVDs is not an official feature of xine. You may also have mounted your DVD drive. xine tries to bypass the normal Linux filesystem and so wont work if the DVD is mounted. Try unmounting it with the umount command. Another reason could be that your (RPC-2) DVD drive isn't set up for the right region. 10.7. I get lots of ``200 frames delivered, 200 frames skipped, 0 frames discarded'' You may have selected the wrong audio channel or you're trying to play a stream that uses features xine doesn't support (yet). 10.8. When I play a particular file/stream, xine shows some pictures but there's no audio Try another audio channel: $ xine -a channel stream.vob some .VOB files have audio on strange channels (e.g. 3, 7, 10). Also make sure you are not using the 'null' audio output pugin. Finally check that the volume slider is fully up :). 10.9. Using Linux, I get an error which contains status=0x51 { DriveReady SeekComplete Error } To fix this error, try enabling `Use multi-mode by default' in your kernel (re-compile setting ATA/IDE/MFM/RLL support -> IDE, ATA and ATAPI Block devices -> Use multi-mode by default to `Y'). The relevant piece of kernel documentation states: CONFIG_IDEDISK_MULTI_MODE: If you get this error, try to say Y here: hda: set_multmode: status=0x51 { DriveReady SeekComplete Error } hda: set_multmode: error=0x04 { DriveStatusError } If in doubt, say N. 10.10. I am having trouble playing a SVCD xine can play SVCDs but you'll have to experiment with the audio channels. Normally, you should find an audio track #8 and, for bilingual SVCDs #9, so $ xine -a 8 should allow you to press the ``vcd'' button and play your SVCDs 10.11. xine drops a lot of frames Your hardware may be too slow for xine. Make sure you turn on all speed optimizing options. See the section entitled ``Increasing the Performance of xine'' for more details. 10.12. Fullscreen doesn't work Check the Xv extenstion is working properly. 10.13. The AC3 via S/PDIF does not work with my soundcard The AC3 via S/PDIF is supported by ALSA only for some soundcards (mostly those with Trident 4DWaveNX, YMF or Emu10k1 chips). So if you have a suitable soundcard use $ xine -S -A alsa The -S switch disables the internal AC3 decoder. For very slow machines you could improve video playback (without sound) when you start xine as $ xine -S -A null 10.14. Where and how do I get the latest development version? First a word of warning. The development version is just that. It is meant for developers. It may not even compile and may not function correctly if it does. If you have to be on the bleeding edge of development then check it out of our CVS: $ cvs -d :pserver:anonymous@cvs.xine.sourceforge.net:/cvsroot/xine login (enter an empty password) $ cvs -d :pserver:anonymous@cvs.xine.sourceforge.net:/cvsroot/xine co xine-lib $ cvs -d :pserver:anonymous@cvs.xine.sourceforge.net:/cvsroot/xine co xine-ui 10.15. How do I use the dvd plugin and/or dvd:// MRL? The DVD plugin delivered with xine currently does not support playback of locked and/or encrypted DVDs. Look at the Playing DVDs section for details for obtaining a special xine `plugin' which allows playback of there DVDs. Due to the uncertain legal situation regarding CSS encryption we do not include anything of that nature in the xine distribution, nor do we generally endorse the use of such software (you should check if the use of such software is legal where you live). We hope that this situation will change soon. For unlocked/unencrypted dvds it is a good idea first to check what files are on the dvd by mounting it. The files are called something like .../VIDEO_TS/VTS_xx_x.VOB, where x are numbers. If you look for the big .VOB files on a dvd these are probably where the movie is in. Currently we don't support seamless playback of complete movies - you will have to play back all of its individual parts. To play that VOB file use something like $ xine dvd://VTS_xx_x.VOB Make sure you do not supply any path name (no VIDEO_TS/). xine tries to open the dvd using /dev/dvd. On FreeBSD this will only work if you create a symlink to your dvd-devicenode for the time being. 10.16. I get the message unable to open dvd drive (/dev/dvd) or xine is unable to detect my DVD player 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 $ cd /dev $ ln -s hdc dvd should do the job. 10.17. How do I play streams from STDIN? use something like $ cat stream.mpg | xine stdin://mpeg1 or, if you've got an mpeg-2 stream use $ cat stream.vob | xine stdin://mpeg2 10.18. How do I change the skin? xine has the ability to have its user interface customised using `skins'. Eventually you will be able to change skin from the control panel but for now you have to edit a file. Run xine at least once - it should write it's config file .xine/config to your home directory. Now edit that file and change the line "skin:default" to match the skin you would like to use. 10.19. How can I change color/brightness/contrast? At the moment this is only supported on some Xv drivers. You'll find three entries like these in our /.xine/config: brightness:0 saturation:0 contrast:128 the values and possible ranges depend on your Xv driver so you'll have to experiment a bit to get a good picture. 10.20. Some parts of my X Desktop get transparent when xine plays the video! Looks like some colours on your GUI match the colourkey Xv uses. You can change the colorkey value to avoid this. There should be a line like colorkey:2110 to your ~/.xine/config where you can change the colour that's used by xine for the video overlay. 10.21. I get no sound, but ``audio driver 'oss' failed, using null driver instead.'' First of all, make sure that your OSS Audio drivers are working (ie you can play music with other software). The most common reason for this 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. 10.22. After running xine several times it fail's to allocated shared memory This should be fixed in xine 0.3.3 or later. However, this can only work if you exit xine the "correct" way (e.g. using the panel or pressing "q"). Do not simply close the video output window using your window manager - xine won't release shared memory in this case (!). 10.23. I have problems when using xine on FreeBSD Check if you find what you are looking for in the file README.freebsd which is distributed with the xine source code. 10.24. I think I am pronouncing xine wrong It is pronounced [ksi:n]. ksi like the `ks' in `knocks' and n like the `een' in `been'. 10.25. I think I found a bug! xine is still in developement. Only the latest version of xine is supported by the mailing-list so if you don't have the latest version, please upgrade and try again. The latest version is always announced on and available from the xine homepage. If you still have problems, please contact us and send us a full bug report. Please include all xine console output and some details about your hardware (CPU, GPU, sound card,...) card and operating system. A bug report of the form `I cant play the x DVD' is not much use. You can reach us via email: xine Mailing List 11. Contributing to xine xine is in continuous development. If you are interested in getting involved then check out the development version from CVS and check the list in the file TODO. Please send patches to xine Mailing List Remember that xine is a volumnteer effort and so it may take some time for the developers to respond to your post. 12. Further resources 12.1. DVD information You can find information on DVD related issues from the following places o - Another DVD-specific open source project. Contains lots of information and resources for Linux Video applications. o - French site (in english) which aims to provide software for distributing MPEG2 video and DVD over a LAN. o - Good site giving lots of information on the politics of DVD software. 12.2. Developer resources o - Lots of useful Digital TV/DVD related sourcecode and information.