libdvdread: Could not open /dev/dvd with libdvdcss.

Place to discuss Slackware
Post Reply
User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

libdvdread: Could not open /dev/dvd with libdvdcss.

Post by Calum » Wed Jan 10, 2007 3:00 pm

I did expect this sort of thing, but what i didn't expect was the lack of information i could find using google, i don't know, maybe i am just rubbish at this sort of thing. ok, trying to play a real dvd (not some ripped & burnt one) in mplayer. i have mplayer installed from a slackpack, i think from linuxpackages.net and i have libdvdread, libdvdnav, libdvdcss and libdv all installed as well. mplayer works to play files and i have even stuck an mplayer.conf in /etc/mplayer so it will drop frames for my slow CPU and automatically fullscreen when started. Of course this all worked in fedora, but now...

Code: Select all

bash-3.1$ mplayer dvd://2
MPlayer 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
The -gui option will only work as first commandline argument.

Playing dvd://2.
libdvdread: Could not open /dev/dvd with libdvdcss.
libdvdread: Can't open /dev/dvd for reading
Couldn't open DVD device: /dev/dvd
File not found: '2'
Failed to open dvd://2.


Exiting... (End of file)
is this an mplayer issue? a libdvdread issue? i suspect it has something to do with my devices myself. I only have one optical storage drive and it is a dvd rewriter. I have not used it to burn CDs yet, (expect a topic on that someday!) have never used it to burn a dvd but have used it since installing slack to install packages off a dvdrom. here's a couple of my devices:

Code: Select all

bash-3.1$ ls -l /dev/cdrom 
lrwxrwxrwx 1 root root 8 2007-01-09 20:07 /dev/cdrom -> /dev/hdc
bash-3.1$ ls -l /dev/dvd
lrwxrwxrwx 1 root root 8 2007-01-10 20:58 /dev/dvd -> /dev/hdc
bash-3.1$ ls -l /dev/hdc   
brw-rw---- 1 root disk 22, 0 2002-06-09 20:27 /dev/hdc
bash-3.1$ cat /etc/fstab 
/dev/hda5        swap             swap        defaults         0   0
/dev/hda3        /                ext3        defaults         1   1
/dev/hda2        /home            ext3        defaults         1   2
/dev/hda1        /winsux          vfat        defaults,umask=0 1   0
/dev/sr0         /mnt/cdrom       iso9660     noauto,users,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
bash-3.1$ ls -l /dev/sr0
brw-rw---- 1 root cdrom 11, 0 1999-04-13 05:24 /dev/sr0
i put my fstab in there because i appeared to have to change my cd drive to sr0 in fstab to get it to mount properly... though i know nothing about why, this was just inspired guesswork.

any ideas how to get dvds to play?

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Wed Jan 10, 2007 4:44 pm

Unless I am seriously confused, your problem is your device mapping. /dev/dvd points to /dev/hdc. Change it to point to /dev/sr0 (and change /dev/cdrom while you're at it), and problem solved.

As to how to remap devices, I have no idea.

Also, I've never heard of sr0 before.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Wed Jan 10, 2007 5:12 pm

Code: Select all

bash-3.1$ gmplayer dvd://2
MPlayer 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
The -gui option will only work as first commandline argument.
xscreensaver_disable: xscreensaver wid=4194320.
[GUI] Adding video filter: pp

Playing dvd://2.
libdvdread: Could not open /dev/dvd with libdvdcss.
libdvdread: Can't open /dev/dvd for reading
Couldn't open DVD device: /dev/dvd
File not found: '2'
Failed to open dvd://2.


Exiting... (Exit)
bash-3.1$ ls -l /dev/cdrom /dev/dvd /dev/sr0
lrwxrwxrwx 1 root root      8 2007-01-10 23:11 /dev/cdrom -> /dev/sr0
lrwxrwxrwx 1 root root      8 2007-01-10 23:10 /dev/dvd -> /dev/sr0
brw-rw---- 1 root cdrom 11, 0 1999-04-13 05:24 /dev/sr0
doesn't seem to have worked, unless i completely misunderstood your answer as well! :-)

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Wed Jan 10, 2007 6:05 pm

That's exactly what I was suggesting. And it doesn't seem to have solved the problem. :(

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Wed Jan 10, 2007 7:15 pm

Are you root when you are trying to run this or is your user part of the "disk" group? If not you need to change the permissions on your /dev/hdc. It's set to only allow root and those in the disk group to read/write to it. To temporarily see if this is the problem:

# chmod a+rw /dev/hdc

or

# chown calum /dev/hdc

If this fixes it you'll just have to change a setting in your udev configuration (if you are using udev, if not it should stay as you set them).

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Thu Jan 11, 2007 9:27 am

how silly of me! i saw the persmissions of cdrom and dvd and didn't even think that sr0's permissions might be the issue. i will do that when i get home. you are right, i am running mplayer as a normal user, for sake of sense and convenience, so that'll be it.

I'm not using udev at the moment. slack 11 comes with 2.4 and 2.6 kernels, but 2.4 is the default i read in the udev package description that 2.6 is required. i don't have time now, but i will want to recompile 2.6 from source when i move up anyway. at that time i will also have to figure out how udev works and will be recompiling mplayer too, since i might as well wait till the kernel's being upgraded, and i am having issues with it performancewise compared with under fedora. Anyway, thanks all!

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu Jan 11, 2007 9:48 am

Or just add your username to the "cdrom" group.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Thu Jan 11, 2007 1:29 pm

it's ok to do that, yes? i mean there aren't any sensible admin/security reasons why not, no?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu Jan 11, 2007 1:58 pm

I'm pretty sure that is what the purpose of the cdrom group is in Slack but I could be wrong.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Thu Jan 11, 2007 5:28 pm

odd, am i doing this right?

Code: Select all

calum@harvey ~ $ gmplayer
MPlayer 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
The -gui option will only work as first commandline argument.
xscreensaver_disable: xscreensaver wid=4194422.
[GUI] Adding video filter: pp

Playing dvd://1.
libdvdread: Could not open /dev/dvd with libdvdcss.
libdvdread: Can't open /dev/dvd for reading
Couldn't open DVD device: /dev/dvd
File not found: '1'
Failed to open dvd://1.


Exiting... (Exit)
calum@harvey ~ $ ls -l /dev/dvd
lrwxrwxrwx 1 root root 8 2007-01-10 23:10 /dev/dvd -> /dev/sr0
calum@harvey ~ $ ls -l /dev/sr0
brw-rw---- 1 root cdrom 11, 0 1999-04-13 05:24 /dev/sr0
calum@harvey ~ $ cat /etc/group 
<<snippity snip>>
cdrom::19:calum,anotheruser,guest
i just chmodded the permissions on /dev/sr0 to 777 which enables me to now play DVDs (at about half the framerate of mplayer in fedora! must recompile mplayer, i think) but that's not ideal. i suppose it can be 744... yes that works too. I am happy with that.

OK, thanks for your help, it is now "fixed", but do tell me if i am not understanding something about groups. i admit groups is a concept i haven't "done" much with in the past.

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Thu Jan 11, 2007 5:55 pm

Here's a Slackware specific article which helped me understand the basics of that concept, maybe it will help you too:
http://www.userlocal.com/tips/fatmounting.php

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu Jan 11, 2007 6:52 pm

Calum wrote:odd, am i doing this right?

Code: Select all

calum@harvey ~ $ gmplayer
MPlayer 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
The -gui option will only work as first commandline argument.
xscreensaver_disable: xscreensaver wid=4194422.
[GUI] Adding video filter: pp

Playing dvd://1.
libdvdread: Could not open /dev/dvd with libdvdcss.
libdvdread: Can't open /dev/dvd for reading
Couldn't open DVD device: /dev/dvd
File not found: '1'
Failed to open dvd://1.


Exiting... (Exit)
calum@harvey ~ $ ls -l /dev/dvd
lrwxrwxrwx 1 root root 8 2007-01-10 23:10 /dev/dvd -> /dev/sr0
calum@harvey ~ $ ls -l /dev/sr0
brw-rw---- 1 root cdrom 11, 0 1999-04-13 05:24 /dev/sr0
calum@harvey ~ $ cat /etc/group 
<<snippity snip>>
cdrom::19:calum,anotheruser,guest
i just chmodded the permissions on /dev/sr0 to 777 which enables me to now play DVDs (at about half the framerate of mplayer in fedora! must recompile mplayer, i think) but that's not ideal. i suppose it can be 744... yes that works too. I am happy with that.

OK, thanks for your help, it is now "fixed", but do tell me if i am not understanding something about groups. i admit groups is a concept i haven't "done" much with in the past.
777? I don't think you'll need to execute it. :) You could have left it and just added your user to the group like you apparently did but you'll have to log off and back on before it will take effect. The permissions should have been right the way the were when you are in the group (660).

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Fri Jan 12, 2007 4:39 am

ok, when i next log in at home, i'll change them back to 660 in that case.

worker, thanks, will read that in a slow moment today!
on a similar note, i remember a few years ago finding a really good, and huge, unix system administration book, telling you basically everything in nice easy language, but i can't for the life of me remember what it was. there were a couple of versions, the network administrator's version had a few extra chapters than the system administrator's version. Anybody remember where to find this online? there were a few websites with the whole book on as html pages.

EDIT: it's Unix Unleashed from Sams Publishing. Very good in my opinion.

EDIT AGAIN: just read that page about mouting and groups, seems to me like editing /etc/group by hand is the easiest way to do this, and i can't believe how simple it is. I wonder why anybody's bother using usermod to do the same thing.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Fri Jan 12, 2007 9:05 am

Calum wrote:EDIT AGAIN: just read that page about mouting and groups, seems to me like editing /etc/group by hand is the easiest way to do this, and i can't believe how simple it is. I wonder why anybody's bother using usermod to do the same thing.
usermod? What's that? :)

Post Reply