It’s a new year, so here’s something fun. I’m going to show you one screenshot, and then another, and then tell you what’s going on. First, this really boring console shot.
Nothing special there. mplayer is running. So is alsaequal; that’s probably unusual enough to note. I keep it on every system I have, just as a way to compensate for the sound qualities of the room.
Next, the Toshiba Satellite J12 bequeathed to me for a song, as I mentioned yesterday. You might recognize it; it’s famous on the Internet. 🙄
What’s worth mentioning is the fact that these are not the same computer — the console image you see there wasn’t taken on the Satellite.
It was taken from a machine that predates it by about 10 years, and is networked into the larger one. mplayer is running on the big one, but it’s being controlled from the small one.
Which means all of the interaction — audio control, position, subtitles, color control … everything — is piped back and forth across the network from the big machine to the little, and vice-versa.
But the video output goes to the Satellite’s screen. 😈
And there’s one more thing here that I can’t show you, because there’s nothing really to see. The DVD rip itself — the actual video file — isn’t on the Satellite.
No, it’s being served across the network by still another machine — and this one is almost as old as the control system.
But with an oversize drive and a fast network card, it can serve video data over a wireless connection, which is played on the larger machine, which is controlled by the oldest computer in the house.
(This is the part where I apologize for the post the other day, suggesting that screen and mplayer have a difficult time working together. They did, but the problem appears to have vanished with a fresh installation. My mistake. Sorry about that. 😳 )
More importantly, that means this is another possible use for an out-of-date or ancient computer: as a front-end for a larger one.
And most importantly — to me, anyway — is that the entire circuit, from controller to server to display, runs without the need for Xorg.
You only need framebuffer support on one machine — the display computer, and that one can be as powerful or as not-powerful as you like.
Considering I used to play the same DVD rips on a machine that was running at 550Mhz with only 4Mb of video memory, that’s not saying much. 😉
Here’s a little detail, machine by machine.
Controller: This only needs ssh access to the main machine. I run this with Crux i586 on the second tty of a 120Mhz Pentium, and ssh into the display machine. I also have the Terminus font installed, but that’s neither here nor there.
Networking hardware is an ancient pcnet-driven PCMCIA card, and that’s more than enough since the traffic in and out of this machine is negligible.
Server: A server system can be and do a lot of things, but for my purposes Debian is perfect, and easy to set up too. I put everything in the home directory of a privileged user, and serve that directory as an nfs share.
The network connection is a ralink PCMCIA wireless card, which was rather quirky to arrange, but gets good upload and download speeds, and so is best suited for this situation. Best of all, the power draw is less than a light bulb, it takes up almost no space, and has a battery backup in times of need. 😉
Display: This machine is the winner this time, chosen for its large (to me, anyway) screen, clear display and speedy network access. I using the wired Intel PRO/100 connection because I have a five-meter network cable, and I like the fast access speeds.
This machine needs the most in the way of software, because this is where most of the action happens. To wit:
- Framebuffer access. If you’re using a modern distro you probably already have this. If you’re using a very old computer, it might be a little tricky to get working.
- mplayer and codecs, if your conscience allows. I should mention that archlinux.fr keeps a codecs package in its repository.
- ssh daemon. Remember dropbear is considerably lighter than some other ssh suites. And remember Remy’s ssh dialog, if your connections are stacking up.
- nfs client access. If you prefer samba or another service, you’re on your own. 😐
- alsa or another audio subsystem, of course. Unless you can read lips, I guess. … 😉
I mentioned networking equipment for all of these, because that’s where your bottleneck is. I am confident my 133Mhz Pentium can actually serve up those files in plenty of time for the Celeron M.
But if I have a slow wireless card in it, or if there is network pressure from other machines, things start to stutter. So be aware: Skipping playback, in my experience, is probably because of network speed.
(Those new Blue Ray DVDs ripped at 1080p or whatever are going to be tricky. Even my core duo has trouble with those, and that’s if they’re on the local drive. 😯 😐 )
That’s all for the hardware I’m using. There are a couple of minor points that should probably be addressed, in way of configuration. First of all, it’s useful to know a few of mplayer’s flags, like …
- -zoom, to expand or contract the output,
- -fs, to push the size to full screen, which paints the outlying areas black, as opposed to leaving leftover text on the fringes,
- -x and -y, to manually force the dimensions of the output,
- -vf scale=x:y, to scale the output instead, or
- -aspect x:y, to force an aspect, and
- -vo, to force a video driver, although with nothing else on the machine, mplayer (in the default Arch version) jumps straight to the framebuffer.
In my case, this is what my
~/.mplayer/config file looks like.
-3 in the vf line throws the y dimension out to a proportionate depth. I think. I can’t find the documentation on it, but I’ve had it around forever and it seems to work. I know, I know: Google is my friend. …
That’s not the last though. This little trick is this coup de grace:
setterm -cursor off -blank 0
Because even with mplayer’s
-fs flag, the cursor on a tty screen will blink by itself, in the middle of the screen. Sometimes. But more importantly,
-blank sets the default video timeout for the terminal to zero — meaning, never.
Otherwise, after about 20 minutes, your screen will go dark and you’ll have to get up and walk over to the keyboard, and press a key to get the image back. And we can’t have that, now can we?
That’s all. Let me know if you can get this working with something in the handheld department, because that might be where the fun lies.
Just don’t fight over it.
P.S.: I should mention, if you are more keen on forcing the video into Xorg instead of the framebuffer, to try the
xinit command with
DISPLAY=0:1 and your mplayer command. And to remember
xset s off, which should stop screen blanking. Beyond that though, you’re on your own. … 🙂