LinHES Forums
http://forum.linhes.org/

mplayer permissions and data DVD playback
http://forum.linhes.org/viewtopic.php?f=6&t=8135
Page 1 of 1

Author:  cgSteve [ Fri Jan 27, 2006 5:14 pm ]
Post subject:  mplayer permissions and data DVD playback

Hello,

I am having a problem playing back .avi files (or .nuv, I think type is irrelevant to this problem) from a data DVD I burned. Basically, I used mencoder to compress a bunch of shows I recorded, then I burned them all to a data DVD.

If I put this data DVD into the drive, and go to the 'videos' section for playback, I see 'cdrom' listed, and if I got to it, I can browse and select the files on the DVD. However, when I press the button to start playing, it does nothing. I find the following in

Code:
/home/mythtv/.xsession-errors


Code:
MPlayer 1.0pre6-3.3.5 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices  (Family: 8, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.


Failed to open /dev/rtc: Permission denied (it should be readable by the user.)
Terminal type `unknown' is not defined.
Setting up LIRC support...
Playing /myth/video/cdrom/cs_lewis_magic_never_ends.avi.
File not found: '/myth/video/cdrom/cs_lewis_magic_never_ends.avi'
Failed to open /myth/video/cdrom/cs_lewis_magic_never_ends.avi


Exiting... (End of file)


When I go to /mnt/cdrom/ in a terminal window and do a 'ls -l', I get the following:

Code:
cd /mnt/cdrom/

ls -l

total 3784101
-rwx------  1 501 501  752365566 Jan 26 03:50 cs_lewis_magic_never_ends.avi
-rwx------  1 501 501 2334347200 Jan  4 00:00 modern_marvels-the_autobah.nuv
-rwx------  1 501 501  788205900 Jan 26 16:04 modern_marvels_worlds_bigg.avi



So, it does look like I in fact to not have permissions.

If I go to a terminal window:

Code:
su

cd /mnt/cdrom/

mplayer filename


It opens mplayer and plays from the DVD just fine. So, I know it basically works... the hardware and files are good and playable from the DVD drive.

I read through tons of threads about people not being able to play DVDs, and how to check permissions and stuff. I think mine looks OK, but I'm pretty much a UNIX newbie, so I'm having trouble deciphering it all.
:oops:

I did the following that I found in one of the threads:

Code:
ls -al /dev/dvd /dev/cdrom /dev/scd0


lrwxrwxrwx  1 root cdrom     8 Jan 27 04:08 /dev/cdrom -> /dev/hdc
lrwxrwxrwx  1 root cdrom     8 Jan 27 04:08 /dev/dvd -> /dev/hdc
brw-rw----  1 root cdrom 11, 0 May  7  2004 /dev/scd0


I also ran the 'cd_link.sh', but that didn't seem to really change anything that I could tell.

I am currently using R5A26.

Thanks,

-Steve

Author:  tjc [ Fri Jan 27, 2006 7:52 pm ]
Post subject: 

Do:
Code:
ls -al /dev/hdc
grep cdrom /etc/group
grep hdc /var/log/dmesg

and report back the results.

Author:  cgSteve [ Fri Jan 27, 2006 8:09 pm ]
Post subject: 

I got the following:

Code:
ls -al /dev/hdc

brw-rw----  1 root cdrom 22, 0 May  7  2004 /dev/hdc


grep cdrom /etc/group

cdrom:*:24:mythtv,swilkinson


grep hdc /var/log/dmesg

    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:DMA
hdc: HITACHI DVD-ROM GD-2500, ATAPI CD/DVD-ROM drive
hdc: ATAPI 24X DVD-ROM drive, 512kB Cache



Thanks much,

-Steve

Author:  tjc [ Fri Jan 27, 2006 8:38 pm ]
Post subject: 

Well, thats all fine... here is your real problem:
Quote:
Failed to open /dev/rtc: Permission denied (it should be readable by the user.)

If your /dev/rtc is like mine it's ownerships and permissions are:
Code:
root@black2:~# ls -al /dev/rtc
crw-rw----  1 root root 10, 135 Oct  8 05:17 /dev/rtc

You could try making that world readable, but I'm not sure it's the right thing to do... Caveat utor!
Code:
chmod +r /dev/rtc

Author:  cgSteve [ Fri Jan 27, 2006 10:28 pm ]
Post subject: 

Hehe... well, my myth box isn't exactly Fort Knox. :D I don't mind opening permissions up a bit.

Well, I think that worked... at least in the sense that the error has now changed to a new one.

The original error line seemed to be:
Code:
Failed to open /dev/rtc: Permission denied (it should be readable by the user.)


Now I have moved on to:
Code:
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.


I checked the file, and it did change:
Code:
ls -al /dev/rtc

crw-rw-r--  1 root root 10, 135 Oct  8 02:17 /dev/rtc


Should I follow its advice to add the echo statement to the startup scripts?

What still bothers me (though I admit I don't know much about what I'm doing), is that when I go to the DVD on the command line, I get:

Code:
ls -l

-rwx------  1 501 501  752365566 Jan 26 03:50 cs_lewis_magic_never_ends.avi


Is that normal and just because it is a read only type device (ie: something else is really controlling the permissions mplayer sees)?

Thanks,

-Steve

Author:  cgSteve [ Sat Jan 28, 2006 11:46 pm ]
Post subject: 

Whoo hoo! I got it working. Now you can tell me if what I did is a REALLY BAD THING, or something like that. :D

First, I tried just typing the line that it said to add to my startup files.
Code:
echo 1024 > /proc/sys/dev/rtc/max-user-freq


I figured I could always add that later for the next restart, but I wanted to see if that would make the problem go away. Well, it did get rid of all the error messages for mplayer, except that it still came down to:

Code:
Playing /myth/video/cdrom/cs_lewis_magic_never_ends.avi.
File not found: '/myth/video/cdrom/cs_lewis_magic_never_ends.avi'
Failed to open /myth/video/cdrom/cs_lewis_magic_never_ends.avi


I decided since it worked fine from the terminal when su to the root user, why not give adding it to the sudoers mythtv user line (its just mplayer playing a file from CD/DVD... hopefully it can't do much harm)?

So, I read up a bit, and used visudo to edit /etc/sudoers

At the end of the mythtv users line, I added:

Code:
,/usr/bin/mplayer,/myth/video/cdrom/


Then I modified the preferences for the video player in myth frontend to read:

Code:
sudo /usr/bin/mplayer -fs -zoom -quiet -vo vx %s


rather than the default:

Code:
/usr/bin/mplayer -fs -zoom -quiet -vo vx %s


Now I seem to be able to play files from my burned DVD, which is GREAT! Now, I have to solve the eject issue. I've tried most of the tricks in threads I have searched out.... even added a button to my frontend, but it doesn't work. :( Would sudo'ing that be dangerous?

Also, if what I've done above isn't horribly bad, feel free to add this to the 'tips' area, as I'm sure other folks would want to do something like this.

Thanks,

-Steve

Author:  cgSteve [ Tue Jan 31, 2006 3:38 am ]
Post subject: 

Just wanted to add that I got my eject working via the sudo route as well.

I added to the end of the mythtv user line in sudoers list with visudo:

Code:
,/usr/bin/eject


Then I added to:
/usr/share/mythtv/optical_menu.xml

the following lines to make a button there for the eject.

Code:
   <button>
      <type>DVD</type>
      <text>Eject Disk</text>
      <action>EXEC sudo eject -r</action>
   </button>



This seems to be working fine. Though, warning for anyone reading this... I'm a unix newbie, so this might not be the orthodox way (or smartest way) to do this. I suppose this could open up security concerns. However, unless my cats learn to type, my box isn't at much risk. I suppose it could really ruin date night for my wife and I if some hacker ejects our DVD right in the middle of a movie. :wink:

-Steve

Author:  nigelpearson [ Wed Feb 01, 2006 4:36 am ]
Post subject: 

I used to do CD/DVD eject this way. but now I do the much simpler option:

1) Take cdrom or dvd device out of /etc/fstab and reboot

2) Use the physical eject button on the CD/DVD drive. No modification of menus needed. No sudo eject -r needed, because the drive is now never mounted

Of course, this doesn't actually help you if you are playing files from a data CD/DVD :(

Author:  derek585 [ Mon Feb 13, 2006 9:47 pm ]
Post subject:  Same problem, same DVD drive

That's wild, I have the same errors, and the same Hitachi DVD-rom drive. Maybe the root problem is a firmware issue?

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/