Mplayer, the real-time clock, and scaling

I've wondered for a while why Mplayer (a video player for Linux) complains about not having permission to use /dev/rtc (the Linux real time clock interface) for it's timing. It works as root, but I don't want to be using a video player as root.

It turns out that this is not because a normal user can't access the RTC driver—in fact any user can, but only root is allowed to use it for generating clock ticks faster than 64Hz. The kernel documentation admits that this might be a conservative limit, but says “we don't want an evil user generating lots of IRQs on a slow 386sx-16”. Since my desktop machine has a processor clock speed about 100 times that, it seems reasonable to up the limit. This has to be done by tweaking the kernel source—in drivers/char/rtc.c change the value of rtc_max_user_freq to 8192 (which is the maximum frequency) to allow any user to get full access to the RTC.

Another annoying thing about Mplayer: I usually watch small videos scaled to twice their actual size. That's usually a bit smaller than my screen size, but scaling them to the full screen size is a lot slower (it's easier to scale by a factor of exactly 2). I used to be able to do that with the options -xy 2 -zoom, but now that doesn't seem to work. I've discovered that using -vop 2xsai does the trick. It wouldn't be any fun if this was easy, now, would it?

< An evening at the ballet | The Poltergeist in the Loo >

Miniblog

(nuggets of inanity)

Tuesday Apr 24th 2007, 16:54 »
Just took the annual web design survey that AListApart do. I don't realy consider myself to be a web designer, but I have been doing a lot of HTML and CSS lately.
Monday Apr 23rd 2007, 18:23 »
Strange, there appears to be a bare-knuckle boxing match going on in the field outside my flat. Wish they wouldn't make so much noise about it.
Thursday Mar 1st 2007, 18:47 »
“In its written form, Hebrew has no vowels, making it the ideal language for texting.”
—Said in jest on some Radio 4 programme just now.

Archive: 2007 · 2006 · 2005 · 2004
Feed