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 -


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.5 (alsa05), 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 alsa /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.

  xine "[email protected]" 2>&1 >/dev/null

4.11 Tweaking Xine

A number of extra options exist which can be set in the ~/.xinerc file. See the file README.xinerc which comes with Xine for more details.

Next Previous Contents