A blogger by the name of John Bradbury posted three excellent videos (1, 2, 3) showing his first experiences with Ubuntu. It was really wonderful to watch; lots of ‘WOW’s and pleasant surprises :) The only real problem he had was watching a DVD. When you pop it into the drive in Ubuntu, Totem (the default media player) gives a rather unhelpful error message:
An error occurred
Could not read from resource.
This is unfortunate enough. What’s worse though is that even if you have the decss library (which Ubuntu does not carry in its official repositories due to legal concerns in places like the US because of the hated DMCA…) that would normally allow Ubuntu to play DVDs through Totem (the default video player in Ubuntu), it does not seem to work properly in Gutsy (grr! bad bug!)
OK, so how do we fix this?
First run System -> Administration -> Synaptic Package Manager (supply your password when asked)
[Update: under Settings -> Repositories -> Ubuntu Software, if “Community-maintained Open Source software (universe)” isn’t checked, be sure to do so]
and (if you haven’t already) add the free section of the Medibuntu repository by going Settings -> Repositories -> Third-Party Software (tab) and click the “Add” button and add this source:
deb http://packages.medibuntu.org/ gutsy free
Update: Whoops! Forgot to mention that you have to add their key or else you’ll get a security warning when you install from their site. You can still proceed without adding their key, but its annoying to get that message and besides, its a good practice to get into :) So! Install the package:
gui-apt-key
then close Synaptic and in the Gnome panel menu you’ll find an entry under Applications -> System Tools -> APT Key Manager so run that and add the Key ID:
0C5A2783
which will show up as “Medibuntu Packaging Team”. You can close the APT Key Manger now. Now restart Synaptic, press the reload button and install these two packages:
libdvdcss2
vlc
It will automatically install all of the required dependencies as well. When its done you can close Synaptic and then go System -> Preferences -> Removable Drives and Media -> Multimedia (tab) and replace the “Video DVD Discs” command (totem %m) with:
vlc --vout-filter deinterlace --deinterlace-mode blend --volume 512 %m
[Update 12/17: added “–volume 512” so that it starts playing with an volume of “100” in VLC… this is rather counterintuitive and not exactly what it says in the manual, but it works. Update Jan. 2: Please note the double dashes in the above command; WordPress was converting them to a single long dash character that doesn’t work if you just copy and paste]
Now, whenever you pop in a DVD it should start playing :) Should you desire a desktop shortcut to play DVDs (e.g. if you want to disable disks playing automatically when inserted), right-click on the Desktop, click “Create Launcher…” give it a Name like “DVD Player” and a Command of:
vlc --vout-filter deinterlace --deinterlace-mode blend --volume 512 dvd:///cdrom
Enjoy your movies! ^_^
December 10, 2007 at 10:18 AM |
Nice post.
I like VLC as well but I saw another post where you can do the same thing by just installing Movie Player (Totem xine backend) from Add/Remove. This will also uninstall the default Movie Player that’s based on gstreamer.
If you do this and add the libdvdcss2 package from synaptic then you can play dvd’s without having to do any changes. And Movie Player is already the default player so it will autoplay your dvd’s. This is just a simpler way of achieving the same thing you are writing about. I have done this on all of my installs (which covers multiple desktops and laptops now) and it “just works.”
December 10, 2007 at 10:24 AM |
Correction to above post…
I forgot to mention that in addition to libdvdcss2, you also need to install libxine1-ffmepg from synaptic packet manager. Just install…no further configuration needed after making the three packet installations that I mentioned.
December 10, 2007 at 11:30 AM |
My issue with totem-xine is that it is mutually exclusive with totem-gstreamer; unless I am mistaken, should I want the gstreamer codecs to be used I need totem-gstreamer (Ubuntu default). I can always install Xine (gxine) separately.
In fact, I generally install as many media players as I can find; its not so much an issue these days, but in the past, Totem wasn’t very good and there are still cases where the others do a better job with a specific file type. Right now I have on my system:
totem-gstreamer
gxine
vlc (+ libdvdcss2 of course ;)
mplayer (+ w32codecs)
realplay (from feisty parter repo; its basically helix-player + proprietary codecs)
December 10, 2007 at 1:48 PM |
I agree with you and install mulitple media players and codecs (including all of the gstreamer codecs). So far though I have not had any problems with the totem-xine installation and I watch multiple videos and movies using the totem-xine method.
The only problem I have ever had was trying to play movies was without the totem-xine as you wrote about above. Once I changed to totem-xine everything worked. I do not know if you have to have the totem-gstreamer installed to access the codecs. Like I said…everything seems to work without totem-gstreamer installed.
Now I haven’t gone into in-depth testing of the different media players. I usually have to set up computers using the simplest method (that works, of course!) possible for other people. And the totem-xine is the simplest I have found so far and I still haven’t found anything yet that I can not play.
I have also used vlc (I am a big fan of vlc) for a long time now and put it side by side with totem-xine and really did not seem any noticeable difference between the two playing movies. Maybe others get different results but I have done this on multiple desktops and laptops from a variety of manufacturers and everything works with the totem-xine install.
December 11, 2007 at 11:40 AM |
[…] OK, so how do we fix this? Leave a Reply […]
December 19, 2007 at 2:59 PM |
This is incredibly clear. Thank you so much for the help – you made it easy for a ‘newb’ (read: technologically retarded) to get his DVDs to work. Cheers mate!
December 19, 2007 at 7:01 PM |
You’re welcome! I am really glad if this post helped even just one person :)
December 23, 2007 at 9:29 AM |
[…] – everything worked fine from there. Obviously I didn’t figure this out all on my own (this blog post and comments were helpful), and there are several other alternatives, including using a different video player, […]
January 1, 2008 at 9:40 PM |
hopefully this will make acidrip work again. I had it working on my 5.10 version, finally upgraded, and poof. nada.
The fix has made everything else perfect. I really appreciate it.
p.s. this appears to have fixed acidrip. you da man.
January 1, 2008 at 11:21 PM |
Cool, glad to hear that it fixed your system :) I’m going to guess that it was the libdvdcss2 package that did the trick; its really important for various programs that get info from video DVDs.
January 4, 2008 at 1:35 PM |
[…] gestossen, wo eine recht gute Anleitung für Das Problem drin steht. Ich bin mal so frei, zu verlinken. Funktioniert wunderbar […]
January 5, 2008 at 8:54 PM |
[…] official way is much easier and makes much more sense but Limulus’ idea is also […]
January 9, 2008 at 8:07 AM |
I tried this solution and it got me past the error message mentioned at the top. Unfortunately, I still can’t play DVD’s in either Totem or VLC. The program loads briefly when I put in the DVD and then seems to disappear. The window goes away (not minimized) and nothing happens.
What’s going on?
January 9, 2008 at 1:54 PM |
When a window disappears like that, the program has silently crashed. Please run the vlc command at the end of my post from Terminal (under Accessories) to see any warning messages and paste them in here… Based on any errors you get you might try searching on http://ubuntuforums.org/
January 12, 2008 at 1:31 PM |
I followed the steps exactly. It doesnt work for me, Totem or VLC. When I run the command line VLC command, I get the following:
————————–
VLC media player 0.8.6c Janus
libdvdnav: Using dvdnav version 0.1.10 from http://dvd.sf.net
libdvdread: Encrypted DVD support unavailable.
libdvdread: Attempting to use device /dev/hdc mounted on /media/cdrom0 for CSS authentication
libdvdnav: Can’t read name block. Probably not a DVD-ROM device.
libdvdnav: Unable to find map file ‘/home/mediacenter/.dvdnav/.map’
libdvdnav: DVD disk reports itself with Region mask 0x00fe0000. Regions: 1
[00000281] main playlist: nothing to play
[00000281] main playlist: stopping playback
———————-
obviously I didnt get DVD encryption installed.
January 12, 2008 at 11:52 PM |
Johnny: where it says “libdvdread: Encrypted DVD support unavailable.” it should read “libdvdread: Using libdvdcss version 1.2.9 for DVD access”
IOW, the problem is that you either don’t have the libdvdcss2 package installed, or something went wrong in its installation. Uninstall it and then try installing it again. Out of curiosity, do you have a 32-bit or 64-bit version of Ubuntu running?
January 15, 2008 at 6:50 PM |
This is wonderful. I am first time Ubuntu user and this saved the day.
January 19, 2008 at 3:07 PM |
“I forgot to mention that in addition to libdvdcss2, you also need to install libxine1-ffmepg from synaptic packet manager. Just install…no further configuration needed after making the three packet installations that I mentioned.”
Hi, so this seems to be really help full because it sounds like I’m having the same problem as everyone else, but for some really weird reason, when I try to install, or rather mark that I even want to install them, libxine1-ffmepg I get.
error title
“Could not mark all packages for installation or upgrade”
in the error box
“libxine1-ffmpeg:
Depends: libxine1 (=1.1.7) but it is not installable”
anyone ever seen this?
So i don’t really know anything and found the libxine1 package and list of dependencies at http://packages.ubuntu.com/feisty/libs/libxine1 and it gave me the same error so I just tried making sure I had all of its depends installed, and I have all of them except what appears to be its self… which it really really confusing me. Any one know what is going on?
thanks
tristan
January 19, 2008 at 6:01 PM |
tristan: Are you using Gutsy? (7.10)
I note on http://packages.ubuntu.com/libxine1 that 1.1.7-1ubuntu1 is the version from Gutsy’s default repositories while a newer version, 1.1.8-2ubuntu2~gutsy1 is available from gutsy-backports.
To get lhstech’s method working, go System -> Administration -> Synaptic Package Manager and then in Synaptic go Settings -> Repositories -> Updates (tab) and put a check next to gutsy-backports. Press close, ok, and then Reload. You should be able to install libxine1-ffmpeg then.
January 29, 2008 at 9:34 PM |
you don’t explain how to do this
Update: Whoops! Forgot to mention that you have to add their key or else you’ll get a security warning when you install from their site. You can still proceed without adding their key, but its annoying to get that message and besides, its a good practice to get into :) So! Install the package:
gui-apt-key
January 30, 2008 at 1:07 AM |
David: You’re having trouble with the installing gui-apt-key step? Run Synaptic and find the gui-apt-key package in the list. Right-click it, mark for installation, press apply, press OK. Just like installing any other package. If you don’t see it in the list of packages its probably because you don’t have the Universe repository enabled (in Synaptic, go Settings -> Repositories and then put a check next to “Community-maintained Open Source software (universe)”).
February 3, 2008 at 11:32 PM |
Thank you so much. Solved two hours of banging my head trying to fix totem.
Much appreciated
February 7, 2008 at 9:49 PM |
Thank you, thank you, thank you!!! Worked perfectly!!!
February 10, 2008 at 10:18 PM |
I’m running Ubuntu 7.10 64 bit. Everything installed OK But when I launch the “DVD Player” launcher it starts then crashes.
Any ideas would be great and much appreciated.
February 11, 2008 at 2:11 AM |
Dave: Run Terminal (under Accessories) and run the command from there. Copy the command line output and paste it here. Perhaps also see this thread: http://ubuntuforums.org/showthread.php?t=609772
February 12, 2008 at 2:37 PM |
Great post. The instructions were perfect!
Thanx a bunch!
February 17, 2008 at 5:00 PM |
I made it through installing gui-apt-key, but when I enter the above key ID into the Apt Key Manger and click Add, nothing happens.
February 18, 2008 at 2:14 AM |
Jeff: The way it works is that you put the number in, push the button and it tries to get the information from a website. It could be that that GPG server was down when you tried to get the info. Try again and see if you can get it later. If not, you can proceed, but with a warning from Synaptic.
February 18, 2008 at 10:12 AM |
Thanks, will do. It seemed strange that I was getting no message of any kind and the add button was immediately relit.
I did try to continue without it, but ran into a lot of dependences that weren’t being automatically included, and that appeared to have something to do with the failed authentication.
Nope. Same lack of effect this morning.
February 18, 2008 at 9:54 PM |
Ha! It worked this evening. Thanks.
February 21, 2008 at 2:04 PM |
You need to install libxine1-ffmpeg too.
February 21, 2008 at 4:31 PM |
Jadd: AFAIK, that’s not necessary for the VLC method I described. The only program packages that explicitly depend on libxine1-ffmpeg, according to Synaptic, are: amarok, gxine, konqueror and miro.
February 26, 2008 at 12:52 PM |
Thank goodness the Linux community shares information like this, otherwise newbies like me wouldn’t get anywhere!! Cheers for the help
March 7, 2008 at 5:18 PM |
Thanks for this info, it worked great!
One note, for total newbies to Ubuntu like myself, I didn’t know I had to check “Community-maintained Open Source software (universe)” untiil i read through the comments. This also kept the VLC package from showing up so it might be something worth adding to the instructions.
Otherwise, Cheers dude!
March 7, 2008 at 9:30 PM |
ChaserBren: thanks; I updated the post. Glad to know it worked!
March 16, 2008 at 10:25 AM |
Thanks alot,
These and a few other problems had me very worried, although help from a friend, KMFDM, got me through flashplayer problems and now I’m watching dvd’s!!!
March 16, 2008 at 2:04 PM |
BTW, I’m testing the version of Ubuntu set to be released in April, 8.04 (Hardy Heron) and DVDs play just fine in Totem again when libdvdcss2 is installed :)
March 16, 2008 at 2:04 PM |
Hi Limulus,
Thanks for uploading these instructions. I started working through them and everything was fine until I tried to add VLC. I got the error message:
vlc:
Depends: vlc-nox but it is not going to be installed
Depends: libsdl-image1.2 (>=1.2.5) but it is not installable
Depends: ttf-dejavu but it is not installable
So searched ttf-dejavu but could only find ttf-dejavu-core or -vera
then I searched for libsdl-image1.2 and it didn’t find anything (libsdl-image either)
finally searched for vlc-nox, found it and then got the following error message:
vlc-nox:
Depends: libavcodec1d but it is not going to be installed
Depends: libavformat1d but it is not going to be installed
Depends: libdc1394-13 but it is not installable
Depends: libgsm1 (>=1.0.10) but it is not installable
Depends: libid3tag0 (>=0.15.1b) but it is not installable
Depends: libmad0 (>=0.15.1b) but it is not installable
Depends: libmodplug0c2 (>=1:0.7-4.1) but it is not installable
Depends: libmpcdec3 but it is not installable
I noticed you had suggested in a previous post to add gutsy backports, which I’ve done, but no luck.
Any help would be appreciated!
I’m using Ubuntu 7.10
Cheers,
Charlotte
March 17, 2008 at 2:57 AM |
Charlotte: those are interesting errors; its almost like you don’t have access to the main repository. Check to make sure you have main/restricted/universe/multiverse enabled and press reload and see if it works then.
March 23, 2008 at 2:04 PM |
Hi Limulus, thanks for help vlc is now installed on my machine!
March 28, 2008 at 12:50 PM |
THANK YOU SO MUCH!!! these instructions made it so easy to get my dvds running! its people like you that make ubuntu easy to use for all of us!
Thanks
April 4, 2008 at 7:31 PM |
hi
i keep getting scrambled/encryption error in gxine when i try to play the dvd-videofiles. it plays the menus perfectly.
when i play it in vlc, it lacks a lot with the dvd videos, and somewhat plays the menu perfect
May 2, 2008 at 10:14 PM |
Hi there! I had become tired of windows and experimented with buntu 8.04 beta last month. I liked it so much that i decided to DIY a buntu box and use buntu exclusively! Hardware costed really cheap and thanks to this thread i finally got decent DVD on my integrated graphics so thanks a million man!
DIY buntu box specs
AMD x2 4000+
Biostar K8M800 AM2
1GB DDR2 667 Kingston
80GB Seagate 7200.10 HDD (for now)
May 17, 2008 at 8:56 PM |
Update for Hardy.
System -> Preferences -> Removable Drives and Media -> Multimedia does not exist.
Go to Properties->Open with->Add and System -> Preferences -> Preferred Applications -> Multimedia
May 20, 2008 at 9:57 PM |
Thanks much. I am brand new to Linux (I got a used Notebook) and couldnt for the life of me figure out how to get DVD’s to play decently. With the VLC player everything works now. By the way, I tried MPlayer and it didnt work
Thanks again
September 17, 2008 at 9:38 AM |
Thank you very much!
It works perfectly!
January 13, 2009 at 6:23 PM |
I got this error when I was trying to add the key
“The key with ID 0C5A2783 could not be imported.”
January 13, 2009 at 7:49 PM |
Angel Mass: Were you connected to the internet when you tried? (it needs to be to get the key). Try again? Also be sure you’re running gak with root permissions (try “sudo gak” without quotes from the commandline)
November 2, 2009 at 11:24 PM |
This looks great!
Unfortunately, I get an error when I try to open the APT Key Manager: Failed to execute child process “/usr/bin/su-to-root” (No such file or directory)
Tried removing and reading and restarting PC and still the same error.
Any suggestions?
November 3, 2009 at 10:01 PM |
Run terminal and type:
sudo gak
That should work… are you still using Gutsy though? Its EOL, so you should upgrade:
https://wiki.ubuntu.com/Releases
April 19, 2011 at 12:28 PM |
Limulus, many thanks – looked everywhere for a solution to VLC not playing DVDs – most sites give you half the story or assume you have total, er, command of the command line… Much obliged!