LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to play VCD's in mplayer as user (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-play-vcds-in-mplayer-as-user-471396/)

JoeC21 08-06-2006 06:05 PM

How to play VCD's in mplayer as user
 
I can play vcd's fine if I run 'mplayer -cdrom-device /dev/cdrom vcd://2' as root. But this seems to lack basic features like stop, play, etc. I also cant change the size of the video screen.

I would like to play the VCD by just opening mplayer and selecting it. In mplayer, I choose VCD and then open disc, but I get this error...

Failed to open vcd://2

How can I play vcds from the normal mplayer window?

Thanks

sabit 08-06-2006 06:07 PM

Try adding the "user" option for the cdrom/dvdrom device in /etc/fstab.

JoeC21 08-06-2006 06:19 PM

Thanks for the quick reply. I am not sure if this is what you meant but I believe it is already there. This is my /etc/fstab...


#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs defaults 0 0

/dev/cdrom /mnt/cd iso9660 ro,user,noauto,unhide 0 0
/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0
/dev/fd0 /mnt/fl vfat user,noauto 0 0

/dev/hda2 swap swap defaults 0 0
/dev/hda1 / reiserfs defaults 0 0
/dev/hda3 /home reiserfs defaults 0 0


Is this how it should look? If so, is there something else I should try?

Thanks

sabit 08-06-2006 06:33 PM

Try adding the user to the group cdrom (/etc/group)

JoeC21 08-06-2006 06:41 PM

cdrom doesnt exist in /etc/group. Is it possible to add it? How should the line look?

Thanks

sabit 08-06-2006 06:45 PM

Find out what group own the cdrom device. /dev/cdrom is most likely a symlink to the real device. you can check it by:

ls -l /dev/cdrom
output should be something like:
lrwxrwxrwx 1 root users 3 Aug 5 17:59 /dev/cdrom -> hdb
and then following the symlink
ls -l /dev/hdb
If both owner and group are root, then you might want to change the group to users (or a group which has your user in it)
chgrp users /dev/yourDeviceHere

JoeC21 08-06-2006 07:06 PM

ls -l /dev/cdrom shows...

lrwxrwxrwx 1 root root 17 Aug 6 9:38 /dev/cdrom -> /dev/cd/cdrom-hdd

I ran chgrp users /dev/cdrom and chgrp users /dev/cd/cdrom-hdd but nothing changes. Is that the correct way of entering it?

Thanks again for all the help so far

sabit 08-06-2006 07:09 PM

Is /dev/cd/cdrom-hdd also a symlink? you need to go all the way until you find the real device. Pls post your kernel version (uname -a) and distro name.

You can set mplayer to run with SUID, but that's a dirty hack, and should be left as the last resort. ;)

JoeC21 08-06-2006 07:17 PM

ls -l /dev/cd/cdrom-hdd gives me...

lrwxrwxrwx 1 root root 6 Aug 6 09:38 /dev/cd/cdrom-hdd -> ../hdd

I am using Arch linux and the kernel is 2.6.17-ARCH

sabit 08-06-2006 07:20 PM

chgrp users /dev/hdd

If that doesn't work post the output of ls -l /dev/hdd

Also make sure your user is in group users, and /dev/hdd actuall exists (and not a symlink :P to something else)

JoeC21 08-06-2006 07:35 PM

didnt work, here is my /etc/group, just incase this will be useful

root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin
adm::4:root,daemon
tty::5:
disk::6:root
lp::7:daemon
mem::8:
kmem::9:
wheel::10:root
ftp::11:
mail::12:
log::19:root
smmsp::25:
video:x:91:
audio:!:92:joec
optical::93:hal
floppy:x:94:hal
storage:x:95:hal
power:x:98:
nobody::99:
users::100:joec
slocate:x:21:
joec:x:1000:
dbus:x:81:
hal:x:82:
avahi:x:84:
gdm:x:1001:


I just added joec (my username) to the end of the users line

ls -l /dev/hdd shows...

brw-rw---- 1 root users 22, 64 Aug 6 09:38 /dev/hdd

sabit 08-06-2006 07:41 PM

You may need to logout first. From what I see here, anyone in the users group should be able to read/write directly to device /dev/hdd (the second group of rw), and thus enable MPlayer to use the vcd option to directly read from VCD (w/o mounting it first).

You might also try to change the permission to 666:

chmod 666 /dev/hdd

This gives access ti everyone including users other than root and users.

JoeC21 08-06-2006 07:53 PM

Well that seemed to help but now I get a different error...

Error opening/initializing the selected video_out (-vo) device.


Any ideas on what to do about that?


Edit: On a side note all of this has fixed my problem of not being able to play an audio cd :)

sabit 08-06-2006 08:15 PM

Which video output are you using? Xv or X11? (~/.mplayer/config -> vo=?) First try adding yourself to Video and Audio group.

JoeC21 08-06-2006 08:45 PM

I added myself to the video group and now mplayer just locks up after trying to play the vcd

~/.mplayer/config doesnt have anything in it, only...

#write your default config opions here


All times are GMT -5. The time now is 10:31 AM.