The xine HOWTO is deprecated and no longer maintained.
Please use the xine FAQ or one of the other resources on the xine website if you have any questions about xine.
Next Previous Contents

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:

In all cases, xine is invoked by

  $ xine <mrl>

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 -

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 <file or MRL>

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:

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.

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

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).


Next Previous Contents