
On Thursday 05 December 2002 11:29, H du Plooy wrote:
MPlayer can use the RTC device to synchronise audio and video very accurately. This is necessary on some of the software based el-cheapo soundchips that motherboards come with. A friend of mine has one of these.
Do you know the exact technical reasons for this? I'm just curious. Does the soundcard offload too much onto the CPU or something?
When watching movies as root, all is fine, but as normal user (where MPlayer doesn't have access to the RTC), the sound runs away. I've seen this on a few boards, one of them was a Gigabyte GA-7DXE.
MPlayer docs suggest either making the RTC readable by normal users (I did a chmod a+r /dev/rtc, but it still didn't work), or installing MPlayer suid.
Just FYI, from the mplayer man page: -softsleep Uses high quality software timers. Efficient as the RTC, doesn't need root, but requires more CPU. I don't know how effective this actually is, though, as I have no problems on my el-cheapo onboard soundcard. :) [I'm using an EPoX 8K5A2.]
How do I do this? I tried stuff like man suid or man setuid, with no luck.
The syntax is as follows (of course, you will need to be root to change the permissions of most system files): chmod +s `which command_to_make_setuid` e.g., chmod +s `which mplayer` I think there's a better solution printed out by MPlayer itself: $ mplayer some_file.avi [snip] 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. Using usleep() timing [snip] $ su Password: # cat /proc/sys/dev/rtc/max-user-freq 64 # echo 1024 > /proc/sys/dev/rtc/max-user-freq # exit exit $ mplayer some_file.avi [snip] init_freetype Using Linux hardware RTC timing (1024Hz) [snip] NOTE: world needs read permissiont to /dev/rtf. i.e., 'chmod a+r /dev/rtf` As you can tell from the output above, I did what MPlayer recommends and it worked. No need to make mplayer suid root. -- Karol Pietrzak <noodlez84@earthlink.net> PGP KeyID: 3A1446A0