Welcome to the most active Linux Forum on the web.
Go Back > Linux Answers > Applications / GUI / Multimedia
User Name


By mhearn at 2003-07-28 11:06
OK, so you want to watch a DVD or video file on Linux but you aren't sure where to start. Typically Linux distributions do not come with DVD/video playback working out of the box, for reasons explained below, so you will have to find and install a player program yourself. This article also explains how to do things like enable DMA (useful if your DVD playback performance is poor) and crop video images if you get a widescreen DVD by accident.

Firstly, why does Linux not come with this ability as standard? The basic problem is that some countries have laws against breaking copy protection technologies. You may, or may not, be aware that DVDs are encrypted. This is for many reasons, the official one being to prevent piracy (which is certainly valid), other reasons include attempting to enforce region encoding and controlling the supply chain. You can only decrypt a DVD if you know one of the encoding keys, which require contracts and by keeping the keys secret, the DVD Consortium could control DVD playback.

Unfortunately, licensing these decryption keys costs a lot of money, and nobody wanted to write a commercial DVD player for Linux and the Linux community wanted an open source player. Several teams (not any officially connected with Linux btw) worked on cracking the encryption system and pretty quickly a method was discovered by which the keys could be extracted from the disks. Once this technology was developed, DVD playback in Linux became possible. When you play a DVD for the first time in Linux, there may be a short delay while the encryption is broken on the disc (typically players cache the extracted keys so if you play it again, there is no delay). It takes about 10-20 seconds for a standard length disk.

Similar issues have until recently prevented playback of video files like RealVideo and Windows Media streams on Linux. Fortunately today all common codecs and video encryption systems in use have been successfully reverse engineered and playback is usually possible.

So, let's have a look at your options. The reason DVD playback and video file playback are both covered by this article is because the programs that do them, often do them both. It therefore makes sense to talk about both at once.

The first thing you need is a player. If you are an American citizen by downloading and installing a player you may place yourself in violation of the law (the DMCA), however nobody has ever been prosecuted for playing DVDs or videos on Linux. Just be aware of the issues involved.

There are many good players on the market these days. Popular ones include Xine and MPlayer. There are other players available, but they normally make use of either xine or mplayer behind the scenes.

I personally recommend Totem, which can be found at - be aware that if you use Red Hat 9 or lower, or Mandrake 9.1 or lower, you may experience problems with this app (hangs, freezes etc). It's due to a bug in XFree which should be fixed in the next version, but as this howto may be around for some time I'm recommending it anyway. Not everybody has these problems, YMMV. Apparently it works OK on SuSE. Totem is based on Xine, so can play any file Xine can. Totem is certainly the easiest way to watch videos on Linux - if you find Xine or Mplayer too baffling, it's worth giving this a try.

To play DVDs or video files in Totem, just use the menus and toolbars. It works in a fairly obvious fashion. It has a nice fullscreen mode as well, and can do visualisations for audio files, if you like that kind of thing.

MPlayer can be found at and has many devoted users. It can be rather hard to use, so make sure you read the documentation before asking questions. It can play virtually anything however with the right plugin packs - an ability that to my knowledge no other media player has. To play DVDs, run it like this:

mplayer -dvd 1

If you want mplayer to play Microsoft or RealMedia files, you may need to install a codec pack, which is available on their website. Just follow the instructions, and ask here if you get stuck.

Xine on its own is also popular, however the user interface for this is quite possibly even more baroque than MPlayers. One hint - an "MRL" is xine-speak for a dvd or movie file. Get it at

You might have problems during DVD playback. One common issue is stuttering and skipping. If you have high CPU load during DVD playback, that's probably because you don't have DMA mode on. DMA mode is a special mode of IDE devices like hard disks, cd/dvd drives, zip drives and so on. Enabling it can make things go much faster, but on a few (old) chipsets it can cause bad things to happen like data corruption etc, which is why Linux doesn't switch it on by default.

As of the time of writing, there are no GUIs for enabling this mode (feel free to help us write one). You may not have had to enable this in Windows, as typically the hardware manufacturer will enable it for you at the factory (assuming you bought your computer with windows pre-installed). For obvious reasons Linux does not have this luxury, so you may have to enable it yourself (the $ indicates you should type the following in):

$ su
(enter root password)
$ file /dev/dvd
/dev/dvd: symbolic link to /dev/hdb
$ /sbin/hdparm -d1 /dev/hdb

Bear in mind that the exact name of the device may not be /dev/hdb on your system. Once you verify the command works you may want to add it to your startup scripts.

Red Hat users may find this doesn't work. Starting with Red Hat 8, from the release notes:

# DMA is disabled on CD-ROM drives in this release in a different but more reliable way than previously. If you are sure that your CD-ROM drive is capable of IDE DMA, place the following line in the /etc/modules.conf file:

options ide-cd dma=1

Finally, you may find that DVDs have large black bars at the top and bottom. That's because you don't have a widescreen monitor. Luckily, all is not lost, at least in MPlayer there is a trick you can use to blow the image up. You lose some of the picture at the sides, but that's OK because nothing important ever happens there anyway. Try investigating the -vop crop option on mplayer. There are instructions in the man page. Using this option can be convoluted because you must manually specify the crop rectangle. When you run mplayer, it will print out (somewhere) the size of the movie, for instance "720x568". Take the number on the left (the width) subtract N, where N is the value you want to scale by (200 is a good one to start with), then use "-vop crop 720-N:568:N:0" or some variation of that theme.

Totem can do this automatically, and there are zoom menu options for it.

by C0n5truc7 on Tue, 2003-09-09 01:42
Mandrake 9.1 comes with Xine as a video/media player, however, for dvd playback, i decided to go with Ogle. I downloaded and installed RPM's to get Ogle to play dvd's (libdvdcss-1.2.8-1, libdvdread-0.9.4, ogle-0.9.1, and ogle_gui-0.9.1), but after each rpm installed (successfully) and i type in "Ogle" at the command line as root, the player doesnt come up. The command line just returns "command not found" when i hit enter. Anyway i could get dvd playback to work on my Mandrake box? Help would be appreciated.

by acid_kewpie on Tue, 2003-09-09 03:51
this thread is not for getting help, it is for discussing the content of the above article.

But... it's "ogle" not "Ogle"... case sensitive

by acid_kewpie on Tue, 2003-09-09 03:53
as for the article... the -vop option in mplayer is not needed. if you are running fullscreen, w and e keys will zoom upto 4:3 aspect, cropping automatically for pan&scan viewing

also the -dvd syntax in mplayer has now been removed, so this doe not work anymore, since 1.0pre1

by disco rugby on Mon, 2004-01-26 16:19
"I personally recommend Totem, which can be found at -... Apparently it works OK on SuSE."

OK. Been to the site, but as a bloodied beginner I have no clue as to which one I should choose.

The reason why I wound up look at this article is because my brand new Suse 9 prof has decided to nuke the Ricoh MP5240A-SK(DVD + RW etc gizmo sold only in Europe. In YaST under CD-ROM Drives it doen't find any. When you click on the icon it says its not a block device. Any ideas?

Oh yeah and it won't shut off the computer when you log off. I've contacted the customer support people via e-mail on everything but the shutting off thing (I had a longer list of things). Let's just say that I'm not too thrilled with SuSE 9 prof just now. Anyone out there have an idea that could get me liking little Suzy again?


by acid_kewpie on Mon, 2004-01-26 16:40
this really is not related to the subject of this thread, you should start a new thread explaining as much as you can about each specfic problem you are having.

by disco rugby on Mon, 2004-01-26 17:17
POint taken Chris...mostly
" OK. Been to the site, but as a bloodied beginner I have no clue as to which one I should choose." Was sort of asking 'ok, which one do I chose on the site recommended given that I am using SuSE 9.0.' The rest of the message, you are absolutely correct and am on my way to formulating the question as soon as I can decipher the German Handbook enough to attempt to ask 'sumpthin smat' along those lines.
rich in Hamburg

by czarherr on Tue, 2004-02-10 11:51
Nothing beats Xine, of course, in my opinion, at least. I have yet to run into a media format it wont play fast and well. Even windows media streams faster in xine much faster than it ever did in windows media player on the same connection. It does take a bit of configuration though, and if you modify your vid card in most any way, it will likely adversly affect xine (when i fixed the ati driver as described by jbarto, xine showed everything with an intense lime green tint until i found a more suitable video driver for it to use). Other than that, once you have it up and going, its very powerful, even lets you use it over a network.

by cjp on Fri, 2004-03-12 04:45
I have SuSE 9 and it works fine for me. Anyway, on default, Xine in SuSE is not able to play encrypted DVDs. I tried deCSS, but it failed to decode one of the keys (the disc key?) of my Matrix DVD. Then I tried libcss (the name was something like that, I'm not sure). SuSE's Xine has a possibility to use this lib, but till now it doesn't work.

Is it possible to recompile Xine from the sources on the SuSE 9 DVD to get it working? I don't want to download other Xine sources, as I have a 56k6 modem.

by disco rugby on Fri, 2004-03-12 05:21

I've been round and round with SuSE 9 and in the end did a major reinstall and deleted all of the packages i had loaded up in my attempts to get DVD video. Now, I'm not sure exactly what worked, but when I just opened a terminal and typed in 'xine' the programme started up and I watched the first five minutes of Rocky Horror. My old AMD K-6 (2) 533 is a bit on the slow side, but it worked. Anyway, just a suggestion. Good luck getting it going.

Discorugby (for the masses)

by czarherr on Fri, 2004-03-12 12:43
just download the libdvdcss package for xine to play dvd


All times are GMT -5. The time now is 05:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration