Up one level
How to play video media in Linux (mpg, avi, DVD, VCD) using "xine"
Spencer Stirling

As long as you are using Debian Sarge or better then playing video media like mpg, avi, ogm, mkv, and DVD is easiest using the set libraries found in the package

libxine1
Note that no graphical frontend is included in this package (see below). Mplayer notes: see bottom

Indeed, there are MANY frontend GUI's that fundamentally use libxine1 as a basis for playing video media. I have tested several of them over the years (Kaffeine, totem-xine, etc). I prefer the "official xine GUI"

xine-ui

If you want to play DVD's then xine does this for you (in libxine version 0 you were forced to download special plugin libraries, but now it's all included). Unfortunately, as usual, the scumbag production companies, record companies, etc. (let's throw publishers in the scumbag pile, too) don't want you to use Open Source software to view their junk. Hence, encrypted DVD support is not OUTRIGHT included with libxine1. Fortunately, as usual, there is a package of "unclear legal status" hanging out there called "libdvdcss2" which allows the encryption on these DVDs to be broken. To get a hold of this, just add the line

deb http://www.debian-multimedia.org/ stable main
# YOU SHOULD ALSO KEEP a NORMAL DEBIAN (UNSTABLE/TESTING/STABLE)
# SERVER LISTED HERE TO MEET SOME DEPENDENCIES
to your /etc/apt/sources.list file. Type
apt-get update
apt-get install libdvdcss2
That should do the trick!!! (By the way, this Debian server is awesome. You can get a lot of "stuff" from there like Adobe Acrobat Reader, mplayer, lame (an mp3 encoder), dvdrip, and LOTS of other goodies. Check it out).

Now you are NOT QUITE finished yet. UPDATE: the following is now bundled into a Debian package "w32codecs" on www.debian-multimedia.org too, so just apt-get it from there instead. I'll leave the next paragraph in for troubleshooting purposes. You need to install a bunch of CODECS (basically proprietary specifications for the millions of different crappy Windows formats out there). Go to the site http://www1.mplayerhq.hu/homepage/design7/codecs.html and grab either the "all" or the "essential" tarball. Unzip this junk into the directory /usr/lib/win32 (create it if it doesn't exist). Now, go ahead and load up "xine-ui" and go to Settings->Setup. In the "gui" tab make sure that the "Configuration experience level" option is set to "Master of the known universe". Then, go to the "decoder" tab and type the /usr/lib/win32 directories into both entries (Realplayer and Windows codecs). Hit Apply and off you go. By the way, let this be a lesson to everybody. When you are ripping a DVD (or CD or whatever), don't encode the result in proprietary garbage WE-OWN-YOU formats. Use the OpenSource formats!!!

An important tip: If you don't like how the volume varies in a movie (music is too loud, voices are too soft) then you can use a "midnight mode" in xine by doing the following. I placed the following in a script file called /usr/bin/myxine

#!/bin/sh
xine "$1"#compression:500

Then I made it executable (chmod +x /usr/bin/myxine) - now I open everything with "myxine" rather than with "xine" (I set all of my KDE and GNOME file associations to open with "myxine"). It's MUCH MUCH better for my crappy ears anyway.

Using MPLAYER to watch streaming media in Firefox (Iceweasel)
To install mplayer in Debian just type (as root, of course)

apt-get install mplayer
Note that there is an "enhanced" version maintained by Christian Marillat in the www.debian-multimedia.org repository as well.

There are plenty of PLUGINS for mplayer. If you want the Mozilla plugin, just type

apt-get install mozilla-mplayer
(this plugin is available from the standard Debian distribution). Then you'll be watching movies from your browser without any problems (almost). If you have choppy audio/video then try to change your audio output by right-clicking on the plugin->Configure->Audio Output. I have had good luck with aRts (when using KDE 3.5, of course. aRts is deprecated in KDE 4). These settings are also located in a plugin config file located in your .mplayer directory (in your home directory).

Since you have mplayer downloaded, you might want to use it. The program "mplayer" itself (run from the command line) is just that - a powerful command line video player. Most of us want a gui, so you can just run instead "gmplayer". Note that you can play DVDs and VCDs from mplayer, but there is NO DVD menu support (what a shame)!

This page has been visited   times since May 26, 2005